skip to Main Content

Shopify HMAC parameter verification failing in Python

I'm having some trouble verifying the HMAC parameter coming from Shopify. The code I'm using per the Shopify documentation is returning an incorrect result. Here's my annotated code: import urllib import hmac import hashlib qs = "hmac=96d0a58213b6aa5ca5ef6295023a90694cf21655cf301975978a9aa30e2d3e48&locale=en&protocol=https%3A%2F%2F&shop=myshopname.myshopify.com&timestamp=1520883022" Parse the querystring…

VIEW QUESTION

shopify hmac verification php

This is my code : function verifyRequest($request, $secret) { // Per the Shopify docs: // Everything except hmac and signature... $hmac = $request['hmac']; unset($request['hmac']); unset($request['signature']); // Sorted lexilogically... ksort($request); // Special characters replaced... foreach ($request as $k => $val) {…

VIEW QUESTION
Back To Top
Search