Skip to content

Integration of the Shopify Active Merchant Logic#1

Open
thisiscab wants to merge 9 commits into
masterfrom
feature/shopify/prototype-implementation
Open

Integration of the Shopify Active Merchant Logic#1
thisiscab wants to merge 9 commits into
masterfrom
feature/shopify/prototype-implementation

Conversation

@thisiscab
Copy link
Copy Markdown
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