react-native-paypal icon indicating copy to clipboard operation
react-native-paypal copied to clipboard

added support for future payments

Open nezaidu opened this issue 9 years ago • 0 comments

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.

nezaidu avatar Apr 21 '16 14:04 nezaidu