smarkets / react-native-paypal

React Native library that implements PayPal Checkout flow using purely native code
MIT License
118 stars 54 forks source link

what is payerId and nonce in this const and how can i get this #28

Closed 12ahsanali34 closed 4 years ago

12ahsanali34 commented 4 years ago

const { nonce, payerId, email, firstName, lastName, phone } = await requestOneTimePayment( token, { amount: '5', // required // any PayPal supported currency (see here: https://developer.paypal.com/docs/integration/direct/rest/currency-codes/#paypal-account-payments) currency: 'GBP', // any PayPal supported locale (see here: https://braintree.github.io/braintree_ios/Classes/BTPayPalRequest.html#/c:objc(cs)BTPayPalRequest(py)localeCode) localeCode: 'en_GB', shippingAddressRequired: false, userAction: 'commit', // display 'Pay Now' on the PayPal review page // one of 'authorize', 'sale', 'order'. defaults to 'authorize'. see details here: https://developer.paypal.com/docs/api/payments/v1/#payment-create-request-body intent: 'authorize', } );

riso commented 4 years ago

These are returned by calling the requestOneTimePayment function, you don't have to provide them. Closing this, let me know if you have further issues.