Commit d8bd4dbb by G

cleaning and a little bit of refactoring.

parent f04af7ee
...@@ -54,7 +54,7 @@ const PaymentAmountInputScreen: PaymentStackScreenComponentProps<"paymentAmountI ...@@ -54,7 +54,7 @@ const PaymentAmountInputScreen: PaymentStackScreenComponentProps<"paymentAmountI
Keyboard.dismiss(); Keyboard.dismiss();
log.info("OM so we stays on screen !!"); log.info("OM so we stays on screen !!");
log.info("Calling api with amount :: ", amountToPay); log.info("Calling api with amount :: ", amountToPay);
try {
const { payment_url, order_id } = const { payment_url, order_id } =
await orangeTransactionInitializerMutation.mutateAsync(amountToPay); await orangeTransactionInitializerMutation.mutateAsync(amountToPay);
log.info("Url de paiement orange", payment_url); log.info("Url de paiement orange", payment_url);
...@@ -63,21 +63,11 @@ const PaymentAmountInputScreen: PaymentStackScreenComponentProps<"paymentAmountI ...@@ -63,21 +63,11 @@ const PaymentAmountInputScreen: PaymentStackScreenComponentProps<"paymentAmountI
log.info("Verifying transaction status..."); log.info("Verifying transaction status...");
const response = await transactionsStatusMutation.mutateAsync(order_id); const response = await transactionsStatusMutation.mutateAsync(order_id);
log.info("result of transactions", JSON.stringify(response, null, 2)); log.info("result of transactions", JSON.stringify(response, null, 2));
// log.info( } catch (error) {
// `Was the transaction initialization a success ? ${orangeTransactionInitializerMutation.isSuccess}`, log.error("handlePaymentButton |", error);
// ); //TODO : handle error
// if (orangeTransactionInitializerMutation.isSuccess) { }
// log.info("initilization was a success, checking for status");
// await transactionsStatusMutation.mutateAsync(
// orangeTransactionInitializerMutation.data.order_id,
// );
// log.info(
// "result of transactions",
// JSON.stringify(transactionsStatusMutation.data, null, 2),
// );
// }
// console.log("Response transaction", response);
break; break;
} }
default: default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment