Good afternoon @ijsucceed
.
I really love your code for it simplicity. However, i did love to make some corrections starting with the initialize.php.
// this part of the code is wrong since an array is returned, so it should not be
if(!$tranx->status){
// there was an error from the API
print_r('API returned error: ' . $tranx['message']);
}
// the corrected version
if(!$tranx['status']){
print_r('API returned error: ' . $tranx['message']);
}
Thank you.
That is true. I have actually been looking for that too in their documentation.
Also i wanna ask again, how do i send phone number and fullname along side the initialize.php api
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Good afternoon @ijsucceed .
I really love your code for it simplicity. However, i did love to make some corrections starting with the initialize.php.
// this part of the code is wrong since an array is returned, so it should not be
if(!$tranx->status){
// there was an error from the API
print_r('API returned error: ' . $tranx['message']);
}
// the corrected version
if(!$tranx['status']){
print_r('API returned error: ' . $tranx['message']);
}
Thank you.
You're right @holynation .
I just ran some few tests. The actual issue came from the Paystack documentation.
Though it will be hard for one to notice ( including Paystack developers) since the page gets redirected to the checkout form.
Thanks.
That is true. I have actually been looking for that too in their documentation.
Also i wanna ask again, how do i send phone number and fullname along side the initialize.php api