简体   繁体   中英

Paypal REST API call doesn't save a trasactionID using nodeJS and paypal-rest-sdk npm module

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:

贝宝仪表板

贝宝个人资料

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.

我需要授权付款,在Paypal的api上可以看到更多信息。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM