Revert AdyenPaymentMethod#cancel! method signature#21
Open
spaghetticode wants to merge 1 commit intomasterfrom
Open
Revert AdyenPaymentMethod#cancel! method signature#21spaghetticode wants to merge 1 commit intomasterfrom
spaghetticode wants to merge 1 commit intomasterfrom
Conversation
The method signature was originally changed in #15 that made the extension compatible with Ruby 3.x. The previous version is compatible with Ruby 3.x, while the new one was not equivalent to the old one as it requires the second param, which is irrelevant in the context of the method, to be present. The new signature poses an issues at least on Rowan, as it prevents payments to be cancelled: Spree::Order.find_by(number: 'KR700391505').payments.first.cancel! D, [2024-06-13T08:17:47.239828 #2] DEBUG -- : TRANSACTION (1.1ms) ROLLBACK /app/vendor/bundle/ruby/3.0.0/bundler/gems/solidus-adyen-f654fd0d419c/app/models/concerns/spree/payment_method/adyen_payment_method.rb:41:in `cancel': wrong number of arguments (given 1, expected 2) (ArgumentError)
|
I haven't noticed an error on WATG for this and we appear to be using the code. I don't know about the possible impact this change could have. Hopefully @MadelineCollier will remember previous issue and have an idea if something else is needed. |
MadelineCollier
approved these changes
Jun 13, 2024
MadelineCollier
left a comment
There was a problem hiding this comment.
Approved as I understand the general gist of the change and how the Ruby 3x work altered the method signature, however this change definitely requires manual testing across all the stores to ensure this:
a) Fixes the issue on Rowan
b) Doesn't introduce new errors for the other brands.
Thanks for taking this on :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The method signature was originally changed in #15 that made the extension compatible with Ruby 3.x.
The previous version is compatible with Ruby 3.x, while the new one was not equivalent to the old one as it requires the second param, which is irrelevant in the context of the method, to be present.
The new signature poses an issues at least on Rowan, as it prevents payments to be cancelled. This is from Rowan staging: