safaricom / mpesa-php-sdk

A PHP sdk for the new Mpesa RESTful APIs
188 stars 219 forks source link

TransactionCallbacks result for c2b has the same value for both key and value #39

Open midigofrank opened 5 years ago

midigofrank commented 5 years ago

This is the result: { "20190630070754":"20190630070754", "100.00":"100.00", "603005":"603005", "acb":"acb", "254708374149":"254708374149", "NFU51H9FM1":"NFU51H9FM1" }

This is the code from the callbacks: $result=[$transTime=>$transTime, $transAmount=>$transAmount, businessShortCode=>$businessShortCode, $billRefNumber=>$billRefNumber, $invoiceNumber=>$invoiceNumber, $orgAccountBalance=>$orgAccountBalance, $thirdPartyTransID=>$thirdPartyTransID, $MSISDN=>$MSISDN, $firstName=>$firstName, $lastName=>$lastName, $middleName=>$middleName, $transID=>$transID, $transactionType=>$transactionType ];

The keys should be enclosed in a string

midigofrank commented 5 years ago

Actually i don't see a need for the two functions: processC2BRequestValidation() and processC2BRequestConfirmation(). The return value is same as the input value.