confirmCheckout method
Implementation
Future<String?> confirmCheckout({
required Function(String error)? onCheckoutError,
}) async {
isPaymentLoading.value = true;
String? result;
final response = await paymentService.confirmCheckout(
submitModel.orderGroupID,
);
response.fold(
(failure) {
if (onCheckoutError != null) {
onCheckoutError(failure.message);
} else {
onError?.call(failure.message);
}
},
(resp) {
result = resp.jsonResult.orderGroupID;
},
);
isPaymentLoading.value = false;
return result;
}