@paypercut/checkout-js 1.2.1 → 1.2.4

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.
package/README.md CHANGED
@@ -63,12 +63,12 @@ pnpm add @paypercut/checkout-js
63
63
 
64
64
  ```html
65
65
  <!-- jsDelivr (recommended with SRI) -->
66
- <script src="https://cdn.jsdelivr.net/npm/@paypercut/checkout-js@1.0.16/dist/paypercut-checkout.iife.min.js"
66
+ <script src="https://cdn.jsdelivr.net/npm/@paypercut/checkout-js@1.2.4/dist/paypercut-checkout.iife.min.js"
67
67
  integrity="sha384-..."
68
68
  crossorigin="anonymous"></script>
69
69
 
70
70
  <!-- or UNPKG -->
71
- <script src="https://unpkg.com/@paypercut/checkout-js@1.0.16/dist/paypercut-checkout.iife.min.js"></script>
71
+ <script src="https://unpkg.com/@paypercut/checkout-js@1.2.4/dist/paypercut-checkout.iife.min.js"></script>
72
72
  ```
73
73
 
74
74
  ---
@@ -760,7 +760,7 @@ Tip: Prefer subscribing with the SdkEvent enum for stronger typing.
760
760
  <body>
761
761
  <div id="checkout"></div>
762
762
 
763
- <script src="https://cdn.jsdelivr.net/npm/@paypercut/checkout-js@1.0.16/dist/paypercut-checkout.iife.min.js"></script>
763
+ <script src="https://cdn.jsdelivr.net/npm/@paypercut/checkout-js@1.2.4/dist/paypercut-checkout.iife.min.js"></script>
764
764
  <script>
765
765
  const checkout = PaypercutCheckout({
766
766
  id: '01KB23M9EC960C50G3AH14FTTT',
package/dist/index.cjs CHANGED
@@ -91,7 +91,7 @@ class Emitter {
91
91
  * Production configuration (for merchants)
92
92
  */
93
93
  const productionConfig = {
94
- version: "1.2.1",
94
+ version: "1.2.4",
95
95
  defaultCheckoutOrigin: 'https://buy.paypercut.io',
96
96
  defaultApiOrigin: 'https://api.paypercut.io',
97
97
  defaultVaultApiUrl: 'https://api.basistheory.com',
@@ -762,9 +762,14 @@ class ExpressCheckoutImpl {
762
762
  async fetchExpressConfig() {
763
763
  const apiOrigin = getApiOrigin(this.options.apiUrl);
764
764
  const url = new URL('/v1/elements/sessions', apiOrigin);
765
+ const { amount } = this.options;
765
766
  url.searchParams.set('type', 'deferred_intent');
766
767
  url.searchParams.set('key', this.options.publishableKey);
767
768
  url.searchParams.set('deferred_intent[mode]', 'payment');
769
+ url.searchParams.set('deferred_intent[currency]', this.options.currency);
770
+ if (amount != null) {
771
+ url.searchParams.set('deferred_intent[amount]', `${amount}`);
772
+ }
768
773
  url.searchParams.set('referrer_host', window.location.hostname);
769
774
  try {
770
775
  const res = await fetch(url.toString(), { cache: 'no-store' });