makePayment method
Future<String?>
makePayment(
- String? encryptedTransactionDetails,
- String? encryptedPgDetails,
- String? encryptedCardDetails,
- String? encryptedUserDetails,
- String? billDetails,
- String? shipDetails,
- String? itemDetails,
- String? otherDetails,
- String merchantId,
- BuildContext context,
)
Implementation
Future<String?> makePayment(
String? encryptedTransactionDetails,
String? encryptedPgDetails,
String? encryptedCardDetails,
String? encryptedUserDetails,
String? billDetails,
String? shipDetails,
String? itemDetails,
String? otherDetails,
String merchantId,
BuildContext context) async {
// loaderController.add(true);
String? responseData = await appRepository
.makePayment(
encryptedTransactionDetails!,
encryptedPgDetails!,
encryptedCardDetails!,
encryptedUserDetails!,
billDetails!,
shipDetails!,
itemDetails!,
otherDetails!,
merchantId)
.then((Response response) async {
//debugPrint('Make Payment api response is ${response.body}');
// loaderController.add(false);
if (response.statusCode == 200) {
return response.body;
}
return null;
}, onError: (dynamic e) {
// loaderController.add(false);
//debugPrint('Make Payment api exception is ${e.toString()}');
return null;
});
return responseData;
}