skip to Main Content

Shopify Webhooks Hmac Python verification fails

I am trying to verify the webhook received from Shopify but the Hmac verification fails. def verify_webhook(data, hmac_header): digest = hmac.new(SECRET.encode('utf-8'), data, hashlib.sha256).digest() computed_hmac = base64.b64encode(digest) return hmac.compare_digest(computed_hmac, hmac_header.encode('utf-8')) @app.route('/productCreation', methods=['POST']) def productCreation(): data = request.data verified = verify_webhook( data,…

VIEW QUESTION
Back To Top
Search