SatSale

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 67d3f146acd02451f676ce65a40669e1c65c9468
parent b78727a9d5256c5573e0ab0d84660e29fc5826d7
Author: NicholasFarrow <nicholas.w.farrow@gmail.com>
Date:   Fri, 22 Jan 2021 23:01:31 +1100

broken key variables in webhook

Diffstat:
Mgateways/woo_webhook.py | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gateways/woo_webhook.py b/gateways/woo_webhook.py @@ -6,7 +6,7 @@ import time import requests def hook(btcpyment_secret, payload, payment): - key = codecs.decode(secret, 'hex') + key = codecs.decode(btcpyment_secret, 'hex') # Calculate a secret that is required to send back to the # woocommerce gateway, proving we did not modify id nor amount. @@ -18,7 +18,6 @@ def hook(btcpyment_secret, payload, payment): params = {"wc-api":"wc_btcpyment_gateway", 'id' : payload['id'], 'time' : str(paid_time)} message = (str(paid_time) + '.' + json.dumps(params, separators=(',', ':'))).encode('utf-8') - key = codecs.decode(btcpyment_secret, 'hex') hash = hmac.new(key, message, hashlib.sha256).hexdigest() headers={'Content-Type': 'application/json', 'X-Signature' : hash, 'X-Secret': secret}