-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong implementation of stk push function #30
Comments
true it keeps throwing error when you add the remarks field |
Was this one fixed? Also, still on the function Another thing I don't understand is the timestamp generation: why the concatenation? |
@AustineGwa was it fixed? |
@AustineGwa @StanleyMasinde @kyien |
1 similar comment
@AustineGwa @StanleyMasinde @kyien |
@jaymoh , |
That's great @mossey. Thanks |
The implementation of stk push function does not match the documentation in the developer portal
Timestamp parameter is missing and there is an added remarks parameter that does not exist in the documentation
this is what the documentation says:
<?php
$curl_post_data = array(
//Fill in the request parameters with valid values
'BusinessShortCode' => ' ',
'Password' => ' ',
'Timestamp' => ' ',
'TransactionType' => 'CustomerPayBillOnline',
'Amount"' => ' ',
'PartyA' => ' ',
'PartyB' => ' ',
'PhoneNumber' => ' ',
'CallBackURL' => 'https://ip_address:port/callback',
'AccountReference' => ' ',
'TransactionDesc' => ' '
);
$data_string = json_encode($curl_post_data);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);
$curl_response = curl_exec($curl);
print_r($curl_response);
echo $curl_response;
?>
The text was updated successfully, but these errors were encountered: