Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
beasy-mobile
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
G
beasy-mobile
Commits
1d72a5ad
Commit
1d72a5ad
authored
May 28, 2024
by
G
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
makePayment -> orangePaymentTransactionHandler
parent
029c5aa9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
useOrangeMoney.tsx
src/hooks/useOrangeMoney.tsx
+2
-2
PaymentAmountInputScreen.tsx
src/screens/PaymentAmountInputScreen.tsx
+4
-3
No files found.
src/hooks/useOrangeMoney.tsx
View file @
1d72a5ad
...
@@ -107,7 +107,7 @@ const useOrangeMoney = () => {
...
@@ -107,7 +107,7 @@ const useOrangeMoney = () => {
}
}
};
};
const
makePayment
=
async
(
amount
:
number
)
=>
{
const
orangePaymentTransactionHandler
=
async
(
amount
:
number
)
=>
{
try
{
try
{
showModal
(<
LoadingModal
message=
"Initialization de la transaction."
/>);
showModal
(<
LoadingModal
message=
"Initialization de la transaction."
/>);
const
{
payment_url
,
order_id
}
=
const
{
payment_url
,
order_id
}
=
...
@@ -126,7 +126,7 @@ const useOrangeMoney = () => {
...
@@ -126,7 +126,7 @@ const useOrangeMoney = () => {
isWaitingForOmPaymentUrl
:
orangeTransactionInitializerMutation
.
isPending
,
isWaitingForOmPaymentUrl
:
orangeTransactionInitializerMutation
.
isPending
,
isCheckingForTransactionStatus
:
transactionsStatusMutation
.
isPending
,
isCheckingForTransactionStatus
:
transactionsStatusMutation
.
isPending
,
transactionsStatusMutation
,
transactionsStatusMutation
,
makePayment
,
orangePaymentTransactionHandler
,
};
};
};
};
...
...
src/screens/PaymentAmountInputScreen.tsx
View file @
1d72a5ad
...
@@ -31,7 +31,7 @@ const PaymentAmountInputScreen: PaymentStackScreenComponentProps<"paymentAmountI
...
@@ -31,7 +31,7 @@ const PaymentAmountInputScreen: PaymentStackScreenComponentProps<"paymentAmountI
isWaitingForOmPaymentUrl
,
isWaitingForOmPaymentUrl
,
isCheckingForTransactionStatus
,
isCheckingForTransactionStatus
,
transactionsStatusMutation
,
transactionsStatusMutation
,
makePayment
,
orangePaymentTransactionHandler
,
}
=
useOrangeMoney
();
}
=
useOrangeMoney
();
const
insets
=
useSafeAreaInsets
();
const
insets
=
useSafeAreaInsets
();
...
@@ -58,7 +58,8 @@ const PaymentAmountInputScreen: PaymentStackScreenComponentProps<"paymentAmountI
...
@@ -58,7 +58,8 @@ const PaymentAmountInputScreen: PaymentStackScreenComponentProps<"paymentAmountI
log
.
info
(
"OM so we stays on screen !!"
);
log
.
info
(
"OM so we stays on screen !!"
);
// await orangePaymentSequence();
// await orangePaymentSequence();
try
{
try
{
await
makePayment
(
amountToPay
);
await
orangePaymentTransactionHandler
(
amountToPay
);
navigation
.
getParent
()?.
navigate
(
"paymentResultScreen"
);
}
catch
(
error
)
{
}
catch
(
error
)
{
log
.
error
(
"handlePaymentButton |"
,
error
);
log
.
error
(
"handlePaymentButton |"
,
error
);
}
}
...
@@ -70,7 +71,7 @@ const PaymentAmountInputScreen: PaymentStackScreenComponentProps<"paymentAmountI
...
@@ -70,7 +71,7 @@ const PaymentAmountInputScreen: PaymentStackScreenComponentProps<"paymentAmountI
navigation
.
navigate
(
"numberAndOtpForPaymentScreen"
);
navigation
.
navigate
(
"numberAndOtpForPaymentScreen"
);
break
;
break
;
}
}
},
[
paymentType
,
navigation
,
amountToPay
,
makePayment
]);
},
[
paymentType
,
navigation
,
amountToPay
,
orangePaymentTransactionHandler
]);
return
(
return
(
<
BackgroundDefault
>
<
BackgroundDefault
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment