-
Notifications
You must be signed in to change notification settings - Fork 999
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
Update for mid-Feb API changes #1146
Conversation
…aymentIntentsStatusRequiresPaymentMethod`
…tIntentStatusRequiresAction`
…uthorizeWithURL -> STPPaymentIntentAction, STPPaymentIntentActionRedirectToURL
053164e
to
bf8b410
Compare
…tStatusRequiresSource, STPPaymentIntentStatusRequiresSourceAction
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.
Looks totally reasonable to me. I have a couple code improvements, some docs suggestions.
I'm assuming you'll want to make at least some of the changes, and happy to re-review when you have.
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.
Was it a mistake to remove the requires_source
string? Otherwise this looks great
…entStatusRequiresPaymentMethod instead of a STPPaymentIntentStatusRequiresSource
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.
🎉
Summary
Updating to accommodate some API changes https://stripe.com/docs/upgrades#2019-02-11
STPPaymentIntentsStatusRequiresSource
, replaced bySTPPaymentIntentsStatusRequiresPaymentMethod
STPPaymentIntentsStatusRequiresSourceAction
, replaced bySTPPaymentIntentsStatusRequiresAction
STPPaymentIntentSourceAction
andSTPPaymentSourceActionAuthorizeWithURL
classes, replaced bySTPPaymentIntentAction
andSTPPaymentActionRedirectToURL
nextSourceAction
onSTPPaymentIntent
, replaced bynextAction
See https://paper.dropbox.com/doc/API-Changes-for-mid-Feb-version--AZT10970k8GfUgnOyuAeN~hOAg-PC7zkuMmx0i42AeypiP04
Testing
Reworked
STPPaymentIntentSourceActionTest
->STPPaymentIntentActionTest
.Updated
STPPaymentIntentFunctionalTest
,STPPaymentIntentTest
To see what it would look like for a user who was still using the deprecated classes, I did the following:
STPPaymentIntentSourceActionTest
, but replaced the test JSON with the new version (ie "authorize_with_url" -> "redirect_to_url")Result: The test passes, and you get warnings like this everywhere: