Skip to content

Commit

Permalink
fix: update with small change
Browse files Browse the repository at this point in the history
  • Loading branch information
prafulkoppalkar committed Apr 26, 2024
1 parent d08d044 commit fb2d5b7
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/orca-loader/Elements.res
Original file line number Diff line number Diff line change
Expand Up @@ -458,13 +458,10 @@ let make = (
->then(json => {
let dict = json->JSON.Decode.object->Option.getOr(Dict.make())
let status = dict->getString("status", "")
if status === "succeeded" || status === "failed" {
Window.Location.replace(
`${url}?payment_intent_client_secret=${clientSecret}&status=${status}`,
)
} else {
Window.Location.replace(url)
}
let returnUrl = dict->getString("return_url", "")
Window.Location.replace(
`${returnUrl}?payment_intent_client_secret=${clientSecret}&status=${status}`,
)
resolve()
})
->catch(_ => {
Expand Down

0 comments on commit fb2d5b7

Please sign in to comment.