Skip to content

Commit

Permalink
chore: added payment id in query params (#813)
Browse files Browse the repository at this point in the history
  • Loading branch information
sakksham7 authored Dec 2, 2024
1 parent 814d5a7 commit 6c525a6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Utilities/PaymentHelpers.res
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ let rec intentCall = (
let url = makeUrl(confirmParam.return_url)
url.searchParams.set("payment_intent_client_secret", clientSecret)
url.searchParams.set("status", "failed")
url.searchParams.set("payment_id", clientSecret->getPaymentId)
messageParentWindow([("confirmParams", confirmParam->anyTypeToJson)])

if statusCode->String.charAt(0) !== "2" {
Expand Down Expand Up @@ -485,6 +486,7 @@ let rec intentCall = (

let url = makeUrl(confirmParam.return_url)
url.searchParams.set("payment_intent_client_secret", clientSecret)
url.searchParams.set("payment_id", clientSecret->getPaymentId)
url.searchParams.set("status", intent.status)

let handleProcessingStatus = (paymentType, sdkHandleOneClickConfirmPayment) => {
Expand Down Expand Up @@ -827,6 +829,7 @@ let rec intentCall = (
try {
let url = makeUrl(confirmParam.return_url)
url.searchParams.set("payment_intent_client_secret", clientSecret)
url.searchParams.set("payment_id", clientSecret->getPaymentId)
url.searchParams.set("status", "failed")
let exceptionMessage = err->formatException
logApi(
Expand Down

0 comments on commit 6c525a6

Please sign in to comment.