safaricom / mpesa-php-sdk

A PHP sdk for the new Mpesa RESTful APIs
187 stars 215 forks source link

STK PUSH Minor Bug #6

Closed kievo23 closed 6 years ago

kievo23 commented 6 years ago

Kindly guys, I love the work u guys are doing. However, there is a bug on stkPush part. public function STKPushSimulation($BusinessShortCode, $LipaNaMpesaPasskey, $TransactionType, $Amount, $PartyA, $PartyB, $PhoneNumber, $CallBackURL, $AccountReference, $TransactionDesc, $Remark){ $live=env("application_status"); if( $live =="true"){ $url = 'https://api.safaricom.co.ke/mpesa/stkpush/v1/processrequest'; $token=self::generateLiveToken(); }elseif ($live=="sandbox"){ $url = 'https://sandbox.safaricom.co.ke/mpesa/stkpush/v1/processrequest'; $token=self::generateSandBoxToken(); }else{ return json_encode(["Message"=>"invalid application status"]); }

Under if( $live =="true"){ true should be live.

mossey commented 6 years ago

Noted and resolved @kievo23