Skip to content

Normalize API version for SecurePayAu, Simetrik and StripePaymentIntents. #5450

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

Conversation

adarsh-spreedly
Copy link
Contributor

@adarsh-spreedly adarsh-spreedly commented Apr 21, 2025

Summary: Normalize API Version

Normalize API version for SecurePayAu, Simetrik and StripePaymentIntents.

Unit Tests:

6247 tests, 81499 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

RuboCop:

809 files inspected, no offenses detected.

@adarsh-spreedly adarsh-spreedly changed the title Summary: Normalize API version for SecurePayAu, Simetrik and StripePaymentIntents. Normalize API version for SecurePayAu, Simetrik and StripePaymentIntents. Apr 21, 2025
@adarsh-spreedly adarsh-spreedly requested a review from a team April 21, 2025 13:12
@adarsh-spreedly adarsh-spreedly self-assigned this Apr 22, 2025
@adarsh-spreedly adarsh-spreedly requested a review from a team April 22, 2025 16:15
Copy link
Contributor

@almalee24 almalee24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you forgot to change the StripePaymentIntents version and you updated the wrong version for Stripe. So for Stripe/StripePaymentIntents its a little bit different than the other gateways. Their version lives in DEFAULT_API_VERSION and this gets passed in the headers through Stripe-Version.

For version for StripePaymentIntents is DEFAULT_API_VERSION = '2020-08-27' this is in lib/active_merchant/billing/gateways/stripe_payment_intents.rb. For Stripe is DEFAULT_API_VERSION = '2020-08-27'. StripePaymentIntents inherits from Stripe

@adarsh-spreedly
Copy link
Contributor Author

Looks like you forgot to change the StripePaymentIntents version and you updated the wrong version for Stripe. So for Stripe/StripePaymentIntents its a little bit different than the other gateways. Their version lives in DEFAULT_API_VERSION and this gets passed in the headers through Stripe-Version.

For version for StripePaymentIntents is DEFAULT_API_VERSION = '2020-08-27' this is in lib/active_merchant/billing/gateways/stripe_payment_intents.rb. For Stripe is DEFAULT_API_VERSION = '2020-08-27'. StripePaymentIntents inherits from Stripe

Thanks for sharing
I'll update the version for stripe_payment_intents, but as you said stripe is the parent class and it also have the default version and both uses same method api_version to get the version so I am making changes in both file unless you want the changes in only stripe_payment_intents file.

@adarsh-spreedly adarsh-spreedly force-pushed the OPPS-200_normalize_api_versions branch 2 times, most recently from 50b49a2 to de0af2b Compare April 29, 2025 05:50
Summary:
-------------------------------------------
Normalize API version for SecurePayAu, Simetrik and StripePaymentIntents.

Unit Tests:
-------------------------------------------
6247 tests, 81499 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

RuboCop:
-------------------------------------------
809 files inspected, no offenses detected.
@adarsh-spreedly adarsh-spreedly force-pushed the OPPS-200_normalize_api_versions branch from af2ca00 to a9e19c2 Compare April 29, 2025 06:07
@ankurspreedly ankurspreedly merged commit 59be526 into activemerchant:master May 30, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants