From 38f557435aa43ccc3d7a5295978fcf4d8310d274 Mon Sep 17 00:00:00 2001 From: Joshua Kiwiet-Pantaleoni Date: Thu, 30 Nov 2023 11:33:07 -0800 Subject: [PATCH] fix: use checkout id for pos-purchase call --- @kiva/kv-shop/src/oneTimeCheckout.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/@kiva/kv-shop/src/oneTimeCheckout.ts b/@kiva/kv-shop/src/oneTimeCheckout.ts index aadd1de6..b649601a 100644 --- a/@kiva/kv-shop/src/oneTimeCheckout.ts +++ b/@kiva/kv-shop/src/oneTimeCheckout.ts @@ -177,5 +177,6 @@ export async function executeOneTimeCheckout({ // TODO: redirect needs to handle challenge completion parameters // redirect to thanks page - window.location.href = `/checkout/post-purchase?kiva_transaction_id=${transactionId}`; + const checkoutId = result.data?.checkoutStatus?.receipt?.checkoutId; + window.location.href = `/checkout/post-purchase?kiva_transaction_id=${checkoutId}`; }