Clone this to try using react-native-payments on iOS.
npm install
cd ios
pod install
npm run ios
Add it to your app!
Check out the full documentation at https://github.com/naoufal/react-native-payments.
Most people add Stripe / Braintree tokenization as a next step.
Just add this block to your config
object:
const config = [
{
supportedMethods: ['apple-pay'],
data: {
merchantIdentifier: 'merchant.com.react-native-payments.naoufal',
supportedNetworks: ['visa', 'mastercard'],
countryCode: 'US',
currencyCode: 'USD',
+ paymentMethodTokenizationParameters: {
+ parameters: {
+ gateway: 'stripe',
+ 'stripe:publishableKey': 'pk_test_asdfghjkl_qwertyuiop'
+ }
+ }
}
}
];
Just add this block to your config
object:
const config = [
{
supportedMethods: ['apple-pay'],
data: {
merchantIdentifier: 'merchant.com.react-native-payments.naoufal',
supportedNetworks: ['visa', 'mastercard'],
countryCode: 'US',
currencyCode: 'USD',
+ paymentMethodTokenizationParameters: {
+ parameters: {
+ gateway: 'braintree',
+ 'braintree:tokenizationKey': 'sandbox_asdfghjkl_qwertyuiop'
+ }
+ }
}
}
];
If you leave out both of the above, you'll instead get an Apple Pay token.