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
a2ef1df3
Commit
a2ef1df3
authored
May 17, 2024
by
G
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use new renamed method from useOrangeMoney : getOmPaymentUrl
parent
8e81b972
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
PaymentAmountInputScreen.tsx
src/screens/PaymentAmountInputScreen.tsx
+7
-4
No files found.
src/screens/PaymentAmountInputScreen.tsx
View file @
a2ef1df3
...
...
@@ -18,10 +18,13 @@ const PaymentAmountInputScreen: PaymentStackScreenComponentProps<"paymentAmountI
const
{
paymentType
}
=
route
.
params
;
const
[
amountToPay
,
setAmountToPay
]
=
useState
(
0
);
const
{
omPaymentMutation
:
orangePaymentMutation
}
=
useOrangeMoney
();
const
{
getOmPaymentUrl
,
isBrowserOpen
,
isWaitingForOmPaymentUrl
}
=
useOrangeMoney
();
const
insets
=
useSafeAreaInsets
();
console
.
log
(
"isWaitingForPaymentUrl"
,
isWaitingForOmPaymentUrl
);
console
.
log
(
"isBrowserOpen"
,
isBrowserOpen
);
const
updateAmountToPay
=
(
amount
:
string
)
=>
{
const
amountParsed
=
Number
.
parseInt
(
amount
);
if
(
!
Number
.
isNaN
(
amountParsed
))
{
...
...
@@ -36,13 +39,13 @@ const PaymentAmountInputScreen: PaymentStackScreenComponentProps<"paymentAmountI
case
"OM"
:
console
.
log
(
"OM so we stays on screen !!"
);
console
.
log
(
"Calling api with amount :: "
,
amountToPay
);
orangePaymentMutation
.
mutate
(
amountToPay
);
getOmPaymentUrl
(
amountToPay
);
break
;
default
:
navigation
.
navigate
(
"numberAndOtpForPaymentScreen"
);
break
;
}
},
[
amountToPay
,
orangePaymentMutation
,
paymentType
,
navigation
]);
},
[
amountToPay
,
getOmPaymentUrl
,
paymentType
,
navigation
]);
return
(
<
BackgroundDefault
>
...
...
@@ -96,7 +99,7 @@ const PaymentAmountInputScreen: PaymentStackScreenComponentProps<"paymentAmountI
onPress=
{
handlePaymentButton
}
variant=
{
"full"
}
textVariants=
{
"primary"
}
label=
"Payer"
label=
{
`${isWaitingForOmPaymentUrl ? "Chargement..." : "Payer"} `
}
/>
</
Box
>
</
Box
>
...
...
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