react-native-paypal
react-native-paypal copied to clipboard
added support for future payments
Hi everyone. So i added support for future payments and receiving metadata id. Future payment example -
PayPal.futurePayment({
clientId: "AbyfNDFV53djg6w4yYgiug_JaDfBSUiYI7o6NM9HE1CQ_qk9XxbUX0nwcPXXQHaNAWYtDfphQtWB3q4R",
environment: PayPal.SANDBOX,
merchantName: "Merchant Name",
policyUri: "https://www.example.com/privacy",
agreementUri: "https://www.example.com/legal",
})
.then((token) => {
alert(token);
})
.catch((error) => {
alert(error);
})
Getting metadata id -
PayPal.getMetadataId()
.then((token) => {
alert(token);
})
.catch((error) => {
alert(error);
})
If you could just point to me what's wrong with code, since i am new to contributing to open source packages, that would be great. I guess we should also fix documentation.