validateEwalletOtpPayment method

Future<IBinoxusPayOnResponse> validateEwalletOtpPayment({
  1. required Map<String, dynamic> body,
  2. required String token,
})

Implementation

Future<IBinoxusPayOnResponse> validateEwalletOtpPayment(
    {required Map<String, dynamic> body, required String token}) async {
  try {
    Map<String, String> headers = {
      "mb-token": token,
    };
    String url = "/pay/validate-ewallet-otp-payment";
    // _spinnerController.add(true);
    final res = await postWithDio(url, body: body, headers: headers);
    return IBinoxusPayOnResponse.fromJson(res);
  } catch (e, stack) {
    // _spinnerController.add(false);
    debugPrint('Error during fetch operations: $e');
    debugPrint('Stack trace: $stack');
    return IBinoxusPayOnResponse(
        binStatus: EApiResponseStatusCode.bIN001,
        amount: 0,
        currency: '-',
        customRef: '-',
        paymentStatus: IPaymentStatus.fail,
        title: "Oups !",
        message:
            "Une erreur est survenue lors de cette opération, veuillez réessayer",
        systemRef: '');
  }
}