Question

I'm using the paypal rest api in nodeJS and the paypal-rest-sdk npm module.

I am using the REST API to create a payment with paypal using express checkout. I can successfully get a redirect url where the user is redirected to paypal to authorize a transaction.

However, when the user completes the transaction, I can see the transaction show up in my dashboard on paypal's developer website: developer.paypal.com

There is no transactionID which leads me to believe that something is not right. We cannot see any money in our paypal profile.

Please refer to the 2 screenshots, note that the Transaction ID is N/A:

Paypal Dashboard

Paypal profile

We know that this is NOT a credential issue. We can get successful responses from Paypal. This example is the first step, getting a redirect url to send users onto paypal's site for authorization:

{ id: 'PAY-1RE096301S217202BKM2EBWI',
create_time: '2014-03-27T15:16:41Z',
update_time: '2014-03-27T15:16:42Z',
state: 'created',
intent: 'sale',
payer: 
 { payment_method: 'paypal',
   payer_info: { shipping_address: {} } },
transactions: 
 [ { amount: [Object],
     description: '3073910, ',
     item_list: [Object] } ],
links: 
 [ { href: 'https://api.paypal.com/v1/payments/payment/PAY-1RE096301S217202BKM2EBWI',
     rel: 'self',
     method: 'GET' },
   { href: 'https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-8B22891089906944Y',
     rel: 'approval_url',
     method: 'REDIRECT' },
   { href: 'https://api.paypal.com/v1/payments/payment/PAY-1RE096301S217202BKM2EBWI/execute',
     rel: 'execute',
     method: 'POST' } ] }

Thank you in advance for helping, and comment if you've seen this problem before.

Was it helpful?

Solution

I needed to authorize the payment, more can be seen on paypal's api.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top