closeSession method
Implementation
Future<http.Response> closeSession(String authCode, String amountCharged,
String sessionId, String volume, String volumeMeasure) async {
var jsonBody = {
"auth_code": authCode,
"session_id": sessionId,
"amount_charged": amountCharged,
"volume": volume,
"volume_measure": volumeMeasure
};
var url = Uri.parse(APIConst.closeSession);
Map<String, String> headers = {
"Content-type": "application/x-www-form-urlencoded",
'Accept': 'application/json'
};
log('CLOSE_SESSION_REQUEST ::: $url :: $jsonBody');
return await http
.post(url, headers: headers, body: jsonBody)
.timeout(Duration(seconds: timeOutSecond));
}