|
Welcome,
Guest
|
|
|
Find it here; https://github.com/itsmrwave/pesapal-php
I encountered a couple of issues integrating Pesapal, I'll list them below; Issue #1 This; include_once('oauth.php');Should be (because of case sensitivity); include_once('OAuth.php');Issue #2 This; $pesapalNotification=$_GET['pesapal_notification_type'];Should be this instead since we are assigning not comparing; $pesapalNotification = $_GET['pesapal_notification_type'];Issue #3 Demo endpoint in the IPN listener should not be HTTPS. Issue #4 On the demo code, you have this when getting the transaction status; $request_status->sign_request($this->signature_method, $consumer, $token);This results in an error .. for example, $this in code was my class which had no signature_method. Checking the iframe code there was this; $iframe_src -> sign_request($signature_method, $consumer, $token);where $signature_method had been defined as; $signature_method = new OAuthSignatureMethod_HMAC_SHA1();The line above is missing in the IPN listener code so the signature method is undefined. Issue #5 While the code was a very good guide in making the API requests for the IPN listener it isn't clear on what to do after getting the $status. In fact … I had to echo $status to finally piece together that it was the response. Seems obvious but extra commentary would go a long way which I've included. The code for this part is too big to include in this email so have a look at this link for the IPN listener code from Line 62 there; https://github.com/itsmrwave/pesapal-php/blob/master/pesapal-ipn-listener.php#L62 It describes to a bit more details what response to expect from pesapal and what to do. IE … from what I gathered;
Issue #6 Not really an issue but I just improved readability a bit … breaking long statements to a new lines … formatting …. indentation … enation of strings etc. |
|
|
|
I like the way you have documented yours.
|
|
The following user(s) said Thank You: kaiguara
|
|
Please see fix for a bug that makes amounts higher than 999 not reflect the figure that should be input by the user.
For example ... 1000 becomes KES 1.0 in the form ... this is because the number_format introduces a comma which Pesapal interprets as a '.' See here ... github.com/itsmrwave/pesapal-php/commit/...09f05392083487734bf7 |
|
Last Edit: 12 years, 7 months ago by . Reason: update
|
|