@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/dist/index.mjs CHANGED
@@ -87,7 +87,7 @@ class Emitter {
87
87
  * Production configuration (for merchants)
88
88
  */
89
89
  const productionConfig = {
90
- version: "1.2.1",
90
+ version: "1.2.4",
91
91
  defaultCheckoutOrigin: 'https://buy.paypercut.io',
92
92
  defaultApiOrigin: 'https://api.paypercut.io',
93
93
  defaultVaultApiUrl: 'https://api.basistheory.com',
@@ -758,9 +758,14 @@ class ExpressCheckoutImpl {
758
758
  async fetchExpressConfig() {
759
759
  const apiOrigin = getApiOrigin(this.options.apiUrl);
760
760
  const url = new URL('/v1/elements/sessions', apiOrigin);
761
+ const { amount } = this.options;
761
762
  url.searchParams.set('type', 'deferred_intent');
762
763
  url.searchParams.set('key', this.options.publishableKey);
763
764
  url.searchParams.set('deferred_intent[mode]', 'payment');
765
+ url.searchParams.set('deferred_intent[currency]', this.options.currency);
766
+ if (amount != null) {
767
+ url.searchParams.set('deferred_intent[amount]', `${amount}`);
768
+ }
764
769
  url.searchParams.set('referrer_host', window.location.hostname);
765
770
  try {
766
771
  const res = await fetch(url.toString(), { cache: 'no-store' });