@kiva/kv-shop 1.5.1 → 1.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -137,7 +137,8 @@ async function executeOneTimeCheckout({
137
137
  if (result.errors?.length) {
138
138
  throw parseShopError(result.errors[0]);
139
139
  }
140
- window.location.href = `/checkout/post-purchase?kiva_transaction_id=${transactionId}`;
140
+ const checkoutId = result.data?.checkoutStatus?.receipt?.checkoutId;
141
+ window.location.href = `/checkout/post-purchase?kiva_transaction_id=${checkoutId}`;
141
142
  }
142
143
 
143
144
  export {
package/dist/index.cjs CHANGED
@@ -612,7 +612,8 @@ async function executeOneTimeCheckout({
612
612
  if (result.errors?.length) {
613
613
  throw parseShopError(result.errors[0]);
614
614
  }
615
- window.location.href = `/checkout/post-purchase?kiva_transaction_id=${transactionId}`;
615
+ const checkoutId = result.data?.checkoutStatus?.receipt?.checkoutId;
616
+ window.location.href = `/checkout/post-purchase?kiva_transaction_id=${checkoutId}`;
616
617
  }
617
618
 
618
619
  // src/subscriptionCheckout.ts
package/dist/index.js CHANGED
@@ -24,7 +24,7 @@ import {
24
24
  } from "./chunk-FCAOCO7O.js";
25
25
  import {
26
26
  executeOneTimeCheckout
27
- } from "./chunk-EJ5NGYPO.js";
27
+ } from "./chunk-YKNBQR27.js";
28
28
  import {
29
29
  validatePreCheckout,
30
30
  validatePreCheckoutMutation
@@ -429,7 +429,8 @@ async function executeOneTimeCheckout({
429
429
  if (result.errors?.length) {
430
430
  throw parseShopError(result.errors[0]);
431
431
  }
432
- window.location.href = `/checkout/post-purchase?kiva_transaction_id=${transactionId}`;
432
+ const checkoutId = result.data?.checkoutStatus?.receipt?.checkoutId;
433
+ window.location.href = `/checkout/post-purchase?kiva_transaction_id=${checkoutId}`;
433
434
  }
434
435
  // Annotate the CommonJS export names for ESM import in node:
435
436
  0 && (module.exports = {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  executeOneTimeCheckout
3
- } from "./chunk-EJ5NGYPO.js";
3
+ } from "./chunk-YKNBQR27.js";
4
4
  import "./chunk-JBQ2KNMP.js";
5
5
  import "./chunk-CBJJUUVR.js";
6
6
  import "./chunk-2NC7LGGO.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-shop",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -53,5 +53,5 @@
53
53
  "optional": true
54
54
  }
55
55
  },
56
- "gitHead": "2c7054617fe956199335addc794ce7ac78003dab"
56
+ "gitHead": "b4fd4b1a39ead26cca9aed076f47b8ffcbc5872a"
57
57
  }