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

Payment notification fixes #2

Merged
merged 2 commits into from
Jun 24, 2020
Merged

Conversation

cjreeve
Copy link

@cjreeve cjreeve commented Jun 10, 2020

This pull requests resolves the following issues:

  1. failure notifications did not update payment with their psp_reference
  2. sometimes a failure event arrived after a new 'checkout' payment and was creating an error when the notification attempted to mark the new payment as failed

Pivotal #173032752

@cjreeve cjreeve force-pushed the 173032752-payment-notification-fixes branch from ca8b9d2 to 2ab069b Compare June 11, 2020 12:33
Sometimes a customer creates a new checkout payment before failure event is received.
@cjreeve cjreeve requested a review from jarednorman June 11, 2020 13:58
@cjreeve
Copy link
Author

cjreeve commented Jun 11, 2020

I haven't got the tests running for this yet.

@cjreeve cjreeve merged commit 057647c into master Jun 24, 2020
spaghetticode added a commit that referenced this pull request Jun 13, 2024
The old 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)
spaghetticode added a commit that referenced this pull request Jun 13, 2024
The old 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)

The signature change happened in #15.
spaghetticode added a commit that referenced this pull request Jun 13, 2024
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)
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.

2 participants