Skip to content

Commit

Permalink
fix: sPAY initialisation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanskar2001 committed Oct 21, 2024
1 parent 82902e3 commit d7e156c
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/hooks/SamsungPay.res
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,17 @@ let useSamsungPayValidityHook = () => {

React.useEffect2(() => {
switch (val.contents, isSamsungPayAvailable, allApiData.sessions) {
| (Not_Started, false, _) => val := Invalid
| (_, false, _) =>
setState(_ => {
val := Invalid
Invalid
})
| (Not_Started, true, Some(_)) => {
val := Checking
setState(_ => Checking)
if SamsungPayModule.isAvailable {
setState(_ => {
val := Checking
Checking
})
if isSamsungPayAvailable {
SamsungPayModule.checkSamsungPayValidity(stringifiedSessionToken, status => {
if status->ThreeDsUtils.isStatusSuccess {
setState(
Expand Down

0 comments on commit d7e156c

Please sign in to comment.