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

Update Android implementation, remove Android gateway validation, refactor canMakePayments

Open riso opened this issue 5 years ago • 4 comments

This MR changes a few things in the current Android implementation.

  • Update to non-deprecated gradle directives
  • Updates to use AndroidX
  • Updates Android implementation to use current, non-deprecated Google APIs
  • Remove validation of gateways for Android. Google adds/changes supported gateways and new gateways work transparently without having to do any change. No reason to reject unknown gateways arbitrarily from the library

This also refactors canMakePayments. This is a breaking change, and changes how canMakePayments is exposed. Is no longer part of PaymentRequest, but it's directly exposed as a function. While having canMakePayments as part of PaymentRequest makes the API more compliant with the specification, there's no point in having to create a PaymentRequest just to verify that the device can make payments. For both Apple and Google Pay in fact, we only need to supply a small subset of the payment data (nothing at all in case of Apple Pay) to verify that the device supports the payment methods.

riso avatar Aug 20 '19 11:08 riso

I'm pretty sure the GooglePay API update is a requirement as of the end of this month. How do we get someone to merge it in?!

ChrisFromCanada avatar Sep 10 '19 14:09 ChrisFromCanada

Nice job! This PR should be merged, otherwise this lib doesn't make any sense @naoufal @Andreyco

dswiconnect avatar Dec 05 '19 13:12 dswiconnect

Hey there, thanks for doing this work. I'm helping out with this library. The PR has been open for a while and I'm not quite the expert on the Android side of things and Google Pay. What's the situation as of late 2020 with this?

nabilfreeman avatar Nov 17 '20 22:11 nabilfreeman

+1 for merge this pr

litinskii avatar May 09 '23 19:05 litinskii