Pesapal.com

Forum

Welcome, Guest
Username
Password:
 

Invalid Signature
(1 viewing) (1) Guest
Welcome to the Pesapal integration forum!

This forum discusses everything about Pesapal integration on your web site. Having any problems? This is the right place to post a question and we are sure you will get an answer
  • Page:
  • 1

TOPIC: Invalid Signature

Invalid Signature 10 years, 8 months ago #1299

  • Mowzey
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
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.

Re: Invalid Signature 10 years, 8 months ago #1300

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.

Re: Invalid Signature 10 years, 8 months ago #1301

  • Mowzey
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
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.

Re: Invalid Signature 10 years, 8 months ago #1302

  • lazro
  • OFFLINE
  • Administrator
  • Pesapal
  • Posts: 404
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.
  • Page:
  • 1