@paypercut/checkout-js 1.1.10 → 1.2.0

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.d.ts CHANGED
@@ -130,12 +130,13 @@ interface CancelPayload {
130
130
  /**
131
131
  * Event names that can be emitted by the checkout
132
132
  */
133
- type EventName = 'loaded' | 'success' | 'error' | 'expired' | 'resize' | 'threeds_complete' | 'threeds_error' | 'threeds_canceled' | 'threeds_started' | 'cancel' | 'form_validation';
133
+ type EventName = 'loaded' | 'processing' | 'success' | 'error' | 'expired' | 'resize' | 'threeds_complete' | 'threeds_error' | 'threeds_canceled' | 'threeds_started' | 'cancel' | 'form_validation';
134
134
  /**
135
135
  * Preferred enum for SDK event names (use instead of hardcoded strings)
136
136
  */
137
137
  declare enum SdkEvent {
138
138
  Loaded = "loaded",
139
+ Processing = "processing",
139
140
  Success = "success",
140
141
  Error = "error",
141
142
  Expired = "expired",
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.1.10",
90
+ version: "1.2.0",
91
91
  defaultCheckoutOrigin: 'https://buy.paypercut.io',
92
92
  defaultApiOrigin: 'https://api.paypercut.io',
93
93
  defaultVaultApiUrl: 'https://api.basistheory.com',
@@ -289,6 +289,7 @@ function validateUIMode(mode) {
289
289
  var SdkEvent;
290
290
  (function (SdkEvent) {
291
291
  SdkEvent["Loaded"] = "loaded";
292
+ SdkEvent["Processing"] = "processing";
292
293
  SdkEvent["Success"] = "success";
293
294
  SdkEvent["Error"] = "error";
294
295
  SdkEvent["Expired"] = "expired";
@@ -1906,6 +1907,11 @@ class CheckoutImpl {
1906
1907
  case 'CHECKOUT_LOADED':
1907
1908
  this.emitter.emit(SdkEvent.Loaded);
1908
1909
  break;
1910
+ case 'CHECKOUT_PROCESSING':
1911
+ this.emitter.emit(SdkEvent.Processing, {
1912
+ checkoutId: data.checkoutId,
1913
+ });
1914
+ break;
1909
1915
  case 'CHECKOUT_SUCCESS':
1910
1916
  const { payment_method = {}, payment = null } = data;
1911
1917
  this.emitter.emit(SdkEvent.Success, { payment_method, payment });