Closed 12ahsanali34 closed 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', } );
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.
requestOneTimePayment
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', } );