Fitpassu / react-native-stripe-payments

Lightweight, easy to integrate and use React native library for Stripe payments (using Payment Intents) compliant with SCA (strong customer authentication)
MIT License
98 stars 31 forks source link

No option for payment amount? #16

Closed calliday closed 3 years ago

calliday commented 3 years ago

The ReadMe shows the code necessary for completing a One-Time Payment, but does not show how to insert the amount. How do we submit the amount to be paid to the Stripe account?

(Example from the ReadMe) `import stripe from 'react-native-stripe-payments';

const cardDetails = { number: '4242424242424242', expMonth: 10, expYear: 21, cvc: '888', } stripe.confirmPayment('client_secret_from_backend', cardDetails) .then(result => { // result of type PaymentResult }) .catch(err => // error performing payment )`

viktorasl commented 3 years ago

Please follow SCA payment flow (https://stripe.com/docs/payments/accept-a-payment?integration=elements#ios-create-server-side) where you will have to initiate payment with correct payment amount.

calliday commented 3 years ago

Thank you @viktorasl , I was naively thinking too simply of the process. For others like me, it would help if the readme was updated to make it more clear that the use of this package is in combination with the PaymentIntent.