-
Notifications
You must be signed in to change notification settings - Fork 0
Add setup intents #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…upintent for stripe.
|
Should I actually call it |
| break; | ||
| } | ||
| case STPPaymentHandlerActionStatusSucceeded: { | ||
| completion(setupIntent.paymentMethodID, nil); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, so we have validated that we can get the method ID out of this method
js/index.js
Outdated
| @@ -1,2 +1,3 @@ | |||
| export { default as PaymentRequest } from './PaymentRequest'; | |||
| export { PKPaymentButton } from './PKPaymentButton'; | |||
| export { Intents } from './Intents'; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, I like it. Maybe better to do an export default in Intents.js and then export { default as Intents } here. Saves you embedding everything inside a single object
| cardParams: (NSDictionary *)cardParams | ||
| callback: (RCTResponseSenderBlock)callback) | ||
| { | ||
| NSString *merchantId = methodData[@"merchantIdentifier"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merchantId is pk_test_... right?
ios/GatewayManager.m
Outdated
| card.expYear = [RCTConvert NSNumber:cardParams[@"expYear"]]; | ||
| card.expMonth = [RCTConvert NSNumber:cardParams[@"expMonth"]]; | ||
| card.cvc = [RCTConvert NSString:cardParams[@"cvc"]]; | ||
| STPPaymentMethodParams *paymentMethodParams = [STPPaymentMethodParams paramsWithCard:card billingDetails:nil metadata:nil]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe here, paramsWithCard could potentially be paramsWithToken
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it can I don't know https://stripe.dev/stripe-ios/docs/Classes/STPPaymentMethodParams.html
…urrently. better to get on android first
…ling with onActivityResult stuff
…ese, just gonna see if it works)
Adds the stripe function confirmSetupIntent. Use in project as