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

Add capabilityCredit and capabilityDebit merchantCapability options for Apple Pay

Open brendanlong opened this issue 4 years ago • 3 comments

These allow developers to pass capabilityCredit: true or capabilityDebit: true when opening an Apple Pay interface to filter to only credit or debit cards.

See: https://developer.apple.com/documentation/apple_pay_on_the_web/applepaypaymentrequest/1916123-merchantcapabilities

Fixes #728

brendanlong avatar Dec 14 '21 21:12 brendanlong

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Brendan Long seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Dec 14 '21 21:12 CLAassistant

I doubt this is exactly how you want to implement this, but I figured example code would make it easier to find this if you do want to do it.

brendanlong avatar Dec 14 '21 21:12 brendanlong

It would also be good to see if Google Pay exposes a similar filter so we have cross-platform support for this feature: https://developers.google.com/pay/api/android/guides/tutorial#allowed-payment-methods

charliecruzan-stripe avatar Feb 11 '22 20:02 charliecruzan-stripe

This is now released in v0.22.0 via https://github.com/stripe/stripe-react-native/pull/1164

charliecruzan-stripe avatar Dec 07 '22 20:12 charliecruzan-stripe

I might be missing something, but I don't see where the option to specify only credit or debit was done. In presentParams I don't see a field relevant to this.

jayfeldman12 avatar Dec 09 '22 16:12 jayfeldman12

This is released as part of the new Platform Pay API, which replaced the individual Apple/Google Pay APIs: https://github.com/stripe/stripe-react-native/blob/master/src/types/PlatformPay.ts#L65

charliecruzan-stripe avatar Dec 09 '22 18:12 charliecruzan-stripe