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

Cancelling orders where payment has no response code #5713

Open
jackbot opened this issue Dec 5, 2014 · 1 comment
Open

Cancelling orders where payment has no response code #5713

jackbot opened this issue Dec 5, 2014 · 1 comment

Comments

@jackbot
Copy link
Contributor

jackbot commented Dec 5, 2014

One of our payment methods is Paypal which doesn't seem to give a response code when making a transaction, so the payment is saved with no response_code. This is causing issues when cancelling an order, which in turn cancels the payment and calls this line

https://github.com/spree/spree/blob/master/core/app/models/spree/payment/processing.rb#L73

Within the payment method cancel method, we have nil as the response_code and so there's no way to know which payment we're trying to cancel. I assume other payment gateways will find the payment in the database by searching against response_code but I'm thinking it would be useful to pass the payment_id into this method too.

@JDutil
Copy link
Member

JDutil commented Dec 9, 2014

Perhaps it should be updated to pass an options hash, and payment_id can be sent as an option. Probably response_code should be sent as an option as well. I can imagine many scenarios where just the response code wouldn't be sufficient like bitcoin or apple pay too probably.

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

No branches or pull requests

3 participants