Created
August 31, 2017 21:18
-
-
Save mfifth/92d95ef25f17d35c1c935eeab251afb6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def self.send_order(order, shopify_signature) | |
| shop = Shop.first | |
| headers = { | |
| "X-Shopify-Topic" => "orders/paid", | |
| "X-Shopify-Hmac-Sha256" => shopify_signature, | |
| "X-Shopify-Shop-Domain" => shop.shopify_domain, | |
| "X-Shopify-Order-Id" => order.id, | |
| "X-Request-Id" => 'some-value', | |
| 'Content-Type' => 'application/json', | |
| 'Accept' => 'application/json' | |
| } | |
| url = 'https://fastserver-jaxrs-dev.fastmodelsports.com/shopify/order/payment' | |
| results = HTTParty.post(url, headers: headers, body: order) | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment