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
3559b180
Commit
3559b180
authored
May 14, 2024
by
G
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup old orange payment code
parent
c23ccfd6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
43 deletions
+0
-43
PaymentAmountInputScreen.tsx
src/screens/PaymentAmountInputScreen.tsx
+0
-43
No files found.
src/screens/PaymentAmountInputScreen.tsx
View file @
3559b180
import
type
{
PaymentStackScreenComponentProps
}
from
"@/navigations/Types"
;
import
{
type
IorangePaymentStarter
,
getTransactionsData
}
from
"@/utils/requests/orangePayment"
;
import
BeasyLogoIcon
from
"@components/BeasyLogoIcon"
;
import
Button
from
"@components/Button"
;
import
GoBackIconButton
from
"@components/GoBackIconButton"
;
...
...
@@ -9,8 +8,6 @@ import BackgroundDefault from "@components/backgrounds/BackgroundDefault";
import
Box
from
"@components/bases/Box"
;
import
Text
from
"@components/bases/Text"
;
import
useOrangeMoney
from
"@hooks/useOrangeMoney"
;
import
{
useMutation
}
from
"@tanstack/react-query"
;
import
*
as
WebBrowser
from
"expo-web-browser"
;
import
{
useCallback
,
useState
}
from
"react"
;
import
{
useSafeAreaInsets
}
from
"react-native-safe-area-context"
;
...
...
@@ -34,46 +31,6 @@ const PaymentAmountInputScreen: PaymentStackScreenComponentProps<"paymentAmountI
return
setAmountToPay
(
0
);
};
const
dummyObject
:
IorangePaymentStarter
=
{
// biome-ignore lint/style/useNamingConvention: <API requirements>
type_paiement
:
1
,
marchand
:
"1"
,
service
:
"1"
,
montant
:
10
,
commentaire
:
"commentaire"
,
numero
:
"0707070707"
,
};
const
omPaymentMutation
=
useMutation
({
mutationFn
:
(
amount
:
number
)
=>
getTransactionsData
({
// biome-ignore lint/style/useNamingConvention: <explanation>
type_paiement
:
1
,
marchand
:
"1"
,
service
:
"1"
,
montant
:
amount
,
numero
:
"0707070707"
,
commentaire
:
"Un commentaire"
,
}),
onSuccess
:
async
(
data
)
=>
{
const
result
=
await
WebBrowser
.
openBrowserAsync
(
data
.
payment_url
);
// setResult(result);
console
.
log
(
"result"
,
result
);
},
onError
:
(
err
)
=>
{
console
.
log
(
"om start error "
,
err
);
},
});
const
_handlePressButtonAsync
=
async
()
=>
{
console
.
log
(
"openning browser ! "
);
const
result
=
await
WebBrowser
.
openBrowserAsync
(
"https://mpayment.orange-money.com/sx/mpayment/abstract/v13r49t9xznfvjxxngu31gz1ecpeenhpaethdyl4psuhzwlws64vvyixqywa8zcf"
,
);
// setResult(result);
console
.
log
(
"result"
,
result
);
};
const
handlePaymentButton
=
useCallback
(()
=>
{
switch
(
paymentType
)
{
case
"OM"
:
...
...
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