Skip to content

Commit a8d3496

Browse files
committed
feat: add checkout.com session after return from 3ds
1 parent 4e6cc5f commit a8d3496

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

components/composite/StepPlaceOrder/index.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,16 @@ const StepPlaceOrder: React.FC<Props> = ({
4646
if (!appCtx) {
4747
return null
4848
}
49+
let paypalPayerId = ""
50+
let checkoutComSession = ""
51+
52+
if (query.PayerID) {
53+
paypalPayerId = query.PayerID as string
54+
}
55+
56+
if (query["cko-session-id"]) {
57+
checkoutComSession = query["cko-session-id"] as string
58+
}
4959

5060
const { placeOrder } = appCtx
5161

@@ -133,7 +143,8 @@ const StepPlaceOrder: React.FC<Props> = ({
133143
</ErrorsContainer>
134144
<PlaceOrderContainer
135145
options={{
136-
paypalPayerId: query?.PayerID as string,
146+
paypalPayerId,
147+
checkoutCom: { session_id: checkoutComSession },
137148
}}
138149
>
139150
<>

0 commit comments

Comments
 (0)