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

Integration of the Shopify Active Merchant Logic #1

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

thisiscab
Copy link
Contributor

@thisiscab thisiscab commented Aug 10, 2016

This PR contains the logic required for the ShopifyGateway (DynamoMTL/solidus_gateway#1) to be able to void / refund an order.

This will make call the proper calls to the ShopifyAPI and refund / void the order that are there with what is being passed to the Gateway.

Previously that code was residing in the Spree Gateway itself, but in
the end it made more sense to have it there.
We required "login" when it doesn't even exists in our scenario
We had trouble with the gem not being usable due to not requiring the
gem at the top of the Shopify Gateway.
We want to make sure that the order gets correctly refunded or voided
when calling the respective methods.
We are still receiving an error in the API response which makes the test
fail, but in Shopify we see that the order has no errors and has been
correctly refunded. I want to see if this implementation still works
when doing the full cycle.
The amount that is given by solidus is always in cents, we were not
taking that in consideration previously.
For a yet unknown reason, Shopify can return an error object without an
actual error. In that case, we have to check if there is an error
message associated with that object, if there is no error message then
we assume that it has successfully did it's thing.
Since Shopify-Payment gateway uses Stripe and Stripe doesn't support
voiding, we simply use our Refunder object and refund for the total
amount of the order.
@thisiscab thisiscab self-assigned this Aug 10, 2016
@thisiscab thisiscab changed the title Integration of the Shopify Gateway Integration of the Shopify Active Merchant Logic Aug 10, 2016
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.

1 participant