Skip to content

Commit

Permalink
Error Codes Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdullahValley authored Jan 20, 2019
1 parent d3cbd36 commit edf4e56
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions bKash-for-Raw-PHP.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,20 @@

curl_close($curl);

if ($err) {
echo $err;
}
//print_r($response); // For Getting all Response Data.

$api_response = json_decode ($response, true); // Getting Response from bKash API.

$transaction_status = $api_response['transaction']['trxStatus']; // Transaction Status Codes


if ($err || $transaction_status == "4001") {
echo 'Problem for Sending Response to bKash API ! Try Again after fews minutes.';
}
else
{
$api_response = json_decode ($response, true); // Getting Response from bKash API

//print_r($response); // For Getting all Response Data

// Assign Transaction Information

$transaction_status = $api_response['transaction']['trxStatus']; // Transaction Status Codes

$transaction_amount = $api_response['transaction']['amount']; // bKash Payment Amount

$transaction_reference = $api_response['transaction']['reference']; // bKash Reference for Invoice ID
Expand Down

0 comments on commit edf4e56

Please sign in to comment.