Closed ibn-icena closed 2 years ago
https://github.com/BitDJ/binance-pay-signature-examples
This is related to the signatures. Are you looking for a python example?
The provided link is not available and throws a 404 error. I am looking for an example for validating headers of webhook notifications.
My bad this should be the correct link https://github.com/binance/binance-pay-signature-examples
The example in https://github.com/binance/binance-pay-signature-examples shows how to send a signed request to Binance Pay api but I am looking for an example, where the payment is either accepted or declined and binance servers send a POST request to my servers with encrypted data in headers. These requests must be validated but I was not able to find a similar function in python like
openssl_verify($payload, $decodedSignature, $publicKey, OPENSSL_ALGO_SHA256 ); //in PHP
In the documentation(https://developers.binance.com/docs/binance-pay/webhook-common) there are examples only for java and PHP.
https://github.com/binance/binance-pay-signature-examples/blob/master/python/webhook.py
I have done a demo in python. Hope this helps.
Thank you for the example. It helped me.
Hello,
I would like to verify the headers of webhooks (Order Notification), as it is suggested in the documentation, but the given example codes are in either PHP or java on the documentation page (https://developers.binance.com/docs/binance-pay/webhook-common). Is there any example for verification of Request Header elements especially for BinancePay-Signature?