diff --git a/src/hooks/useOrangeMoney.tsx b/src/hooks/useOrangeMoney.tsx
index 3612365..f8dba8a 100644
--- a/src/hooks/useOrangeMoney.tsx
+++ b/src/hooks/useOrangeMoney.tsx
@@ -5,6 +5,7 @@ import {
getTransactionsData,
} from "@/utils/requests/orangePayment";
import ErrorModal from "@components/modals/ErrorModal";
+import InformationModal from "@components/modals/InformationModal";
import LoadingModal from "@components/modals/LoadingModal";
import { LOG } from "@logger";
@@ -65,13 +66,13 @@ const useOrangeMoney = () => {
onError: (err) => {
log.error("transactionsStatusMutation |", err);
},
- retry: (failureCount, error) => {
- log.warn("transactionsStatusMutation | retrying", failureCount, error);
- return failureCount < maxRetry;
- },
- retryDelay(_failureCount, _error) {
- return retryDelay;
- },
+ // retry: (failureCount, error) => {
+ // log.warn("transactionsStatusMutation | retrying", failureCount, error);
+ // return failureCount < maxRetry;
+ // },
+ // retryDelay(_failureCount, _error) {
+ // return retryDelay;
+ // },
});
const openBrowserThenCheckStatus = async (paymentUrl: string, orderId: string) => {
@@ -85,7 +86,15 @@ const useOrangeMoney = () => {
if (error instanceof Error) {
if (error.name === "ORANGE_PAYMENT_IN_PROGRESS") {
log.warn("handlePaymentButton | ORANGE_PAYMENT_IN_PROGRESS");
- showModal();
+ showModal(
+
+ await openBrowserThenCheckStatus(paymentUrl, orderId)
+ }
+ />,
+ );
} else if (error.name === "ORANGE_PAYMENT_FAILED") {
showModal();
log.error("handlePaymentButton | ORANGE_PAYMENT_FAILED");