Flutterwave/flutterwave-flutter

Flutterwave get virtual account return amount amount: NaN.

sahildev001 opened this issue · 0 comments

Flutterwave get virual account api return "amount" : NAN

virtual account documentation i used

Document API and response

  • Get virtual account

var axios = require('axios');


var config = {
  method: 'GET',
  url: '{{BASE_API_URL}}/virtual-account-numbers/-RND_2641579516055928',
  headers: { 
    'Authorization': 'Bearer FLWSECK_TEST-SANDBOXDEMOKEY-X'
  },
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

});
  • Response

{
    "status": "success",
  "message": "Virtual nuban fetched",
  "data": {
    "response_code": "02",
    "response_message": "Transaction in progress",
    "flw_ref": "FLW-9b04c88aaf2244379f256691836fd9c9",
    "order_ref": "URF_1579513580629_5981535",
    "account_number": "7826463244",
    "frequency": "5",
    "bank_name": "WEMA BANK",
    "created_at": "2020-01-20 09:46:23",
    "expiry_date": "2020-01-25 23:59:59",
    "note": "Please make a bank transfer to Earth Gang",
    "amount": 50700
  }
}

I do API call in same way but my response is changed. I receive amount NAN

  • Get virtual account Response

{
	status: 'success',
	message: 'Virtual nuban fetched',
	data: {
		response_code: '02',
		response_message: 'Transaction in progress',
		flw_ref: 'FLW-1017935150FsDotSVN2urIEnndhM3vuk9',
		order_ref: 'URF_1653578334354_1640935',
		account_number: '-------------',  //I removed.
		account_status: 'ACTIVE',
		frequency: 'N/A',
		bank_name: 'Sterling BANK',
		created_at: '2022-05-26 16:19:00',
		expiry_date: 'N/A',
		note: 'Please make a bank transfer to Ifeanyi Orakwue  FLW',
		amount: 'NaN'
	}
}