-
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: Update API version #5360
base: master
Are you sure you want to change the base?
Conversation
630c7af
to
e11d0f3
Compare
Update API version to 2022-11-15 Remote 104 tests, 483 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed
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.
I agree with most changes, but I have some questions.
@@ -65,7 +64,7 @@ def create_intent(money, payment_method, options = {}) | |||
end | |||
|
|||
def show_intent(intent_id, options) | |||
commit(:get, "payment_intents/#{intent_id}", nil, options) | |||
commit(:get, "payment_intents/#{intent_id}?expand[]=latest_charge.balance_transaction", nil, options) |
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.
I noticed that you added the expand
parameter to the URL. Should this always be added? I understand that we need this in Spreedly, but should this be added in ActiveMerchant?
@@ -228,11 +221,11 @@ def void(intent_id, options = {}) | |||
|
|||
def refund(money, intent_id, options = {}) | |||
if intent_id.include?('pi_') | |||
intent = api_request(:get, "payment_intents/#{intent_id}", nil, options) | |||
intent = api_request(:get, "payment_intents/#{intent_id}?expand[]=latest_charge.balance_transaction", nil, options) |
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.
Same question here.
if url.include?('payment_intents') | ||
post[:expand].concat(['latest_charge', 'latest_charge.balance_transaction']) | ||
elsif url.include?('setup_intents') | ||
post[:expand] << 'latest_attempt' |
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.
Same question here.
Update API version to 2022-11-15
Remote
104 tests, 483 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed