Luehang / react-paypal-button-v2

An easy and simple to use React button component to implement PayPal Checkout with Smart Payment Buttons V2 (Version 2).
https://luehangs.site/lue_hang/projects/react-paypal-button-v2
MIT License
274 stars 81 forks source link

[BUG] onApprove={(data: any, actions: any) data doesn't contains paymentID, it's always null #97

Open labzar opened 3 years ago

labzar commented 3 years ago

To Do First

*Software Package Version:Latest version: 2.6.3**

Describe the bug

onApprove data parameter doesn't contains paymentID, and i need this in order to complete my payment in my backend. To Reproduce when you validate a transaction and when you go to onApprove, the parameter data doesn't contains paymentId , its always null

Expected behavior

Screenshots image

Desktop :

kombasltd commented 3 years ago

Same here, but I do my tests only within the sandbox.

EDIT:

The question is, what the paymentID stands for? Within my PayPal account the relevant information for a transaction is the Transcation-ID. This Transaction-ID seems to be hidden here (at least I use it from there):

const transactionId = details.purchase_units[0].payments.captures[0].id;