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"]); }
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.