检查bKash API密钥是否正确或过期。
检查是否正确调用bKash API。
确认是否将IP地址添加到bKash授权列表中。
示例代码:
//调用bKash API $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://checkout.bka.sh/payment"); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_HTTPHEADER, array( "Authorization: $token", "Content-Type: application/json" )); $response = curl_exec($ch); curl_close($ch); if($response) { echo $response; } else { echo "Error Occured!"; }