@getopenpay/openpay-js-react 0.2.18 → 0.2.21
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/.tsbuildinfo +1 -1
- package/dist/index.d.ts +31 -16
- package/dist/index.js +1185 -1144
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -192,10 +192,7 @@ export declare type ElementsFormChildrenProps = {
|
|
|
192
192
|
googlePay: InitAirwallexGooglePayFlowResult;
|
|
193
193
|
applePay: InitAirwallexApplePayFlowResult;
|
|
194
194
|
};
|
|
195
|
-
loop:
|
|
196
|
-
widget: LoopCryptoWidgetProps;
|
|
197
|
-
config: LoopConnectConfig;
|
|
198
|
-
} | null;
|
|
195
|
+
loop: LoopConfig;
|
|
199
196
|
loaded: boolean;
|
|
200
197
|
preview: DynamicPreview;
|
|
201
198
|
};
|
|
@@ -211,7 +208,12 @@ export declare type ElementsFormProps = {
|
|
|
211
208
|
onLoadError?: (message: string) => void;
|
|
212
209
|
onValidationError?: (field: AllFieldNames, errors: string[], elementId?: string) => void;
|
|
213
210
|
onCheckoutStarted?: () => void;
|
|
214
|
-
onCheckoutSuccess?: (
|
|
211
|
+
onCheckoutSuccess?: (
|
|
212
|
+
invoiceUrls: string[],
|
|
213
|
+
subscriptionIds: string[],
|
|
214
|
+
customerId: string,
|
|
215
|
+
processorsUsed: string[]
|
|
216
|
+
) => void;
|
|
215
217
|
onSetupPaymentMethodSuccess?: (paymentMethodId: string) => void;
|
|
216
218
|
onCheckoutError?: (message: string, errorCode?: string) => void;
|
|
217
219
|
baseUrl?: string;
|
|
@@ -250,6 +252,7 @@ declare enum ElementTypeEnum {
|
|
|
250
252
|
CARD_NUMBER = 'card-number',
|
|
251
253
|
CARD_EXPIRY = 'card-expiry',
|
|
252
254
|
CARD_CVC = 'card-cvc',
|
|
255
|
+
CDE_BRIDGE = 'cde-bridge',
|
|
253
256
|
}
|
|
254
257
|
|
|
255
258
|
declare enum Environment {
|
|
@@ -324,6 +327,20 @@ declare interface InitializedEvent {
|
|
|
324
327
|
entityId: string;
|
|
325
328
|
}
|
|
326
329
|
|
|
330
|
+
export declare type LoopConfig =
|
|
331
|
+
| {
|
|
332
|
+
isAvailable: true;
|
|
333
|
+
isLoading: boolean;
|
|
334
|
+
widget: LoopCryptoWidgetProps;
|
|
335
|
+
config: LoopConnectConfig;
|
|
336
|
+
}
|
|
337
|
+
| {
|
|
338
|
+
isAvailable: false;
|
|
339
|
+
isLoading: boolean;
|
|
340
|
+
widget: null;
|
|
341
|
+
config: null;
|
|
342
|
+
};
|
|
343
|
+
|
|
327
344
|
export declare interface LoopConnectConfig {
|
|
328
345
|
apiKey: string;
|
|
329
346
|
entityId: string;
|
|
@@ -340,20 +357,13 @@ declare type LoopCryptoFlowCustomParams =
|
|
|
340
357
|
| {
|
|
341
358
|
customer: Omit<CustomerResponse, 'paymentMethods' | 'merchants' | 'dateCreated'>;
|
|
342
359
|
payin: PayInCompleteEvent;
|
|
343
|
-
// TODO: Move these to nonCdeFormInput prop
|
|
344
|
-
email?: string;
|
|
345
|
-
firstName?: string;
|
|
346
|
-
lastName?: string;
|
|
347
360
|
success: true;
|
|
348
361
|
}
|
|
349
362
|
| {
|
|
350
|
-
|
|
351
|
-
// TODO: Move these to nonCdeFormInput prop
|
|
352
|
-
email?: string;
|
|
353
|
-
firstName?: string;
|
|
354
|
-
lastName?: string;
|
|
363
|
+
failureDetails: PayInFailedEvent;
|
|
355
364
|
success: false;
|
|
356
|
-
}
|
|
365
|
+
}
|
|
366
|
+
| undefined;
|
|
357
367
|
|
|
358
368
|
export declare type LoopCryptoWidgetProps = {
|
|
359
369
|
paymentUsdAmount: number;
|
|
@@ -373,7 +383,12 @@ declare type OnCheckoutError = (message: string, errorCode?: string) => void;
|
|
|
373
383
|
|
|
374
384
|
declare type OnCheckoutStarted = () => void;
|
|
375
385
|
|
|
376
|
-
declare type OnCheckoutSuccess = (
|
|
386
|
+
declare type OnCheckoutSuccess = (
|
|
387
|
+
invoiceUrls: string[],
|
|
388
|
+
subscriptionIds: string[],
|
|
389
|
+
customerId: string,
|
|
390
|
+
processorsUsed: string[]
|
|
391
|
+
) => void;
|
|
377
392
|
|
|
378
393
|
declare type OnSetupPaymentMethodSuccess = (paymentMethodId: string) => void;
|
|
379
394
|
|