|
Welcome,
Guest
|
|
|
Hey!
It looks like pesapal's oauth implementation is not accepting encoded special characters in the consumer key (at least for demo.pesapal.com/api/* ) as shown here: Has anyone else come across this or is it just me doing the wrong thing? |
|
The following user(s) said Thank You: msummer, evanomondi
|
|
We are seeing the same problem here.
Maybe Pesapal can shed some light on this? Thanks! Mark |
|
|
|
Hello,
Please have a look at this thread: developer.pesapal.com/forum/2-pesapal-in...he-consumer-key#1208 You are either using incorrect keys (check that you have no spaces) or you are using keys that belong to a demo Merchant on the live API or vice versa. |
|
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. |
|
Hi Lazro,
Thanks a lot for the response. But I'm certain we are not "mixing" up the keys. I seems to be related to the oAuth encoding and specifically to special characters in the key like +-/ etc. In order to troubleshoot the problem is it possible for you to generate a consumer key for our demo.pesapal.com account that does not contain a special character. That way we can pin point the problem and work on a solution? Thanks, Mark |
|
|
|
Hi,
Unfortunately we cannot generate one without the special characters. Try see if this OAuth file will sort you out. I hope my assumption that you are using Java is correct :-) |
|
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.
Last Edit: 10 years ago by lazro.
The following user(s) said Thank You: msummer
|
|
Hi,
Unfortunately we're not using Java - we are working with nodejs - specifically this module: github.com/aksalj/pesapaljs The author of this module is the one that actually started the thread. Any specific pointers for nodejs to look at? Also it seems the jar file was not attached properly - I see a file not found error in your post. Thanks, Mark |
|
|
|
We don't have the nodejs Oauth file. we'll have a look at this and share.
|
|
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.
The following user(s) said Thank You: msummer
|
|
lazro I posted some details in the Github thread here. That API call is failing no matter if the "+" is encoded as %20 or %2B. I am 100% positive of this. And this is the only API call that fails, and all the encoding is consistent on our side using aksalj's library.
This is being tested against the PesaPal demo environment. |
|
Last Edit: 10 years ago by clarkritchie.
|
|
Hi Lazro,
We have done some more testing and have traces of all the exchanges between our application and the demo Pesapal server. I hope this will help you track down the problem - either on our side or your side. Here is a flow: On our side we initiate a payment request: We submit payment using: demo.pesapal.com/mobilemoneytest Then query payment details using the phone number of the customer and confirmation code from pesapal using this HTTP GET URL and headers below: And this is the response we get from demo.pesapal.com: As you can see the consumer key is encoded in both HTTP GET transactions the same way: I hope this will help you tack down the problem. Thanks! Mark |
|
The following user(s) said Thank You: aksalj
|
|
@lazro Any update on this? PesaPal simply does not work, and we cannot proceed. We will have to go direct against the MPesa API if we can't get this sorted out in the next few days. Thanks for your help!
|
|
|
|
Hello Clarkritchie,
We currently do not have the node.js Oauth file. We'll share the same as soon as we have a working version. Apologies for the inconvenience. |
|
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. |
|
What does that even mean, "the node.js Oauth file"? The issue as we've described here is that keys with a "+" character in it fail on one (and only one) of your API end points. That should be really easy to replicate on your end, it really has nothing to do with NodeJS.
|
|
|
|
Hello clarkritchie,
NodeJs's OAuth files encodes the keys differently hence what PesaPal get's is not correct. We'll work on the OAuth that encodes the expected value. Please note that we cannot remove the "+" on the system. |
|
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. |
|
Hey Lazro!
Like @clarkritchie says, it appears your implementation of OAuth 1.0 is not consistent with the standard; It has nothing to do with nodejs or whatever you call "node.js OAuth files". Besides, why are you generating keys with special characters if your API won't accept them? Maybe if you could let a member of your dev team know about this issue, we would understand each other better. |
|
|
|
Hello aksalj,
The issue has already been forwarded, as soon as we have a working nodejs version the same will be shared. Our dev email is This e-mail address is being protected from spambots. You need JavaScript enabled to view it. |
|
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. |
|