Test account / success response
This commit is contained in:
@@ -24,6 +24,9 @@ if ( ! function_exists('flutterwave_api'))
|
||||
$reference = str_replace('.','-',$in['id'].'.'.microtime());
|
||||
$out['my_reference'] = $reference;
|
||||
|
||||
//$in['bank_code'] = "044";
|
||||
//$in['account_no'] = "0690000031";
|
||||
|
||||
// Setup request to send json via POST.
|
||||
$payload = json_encode(array(
|
||||
"account_bank" => $in['bank_code'],
|
||||
@@ -49,6 +52,12 @@ if ( ! function_exists('flutterwave_api'))
|
||||
|
||||
$data = json_decode($result, true);
|
||||
|
||||
/*
|
||||
{"account_bank":"044","account_number":"0690000031","amount":"123.00","narration":"Transfer from Olusesan Amey
|
||||
ses66181+1@gmail.com","currency":"NGN","reference":"120-0-97165300 1652605656","debit_currency":"NGN"} //// {"status":200,"statusText":"OK","data":{"status":"success","message":"Transfer Queued Successfully","data":{"id":345332,"account_number":"0690000031","bank_code":"044","full_name":"Forrest Green","created_at":"2022-05-15T09:07:37.000Z","currency":"NGN","debit_currency":"NGN","amount":123,"fee":10.75,"status":"NEW","reference":"120-0-97165300 1652605656","meta":null,"narration":"Transfer from Olusesan Amey
|
||||
ses66181+1@gmail.com","complete_message":"","requires_approval":0,"is_approved":1,"bank_name":"ACCESS BANK NIGERIA"}}}
|
||||
*/
|
||||
|
||||
// Further processing ...
|
||||
if ($data!=null && is_array($data)) {
|
||||
if (array_key_exists('status',$data) && $data['status']=='success') {
|
||||
|
||||
Reference in New Issue
Block a user