Skip to content
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

Adding Oauth Response for access tokens #4851

Merged
merged 1 commit into from Aug 22, 2023
Merged

Conversation

almalee24
Copy link

Add new OAuth Response error handling to PayTrace, Quickbooks, Simetrik, Alelo, CheckoutV2 and Airwallex.

@almalee24 almalee24 requested a review from a team August 11, 2023 14:39
Copy link
Contributor

@aenand aenand left a comment

Choose a reason for hiding this comment

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

Would you be able to make some unit tests for this change?

lib/active_merchant/billing/gateways/checkout_v2.rb Outdated Show resolved Hide resolved
lib/active_merchant/billing/gateways/alelo.rb Outdated Show resolved Hide resolved
Copy link
Contributor

@aenand aenand left a comment

Choose a reason for hiding this comment

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

Great test coverage! I think this looks good just one question about the options[:access_token]. Was that done to make testing easier?

@@ -1,3 +1,4 @@
require 'pry'
Copy link
Contributor

Choose a reason for hiding this comment

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

Pesky pry statement!

Copy link
Author

Choose a reason for hiding this comment

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

Good catch!

@almalee24
Copy link
Author

Great test coverage! I think this looks good just one question about the options[:access_token]. Was that done to make testing easier?

Yes, to add unit testing. Without it I can't skip the access token method for all the other units tests and it causes them to fail. It couldn't find a better way to do it, the way it was done before was calling the method within the unit test file, https://github.com/activemerchant/active_merchant/pull/4851/files#diff-f3fb17a2b3e2cdf9d21bc45cc072a7f6f740a76e2b362b2168892dc94a1904b0L3

Copy link
Contributor

@aenand aenand left a comment

Choose a reason for hiding this comment

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

LGTM! I'm fine with the options[:access_token] to facilitate testing. Just remember to remove the pry statement!

Add new OAuth Response error handling to PayTrace,
Quickbooks, Simetrik, Alelo, CheckoutV2 and Airwallex.
@almalee24 almalee24 merged commit 00fd53f into master Aug 22, 2023
5 checks passed
@almalee24 almalee24 deleted the oauth_response_on_gateways branch August 22, 2023 14:12
@almalee24 almalee24 restored the oauth_response_on_gateways branch August 22, 2023 15:03
@almalee24 almalee24 deleted the oauth_response_on_gateways branch August 22, 2023 15:03
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.

None yet

2 participants