@funnelfox/payments-sdk 0.1.2-beta.3 → 0.1.2-beta.5

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.cjs CHANGED
@@ -89,7 +89,8 @@ var StripeCheckoutService = class extends HttpService {
89
89
  managed: params.managed,
90
90
  customer_id: params.customerId,
91
91
  customer: params.customer,
92
- return_url: params.returnUrl
92
+ return_url: params.returnUrl,
93
+ allow_promotion_codes: params.allowPromoCodes
93
94
  });
94
95
  if (!data.client_secret) {
95
96
  throw new CheckoutError("Backend returned no client_secret");
@@ -174,7 +175,8 @@ var StripeProvider = class {
174
175
  subscriptionId: session.subscription_id ?? void 0,
175
176
  invoiceId: session.invoice_id ?? void 0,
176
177
  amountPaid: session.amount_total ?? void 0,
177
- currency: session.currency ?? void 0
178
+ currency: session.currency ?? void 0,
179
+ email: session.email ?? void 0
178
180
  });
179
181
  } catch {
180
182
  this.callbacks.onComplete?.({ provider: "stripe" });
package/dist/index.d.cts CHANGED
@@ -23,6 +23,8 @@ interface StripeConfig {
23
23
  customer?: StripeCustomer;
24
24
  /** URL to redirect to after payment completes. Defaults to window.location.href for embedded checkout. */
25
25
  returnUrl?: string;
26
+ /** When true, Stripe displays a promotional code input field in the embedded checkout */
27
+ allowPromoCodes?: boolean;
26
28
  }
27
29
 
28
30
  interface FastSpringConfig {
@@ -59,6 +61,7 @@ interface CheckoutCompleteEvent {
59
61
  invoiceId?: string;
60
62
  amountPaid?: number;
61
63
  currency?: string;
64
+ email?: string;
62
65
  }
63
66
  interface CheckoutErrorEvent {
64
67
  provider: ProviderName;
package/dist/index.d.ts CHANGED
@@ -23,6 +23,8 @@ interface StripeConfig {
23
23
  customer?: StripeCustomer;
24
24
  /** URL to redirect to after payment completes. Defaults to window.location.href for embedded checkout. */
25
25
  returnUrl?: string;
26
+ /** When true, Stripe displays a promotional code input field in the embedded checkout */
27
+ allowPromoCodes?: boolean;
26
28
  }
27
29
 
28
30
  interface FastSpringConfig {
@@ -59,6 +61,7 @@ interface CheckoutCompleteEvent {
59
61
  invoiceId?: string;
60
62
  amountPaid?: number;
61
63
  currency?: string;
64
+ email?: string;
62
65
  }
63
66
  interface CheckoutErrorEvent {
64
67
  provider: ProviderName;
package/dist/index.js CHANGED
@@ -62,7 +62,8 @@ var StripeCheckoutService = class extends HttpService {
62
62
  managed: params.managed,
63
63
  customer_id: params.customerId,
64
64
  customer: params.customer,
65
- return_url: params.returnUrl
65
+ return_url: params.returnUrl,
66
+ allow_promotion_codes: params.allowPromoCodes
66
67
  });
67
68
  if (!data.client_secret) {
68
69
  throw new CheckoutError("Backend returned no client_secret");
@@ -147,7 +148,8 @@ var StripeProvider = class {
147
148
  subscriptionId: session.subscription_id ?? void 0,
148
149
  invoiceId: session.invoice_id ?? void 0,
149
150
  amountPaid: session.amount_total ?? void 0,
150
- currency: session.currency ?? void 0
151
+ currency: session.currency ?? void 0,
152
+ email: session.email ?? void 0
151
153
  });
152
154
  } catch {
153
155
  this.callbacks.onComplete?.({ provider: "stripe" });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funnelfox/payments-sdk",
3
- "version": "0.1.2-beta.3",
3
+ "version": "0.1.2-beta.5",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",