|
Welcome,
Guest
|
|
|
Iam trying to integrate pesapal using python but its returning
Problem: signature_invalid | Advice: > | yet everything seems to be okay. Below is my code. #pesapal integration pesapal.consumer_key = 'xxxxxx' pesapal.consumer_secret = 'xxxx' pesapal.testing = True ### post a direct order post_params = { 'oauth_callback': '0.0.0.0:5000/dashboard' } request_data = { 'Amount':request.params['money'], 'Description':'E-book purchase', 'Type':'MERCHANT', 'Reference':'413', 'PhoneNumber':request.params['phone'], 'Currency':'UGX', 'FirstName':'', 'LastName':'', 'Email':'', 'LineItems':'' } # build url to redirect user to confirm payment url = pesapal.postDirectOrder(post_params, request_data) |
|
Last Edit: 10 years, 8 months ago by lazro. Reason: Consumer key and secret had been exposed.
|
|
Hi Mowzey,
That message is received for the most part when a wrong consumer secret, currency has been set. Check to see that the consumer secret set is the correct one, and also if the currency is ISO format. Counter check also that all the parameters you are using to build URL with are valid according to our documentation which can be found on the link below. developer.pesapal.com/how-to-integrate/step-by-step |
|
Last Edit: 10 years, 8 months ago by MaryCagell.
|
|
Hi Odhiambo,
I have counter checked all those you have hinted about and they look fine as seen from the code i pasted before but still its bringing the invalid signature error. |
|
|
|
Hello Mowzey,
Change that callback URL to link to some page in your server. Your OAuth could be generating some invalid signature as a result of: 1. Posting some invalid Parameters to PesaPal 2. You are using the wrong consumer secret. 3. The OAuth version you are using in not the one PesaPal expects you to use. Please have a look at this Python library, it may help you solve the issue at hand. github.com/kelonye/python-pesapal |
|
Regards,
Lazaro Ong'ele Web Developer Skype: Lazrotep +254-020-249-5438 ; +254-706-191-729 Dagoretti Lane, Off Naivasha Road. Facebook: www.facebook.com/pesapal Twitter: twitter.com/PesaPal Helpdesk: support.pesapal.com This e-mail address is being protected from spambots. You need JavaScript enabled to view it. |
|