pluspeople / pesaPi

PesaPI is an API for mobile money systems across Africa. Using PesaPI you can save considerable time and effort when integrating mobile money systems into your application, making it easy for your application to detect when a payment has been received. Full details on http://www.pesapi.com
382 stars 240 forks source link

Fatal Error Caused by Decimal Value #15

Open PaulKish opened 8 years ago

PaulKish commented 8 years ago

See the response below

Fatal error</b>: Call to a member function setReceipt() on null in <b>/../pesapi/include/PLUSPEOPLE/PesaPi/MpesaPrivate/MpesaPrivate.php</b> on line <b>67</b><br />

The message that triggered this error is XXXXXXXX Confirmed.You have received Ksh1,030.00 from XXXX XXXXX 0712345678 on 10/3/16 at 9:26 PM New M-PESA balance is Ksh1,079.65. Pay bills via M-PESA.

I noticed that the smsyc works well if the decimal value is zero e.g Ksh1,079.00 and not Ksh1,079.65

PaulKish commented 8 years ago

Added a possible fix with the following pull request #16