Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pay with Paypal through Paypal REST API does not show up payment description on Paypal Sandbox or live sites

I am implementing Paypal's new REST API Pay with Paypal method that can be referenced here: https://developer.paypal.com/webapps/developer/docs/integration/web/accept-paypal-payment/

The payment executes fine, exactly the way it should be. The user chooses to pay with Paypal and is then redirected to the Paypal site where he is expected to log in and approve the payment. The JSON data that I am sending Paypal is pretty much what is specified in the above link and mine looks like this:

{   "intent":"sale",   "redirect_urls":{     "return_url":"http://<return URL here>",     "cancel_url":"http://<cancel URL here>"   },   "payer":{     "payment_method":"paypal"   },   "transactions":[     {       "amount":{         "total":"7.47",         "currency":"USD"       },       "description":"This is the payment description."     }   ] 

}

As it redirects the user to the paypal website, the description and total amount column is shown blank

I am not sure if this is a mistake on Paypal's REST API but I believe I am providing the necessary description + amount payment to be reflected on this page. If this information is not shown, it is typically a deterrent to the user since they would definitely like to see the amount they are paying on the Paypal site even though this amount is listed on my website.

This is what it looks like:

enter image description here

For those who would like to indicate that the user has not logged in, well, even after logging in, the description and the current purchase column remain blank.

Am I missing any parameters that need to be sent to Paypal in order to indicate this description data?

Note: This issue persists for both the live and sandbox servers.

like image 726
Parijat Kalia Avatar asked Apr 08 '13 17:04

Parijat Kalia


People also ask

Why does my PayPal say sandbox?

The PayPal sandbox is a self-contained, virtual testing environment that simulates the live PayPal production environment. The sandbox provides a shielded space where you can initiate and watch while your apps process PayPal API requests without touching any live PayPal accounts.

What is the difference between PayPal sandbox and live?

PayPal Sandbox is a virtual testing environment that mimics the live PayPal production environment. It works similarly to making an actual PayPal but without using real credit cards or live PayPal accounts. There are 2 different sandbox account types, Personal and Business.


1 Answers

The left hand pan in above page displays: 1. Item details from order. You can include item list as part of the transaction details in payment resource. The same will be displayed here. 2. Components of the transaction amount e.g. shipping amount, tax, etc. if you include them in request.

Try this request to see example:

{     "intent": "sale",     "payer": {         "payment_method": "paypal"     },     "redirect_urls": {         "return_url": "http://<return url>",         "cancel_url": "http://<cancle url>"     },     "transactions": [         {             "amount": {                 "total": "8.00",                 "currency": "USD",                 "details": {                     "subtotal": "6.00",                     "tax": "1.00",                     "shipping": "1.00"                 }             },             "description": "This is payment description.",             "item_list": {                  "items":[                     {                         "quantity":"3",                          "name":"Hat",                          "price":"2.00",                           "sku":"product12345",                          "currency":"USD"                     }                 ]             }         }     ] } 
like image 90
Deepesh Dwivedi Avatar answered Sep 19 '22 17:09

Deepesh Dwivedi