generateChecksum static method
Implementation
static Future<String?> generateChecksum(
{required String token, required String mobile, required double amount, required List product_detail}) async {
final url = Uri.parse(
ApiEndPoint.transectionURL,
);
Map<String, String> header = {'Content-Type': 'application/json', "Authorization": token};
Map<String, dynamic> body = {"MOBILE_NO": mobile, "TXN_AMOUNT": amount, "PRODUCT_DETAILS": product_detail};
String? hashKey;
var result = await http.post(
url,
headers: header,
body: json.encode(body),
);
if (result.statusCode == 200) {
var response = jsonDecode(result.body);
hashKey = response['hash'];
return hashKey;
}
return hashKey;
}