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

Void and Cancel won't work correctly in the presence of partial refunds #34

Open
jordan-brough opened this issue Aug 17, 2016 · 1 comment

Comments

@jordan-brough
Copy link

jordan-brough commented Aug 17, 2016

Related to #30

Right now Spree::Gateway::Amazon#void and #cancel tell Amazon to refund order.total. This will not be correct if the order has been partially refunded already. Since Amazon allows refunding more than the amount captured it's possible that store could lose money this way.

It's unfortunate that Amazon does have a "refund everything that's left" endpoint, but since they don't I believe payment.credit_allowed is probably the correct thing to use, though my memory is a bit rusty on that.

@acreilly
Copy link

Added these changes:
#30

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

2 participants