-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Stripe PI: add the request_extended_authorization field #5417
Conversation
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.
@yunnydang I think it might be worth reaching out to Stripe Support to see if the feature can be enabled for our test account. The response you're getting suggests that the way you've updated the request is correct, but I also notice that the docs suggest you have to expand['latest_charge']
in order to get back the details about whether the extension is enabled, and the capture_before
timestamp. If we plan to return those details in the response I think we'll want to see if expanding the latest charge also needs to be added to this new submethod, and if that affects anything about the way we are interpreting the response
Stripe support had confirmed its a paid IC+ account feature so we cant really turn it on for testing. As for the expanding the latest charge fiasco, they did confirm that we do need to expand it to see the response for extend_authorization. Now looking at the code for latest_charge is on of the candidates in the GSRF method: def extract_charge_object(params)
end So i'd be wary of running an expand on it from the get go. Im going to do some more digging on the latest_charge object |
Also i think given that we probably would want to expand the latest_charge object eventually, i think creating a separate commit/ticket for so that it can be de-coupled would make some more sense given the risky nature of the change. What do you think? |
If the |
Hmm that would make sense! Ill see what this would affect! |
9d03eac
to
1fe314f
Compare
1fe314f
to
f503c58
Compare
Heya @jcreiff so now that we're unblocked on the remote testing and seeing a response, i can confirm that the response does return the "capture_before" and "extended_authorization" status. I dont believe we will need to send and expand request for this |
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 good!
f503c58
to
60c1543
Compare
adds the optional request_extended_authorization field for authorization requests
local:
6206 tests, 81265 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
Unit:
70 tests, 367 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
Remote:
101 tests, 451 assertions, 3 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
97.0297% passed
A note about tests: I had tried to write a remote test for this and it fails due to account related issues. Here is the error message: "This account is not eligible for the requested card features. See https://stripe.com/docs/payments/flexible-payments for more details."
Given the error message, I do think stripe is acknowledging that this field is valid, but its just that our test account is not set up for it. I tried poking around in the dashboard but havent made progress.