@paydock/client-sdk 1.110.2 → 1.111.0-beta
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/bundles/index.cjs +2165 -189
- package/bundles/index.cjs.d.ts +113 -1
- package/bundles/index.mjs +2163 -189
- package/bundles/index.mjs.d.ts +113 -1
- package/bundles/types/api/api-base.d.ts +5 -0
- package/bundles/types/api/api-base.d.ts.map +1 -1
- package/bundles/types/api/api-checkout-internal.d.ts +56 -0
- package/bundles/types/api/api-checkout-internal.d.ts.map +1 -0
- package/bundles/types/api/api-internal.d.ts +2 -0
- package/bundles/types/api/api-internal.d.ts.map +1 -1
- package/bundles/types/checkout/checkout.d.ts +86 -0
- package/bundles/types/checkout/checkout.d.ts.map +1 -0
- package/bundles/types/checkout/helpers/instruction-handler.d.ts +23 -0
- package/bundles/types/checkout/helpers/instruction-handler.d.ts.map +1 -0
- package/bundles/types/checkout/helpers/instruction-module.d.ts +6 -0
- package/bundles/types/checkout/helpers/instruction-module.d.ts.map +1 -0
- package/bundles/types/checkout/helpers/instruction-module.decorator.d.ts +6 -0
- package/bundles/types/checkout/helpers/instruction-module.decorator.d.ts.map +1 -0
- package/bundles/types/checkout/helpers/instruction.decorator.d.ts +5 -0
- package/bundles/types/checkout/helpers/instruction.decorator.d.ts.map +1 -0
- package/bundles/types/checkout/helpers/resource-helper.d.ts +5 -0
- package/bundles/types/checkout/helpers/resource-helper.d.ts.map +1 -0
- package/bundles/types/checkout/index.d.ts +2 -0
- package/bundles/types/checkout/index.d.ts.map +1 -0
- package/bundles/types/checkout/instructions/index.d.ts +3 -0
- package/bundles/types/checkout/instructions/index.d.ts.map +1 -0
- package/bundles/types/checkout/instructions/v1/index.d.ts +4 -0
- package/bundles/types/checkout/instructions/v1/index.d.ts.map +1 -0
- package/bundles/types/checkout/instructions/v1/instruction.afterpay_checkout_form.show.d.ts +20 -0
- package/bundles/types/checkout/instructions/v1/instruction.afterpay_checkout_form.show.d.ts.map +1 -0
- package/bundles/types/checkout/instructions/v1/instruction.afterpay_wallet_form.show.d.ts +14 -0
- package/bundles/types/checkout/instructions/v1/instruction.afterpay_wallet_form.show.d.ts.map +1 -0
- package/bundles/types/checkout/instructions/v1/instruction.apple_pay_form.show.d.ts +18 -0
- package/bundles/types/checkout/instructions/v1/instruction.apple_pay_form.show.d.ts.map +1 -0
- package/bundles/types/checkout/instructions/v1/instruction.bank_account_form.show.d.ts +15 -0
- package/bundles/types/checkout/instructions/v1/instruction.bank_account_form.show.d.ts.map +1 -0
- package/bundles/types/checkout/instructions/v1/instruction.canvas_3ds.show.d.ts +11 -0
- package/bundles/types/checkout/instructions/v1/instruction.canvas_3ds.show.d.ts.map +1 -0
- package/bundles/types/checkout/instructions/v1/instruction.card_form.show.d.ts +19 -0
- package/bundles/types/checkout/instructions/v1/instruction.card_form.show.d.ts.map +1 -0
- package/bundles/types/checkout/instructions/v1/instruction.disable_payment_method_event.emit.d.ts +19 -0
- package/bundles/types/checkout/instructions/v1/instruction.disable_payment_method_event.emit.d.ts.map +1 -0
- package/bundles/types/checkout/instructions/v1/instruction.generic.show_message.d.ts +26 -0
- package/bundles/types/checkout/instructions/v1/instruction.generic.show_message.d.ts.map +1 -0
- package/bundles/types/checkout/instructions/v1/instruction.google_pay_form.show.d.ts +18 -0
- package/bundles/types/checkout/instructions/v1/instruction.google_pay_form.show.d.ts.map +1 -0
- package/bundles/types/checkout/instructions/v1/instruction.merchant_event.emit.d.ts +18 -0
- package/bundles/types/checkout/instructions/v1/instruction.merchant_event.emit.d.ts.map +1 -0
- package/bundles/types/checkout/instructions/v1/instruction.payment_methods.show.d.ts +18 -0
- package/bundles/types/checkout/instructions/v1/instruction.payment_methods.show.d.ts.map +1 -0
- package/bundles/types/checkout/instructions/v1/instruction.paypal_form.show.d.ts +21 -0
- package/bundles/types/checkout/instructions/v1/instruction.paypal_form.show.d.ts.map +1 -0
- package/bundles/types/checkout/instructions/v1/instruction.zip_checkout_form.show.d.ts +19 -0
- package/bundles/types/checkout/instructions/v1/instruction.zip_checkout_form.show.d.ts.map +1 -0
- package/bundles/types/checkout/layout-widgets/additionals.d.ts +3 -0
- package/bundles/types/checkout/layout-widgets/additionals.d.ts.map +1 -0
- package/bundles/types/checkout/layout-widgets/default-variables.enum.d.ts +9 -0
- package/bundles/types/checkout/layout-widgets/default-variables.enum.d.ts.map +1 -0
- package/bundles/types/checkout/layout-widgets/message.d.ts +34 -0
- package/bundles/types/checkout/layout-widgets/message.d.ts.map +1 -0
- package/bundles/types/checkout/layout-widgets/payment-methods-template.d.ts +10 -0
- package/bundles/types/checkout/layout-widgets/payment-methods-template.d.ts.map +1 -0
- package/bundles/types/checkout/layout-widgets/payment-methods.d.ts +52 -0
- package/bundles/types/checkout/layout-widgets/payment-methods.d.ts.map +1 -0
- package/bundles/types/checkout/layout-widgets/payment-template.d.ts +3 -0
- package/bundles/types/checkout/layout-widgets/payment-template.d.ts.map +1 -0
- package/bundles/types/components/iframe.d.ts +2 -0
- package/bundles/types/components/iframe.d.ts.map +1 -1
- package/bundles/types/components/link.d.ts +1 -0
- package/bundles/types/components/link.d.ts.map +1 -1
- package/bundles/types/components/param.d.ts +5 -0
- package/bundles/types/components/param.d.ts.map +1 -1
- package/bundles/types/helper/access-token.d.ts +1 -0
- package/bundles/types/helper/access-token.d.ts.map +1 -1
- package/bundles/types/helper/spiner.util.d.ts +6 -0
- package/bundles/types/helper/spiner.util.d.ts.map +1 -0
- package/bundles/types/index.d.ts +1 -0
- package/bundles/types/index.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/wallet-services/flypay-v2.wallet-service.d.ts.map +1 -1
- package/bundles/types/widget/html-multi-widget.d.ts +1 -0
- package/bundles/types/widget/html-multi-widget.d.ts.map +1 -1
- package/bundles/widget.umd.js +2165 -189
- package/bundles/widget.umd.js.d.ts +113 -1
- package/bundles/widget.umd.js.min.d.ts +113 -1
- package/bundles/widget.umd.min.js +7 -7
- package/package.json +2 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Observable, Subscriber } from 'rxjs';
|
|
1
2
|
import { MicroAgent } from '@newrelic/browser-agent/loaders/micro-agent';
|
|
2
3
|
|
|
3
4
|
declare class ApiCharge {
|
|
@@ -115,6 +116,7 @@ declare class ApiBase {
|
|
|
115
116
|
protected env: Env;
|
|
116
117
|
auth: string;
|
|
117
118
|
authType: API_AUTH_TYPE;
|
|
119
|
+
private stoppedPooling;
|
|
118
120
|
constructor(auth: string, authType?: API_AUTH_TYPE);
|
|
119
121
|
/**
|
|
120
122
|
* Current method can change environment. By default environment = sandbox.
|
|
@@ -126,6 +128,9 @@ declare class ApiBase {
|
|
|
126
128
|
* @param {string} [alias] - Own domain alias
|
|
127
129
|
*/
|
|
128
130
|
setEnv(env: string, alias?: string): ApiBase;
|
|
131
|
+
longPollingObservable<Req extends object, Res>(method: 'GET' | 'POST', url: string, requestBody: Req, reconnectInterval?: number): Observable<Res>;
|
|
132
|
+
longPull(subscriber: Subscriber<any>, method: any, link: any, auth: any, requestBody: any, reconnectInterval: any): void;
|
|
133
|
+
destroyLongPolling(): void;
|
|
129
134
|
setAuthType(): API_AUTH_TYPE;
|
|
130
135
|
getClient(method: Extract<HttpRequestMethod, 'GET' | 'POST'>, link: string): {
|
|
131
136
|
config: XMLHttpRequest;
|
|
@@ -666,6 +671,8 @@ declare class IFrame {
|
|
|
666
671
|
isExist(): boolean;
|
|
667
672
|
getElement(): HTMLIFrameElement;
|
|
668
673
|
setStyle(property: string, value: string): void;
|
|
674
|
+
setIframeHeight(iframeElement: HTMLIFrameElement, iFrameDocument: Document, selector: string): void;
|
|
675
|
+
private setStyles;
|
|
669
676
|
}
|
|
670
677
|
|
|
671
678
|
/**
|
|
@@ -1903,9 +1910,17 @@ interface GetConfigResponse {
|
|
|
1903
1910
|
certificate_passphrase: string;
|
|
1904
1911
|
}
|
|
1905
1912
|
|
|
1913
|
+
declare class ApiCheckoutInternal {
|
|
1914
|
+
protected api: ApiInternal;
|
|
1915
|
+
constructor(api: ApiInternal);
|
|
1916
|
+
instructions(): Observable<object>;
|
|
1917
|
+
callback(payload: Object): Promise<Object>;
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1906
1920
|
declare class ApiInternal extends ApiBase {
|
|
1907
1921
|
charge(): ApiChargeInternal;
|
|
1908
1922
|
service(): ApiServiceInternal;
|
|
1923
|
+
checkout(): ApiCheckoutInternal;
|
|
1909
1924
|
gateway(): ApiGatewayInternal;
|
|
1910
1925
|
}
|
|
1911
1926
|
|
|
@@ -2863,6 +2878,7 @@ interface IEventMetaData extends IEventData$1 {
|
|
|
2863
2878
|
}
|
|
2864
2879
|
interface IEventFinishData extends IEventData$1 {
|
|
2865
2880
|
payment_source: string;
|
|
2881
|
+
payment_source_token?: string;
|
|
2866
2882
|
}
|
|
2867
2883
|
/**
|
|
2868
2884
|
* Interface of data from validation event.
|
|
@@ -3282,6 +3298,102 @@ declare class HtmlWidget extends HtmlMultiWidget {
|
|
|
3282
3298
|
setGiftCardScheme(giftCardScheme: any, processingNetwork: any): void;
|
|
3283
3299
|
}
|
|
3284
3300
|
|
|
3301
|
+
type Instruction = new (selector: string, formSelector: string, api: ApiInternal) => InstructionHandler & InstructionDestroyable & InstructionDecorated;
|
|
3302
|
+
interface InstructionHandleable {
|
|
3303
|
+
handle(payload: object, eventEmitter: EventEmitter): void;
|
|
3304
|
+
}
|
|
3305
|
+
interface InstructionDecorated {
|
|
3306
|
+
instruction: string;
|
|
3307
|
+
}
|
|
3308
|
+
interface InstructionDestroyable {
|
|
3309
|
+
destroy(): void;
|
|
3310
|
+
}
|
|
3311
|
+
declare abstract class InstructionHandler implements InstructionHandleable, InstructionDestroyable, InstructionDecorated {
|
|
3312
|
+
selector: string;
|
|
3313
|
+
formSelector: string;
|
|
3314
|
+
api: ApiInternal;
|
|
3315
|
+
constructor(selector: string, formSelector: string, api: ApiInternal);
|
|
3316
|
+
instruction: string;
|
|
3317
|
+
abstract handle(context: object, eventEmitter?: any): void;
|
|
3318
|
+
abstract destroy(): void;
|
|
3319
|
+
getEnv(instruction_token: string): string;
|
|
3320
|
+
}
|
|
3321
|
+
|
|
3322
|
+
declare class InstructionModule {
|
|
3323
|
+
instructions: any[];
|
|
3324
|
+
getInstruction(id: string): Instruction | null;
|
|
3325
|
+
}
|
|
3326
|
+
|
|
3327
|
+
interface IntentTokenPayload {
|
|
3328
|
+
env: string;
|
|
3329
|
+
intent_id: string;
|
|
3330
|
+
version: number;
|
|
3331
|
+
env_alias: string;
|
|
3332
|
+
}
|
|
3333
|
+
declare class InstructionDebugger {
|
|
3334
|
+
constructor(selector: string, formSelector: string, version: number, instructionName: string, context: object, token?: string);
|
|
3335
|
+
}
|
|
3336
|
+
/**
|
|
3337
|
+
* Class CheckoutButton transform usual button into checkout
|
|
3338
|
+
*
|
|
3339
|
+
* @constructor
|
|
3340
|
+
*
|
|
3341
|
+
* @param {string} selector - Selector of html element.
|
|
3342
|
+
* @param {string} intentToken - PayDock intent token
|
|
3343
|
+
* @example
|
|
3344
|
+
* var widget = new Checkout('#widget', 'intent_token');
|
|
3345
|
+
**/
|
|
3346
|
+
declare class Checkout {
|
|
3347
|
+
protected formSelector: string;
|
|
3348
|
+
protected intentToken: string;
|
|
3349
|
+
protected debug: boolean;
|
|
3350
|
+
protected window: Window;
|
|
3351
|
+
protected eventEmitter: EventEmitter;
|
|
3352
|
+
protected container: Container;
|
|
3353
|
+
protected intentTokenPayload: IntentTokenPayload;
|
|
3354
|
+
protected api: ApiInternal;
|
|
3355
|
+
protected instructions: InstructionModule;
|
|
3356
|
+
protected currentInstruction: InstructionDestroyable & InstructionHandleable;
|
|
3357
|
+
constructor(formSelector: string, intentToken: string, debug?: boolean);
|
|
3358
|
+
private extractIntentTokenPayload;
|
|
3359
|
+
private ready;
|
|
3360
|
+
private initContractVersion;
|
|
3361
|
+
private listenInstructions;
|
|
3362
|
+
private setEnv;
|
|
3363
|
+
private createWidgetStructure;
|
|
3364
|
+
/**
|
|
3365
|
+
* If the payment was successful, the function passed as parameter will be called.
|
|
3366
|
+
* Important: Do not perform thread blocking operations in callback such as window.alert() calls.
|
|
3367
|
+
*
|
|
3368
|
+
* @example
|
|
3369
|
+
* widget.onPaymentSuccessful((data) => {
|
|
3370
|
+
* console.log('Payment successful!');
|
|
3371
|
+
* });
|
|
3372
|
+
*/
|
|
3373
|
+
onPaymentSuccessful(handler: (data: IEventData$1) => void): () => void;
|
|
3374
|
+
/**
|
|
3375
|
+
* If the payment was not successful, the function passed as parameter will be called.
|
|
3376
|
+
* Important: Do not perform thread blocking operations in callback such as window.alert() calls.
|
|
3377
|
+
*
|
|
3378
|
+
* @example
|
|
3379
|
+
* widget.onPaymentError((err) => {
|
|
3380
|
+
* console.log('Payment not successful');
|
|
3381
|
+
* });
|
|
3382
|
+
*/
|
|
3383
|
+
onPaymentFailure(handler: (data: IEventData$1) => void): () => void;
|
|
3384
|
+
/**
|
|
3385
|
+
* If the payment was expired, the function passed as parameter will be called.
|
|
3386
|
+
* Important: Do not perform thread blocking operations in callback such as window.alert() calls.
|
|
3387
|
+
*
|
|
3388
|
+
* @example
|
|
3389
|
+
* widget.onPaymentInReview((data) => {
|
|
3390
|
+
* console.log('Payment in fraud review');
|
|
3391
|
+
* });
|
|
3392
|
+
*/
|
|
3393
|
+
onPaymentExpired(handler: (data: IEventData$1) => void): () => void;
|
|
3394
|
+
private setStyles;
|
|
3395
|
+
}
|
|
3396
|
+
|
|
3285
3397
|
declare enum EVENT {
|
|
3286
3398
|
UNAVAILABLE = "unavailable",
|
|
3287
3399
|
ERROR = "error",
|
|
@@ -3687,4 +3799,4 @@ declare class PaypalWalletButtonExpress extends BaseWalletButton<PaypalWalletMet
|
|
|
3687
3799
|
private paypalSharedProps;
|
|
3688
3800
|
}
|
|
3689
3801
|
|
|
3690
|
-
export { AfterpayCheckoutButton, Api, ApplePayWalletButtonExpress, CHECKOUT_BUTTON_EVENT, Canvas3ds, ClickToPay, Configuration, ELEMENT, EVENT$1 as EVENT, Builder$1 as ExternalCheckoutBuilder, Checker as ExternalCheckoutChecker, FORM_FIELD, HtmlMultiWidget, HtmlPaymentSourceWidget, HtmlWidget, type ICheckout, type IDetails, type IElementStyleInput, type IEventCheckoutFinishData, type IPayPalMeta, type IStyles$1 as IStyles, type ITexts, MultiWidget, PAYMENT_TYPE, PURPOSE, Builder as PaymentSourceBuilder, PaymentSourceWidget, PaypalCheckoutButton, PaypalWalletButtonExpress, STYLABLE_ELEMENT, STYLABLE_ELEMENT_STATE, STYLE, SUPPORTED_CARD_TYPES, TEXT, TRIGGER, TYPE, VAULT_DISPLAY_STYLE, type VaultDisplayStyle, VaultDisplayWidget, WalletButtons, ZipmoneyCheckoutButton };
|
|
3802
|
+
export { AfterpayCheckoutButton, Api, ApplePayWalletButtonExpress, CHECKOUT_BUTTON_EVENT, Canvas3ds, Checkout, ClickToPay, Configuration, ELEMENT, EVENT$1 as EVENT, Builder$1 as ExternalCheckoutBuilder, Checker as ExternalCheckoutChecker, FORM_FIELD, HtmlMultiWidget, HtmlPaymentSourceWidget, HtmlWidget, type ICheckout, type IDetails, type IElementStyleInput, type IEventCheckoutFinishData, type IPayPalMeta, type IStyles$1 as IStyles, type ITexts, InstructionDebugger, MultiWidget, PAYMENT_TYPE, PURPOSE, Builder as PaymentSourceBuilder, PaymentSourceWidget, PaypalCheckoutButton, PaypalWalletButtonExpress, STYLABLE_ELEMENT, STYLABLE_ELEMENT_STATE, STYLE, SUPPORTED_CARD_TYPES, TEXT, TRIGGER, TYPE, VAULT_DISPLAY_STYLE, type VaultDisplayStyle, VaultDisplayWidget, WalletButtons, ZipmoneyCheckoutButton };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Observable, Subscriber } from 'rxjs';
|
|
1
2
|
import { MicroAgent } from '@newrelic/browser-agent/loaders/micro-agent';
|
|
2
3
|
|
|
3
4
|
declare class ApiCharge {
|
|
@@ -115,6 +116,7 @@ declare class ApiBase {
|
|
|
115
116
|
protected env: Env;
|
|
116
117
|
auth: string;
|
|
117
118
|
authType: API_AUTH_TYPE;
|
|
119
|
+
private stoppedPooling;
|
|
118
120
|
constructor(auth: string, authType?: API_AUTH_TYPE);
|
|
119
121
|
/**
|
|
120
122
|
* Current method can change environment. By default environment = sandbox.
|
|
@@ -126,6 +128,9 @@ declare class ApiBase {
|
|
|
126
128
|
* @param {string} [alias] - Own domain alias
|
|
127
129
|
*/
|
|
128
130
|
setEnv(env: string, alias?: string): ApiBase;
|
|
131
|
+
longPollingObservable<Req extends object, Res>(method: 'GET' | 'POST', url: string, requestBody: Req, reconnectInterval?: number): Observable<Res>;
|
|
132
|
+
longPull(subscriber: Subscriber<any>, method: any, link: any, auth: any, requestBody: any, reconnectInterval: any): void;
|
|
133
|
+
destroyLongPolling(): void;
|
|
129
134
|
setAuthType(): API_AUTH_TYPE;
|
|
130
135
|
getClient(method: Extract<HttpRequestMethod, 'GET' | 'POST'>, link: string): {
|
|
131
136
|
config: XMLHttpRequest;
|
|
@@ -666,6 +671,8 @@ declare class IFrame {
|
|
|
666
671
|
isExist(): boolean;
|
|
667
672
|
getElement(): HTMLIFrameElement;
|
|
668
673
|
setStyle(property: string, value: string): void;
|
|
674
|
+
setIframeHeight(iframeElement: HTMLIFrameElement, iFrameDocument: Document, selector: string): void;
|
|
675
|
+
private setStyles;
|
|
669
676
|
}
|
|
670
677
|
|
|
671
678
|
/**
|
|
@@ -1903,9 +1910,17 @@ interface GetConfigResponse {
|
|
|
1903
1910
|
certificate_passphrase: string;
|
|
1904
1911
|
}
|
|
1905
1912
|
|
|
1913
|
+
declare class ApiCheckoutInternal {
|
|
1914
|
+
protected api: ApiInternal;
|
|
1915
|
+
constructor(api: ApiInternal);
|
|
1916
|
+
instructions(): Observable<object>;
|
|
1917
|
+
callback(payload: Object): Promise<Object>;
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1906
1920
|
declare class ApiInternal extends ApiBase {
|
|
1907
1921
|
charge(): ApiChargeInternal;
|
|
1908
1922
|
service(): ApiServiceInternal;
|
|
1923
|
+
checkout(): ApiCheckoutInternal;
|
|
1909
1924
|
gateway(): ApiGatewayInternal;
|
|
1910
1925
|
}
|
|
1911
1926
|
|
|
@@ -2863,6 +2878,7 @@ interface IEventMetaData extends IEventData$1 {
|
|
|
2863
2878
|
}
|
|
2864
2879
|
interface IEventFinishData extends IEventData$1 {
|
|
2865
2880
|
payment_source: string;
|
|
2881
|
+
payment_source_token?: string;
|
|
2866
2882
|
}
|
|
2867
2883
|
/**
|
|
2868
2884
|
* Interface of data from validation event.
|
|
@@ -3282,6 +3298,102 @@ declare class HtmlWidget extends HtmlMultiWidget {
|
|
|
3282
3298
|
setGiftCardScheme(giftCardScheme: any, processingNetwork: any): void;
|
|
3283
3299
|
}
|
|
3284
3300
|
|
|
3301
|
+
type Instruction = new (selector: string, formSelector: string, api: ApiInternal) => InstructionHandler & InstructionDestroyable & InstructionDecorated;
|
|
3302
|
+
interface InstructionHandleable {
|
|
3303
|
+
handle(payload: object, eventEmitter: EventEmitter): void;
|
|
3304
|
+
}
|
|
3305
|
+
interface InstructionDecorated {
|
|
3306
|
+
instruction: string;
|
|
3307
|
+
}
|
|
3308
|
+
interface InstructionDestroyable {
|
|
3309
|
+
destroy(): void;
|
|
3310
|
+
}
|
|
3311
|
+
declare abstract class InstructionHandler implements InstructionHandleable, InstructionDestroyable, InstructionDecorated {
|
|
3312
|
+
selector: string;
|
|
3313
|
+
formSelector: string;
|
|
3314
|
+
api: ApiInternal;
|
|
3315
|
+
constructor(selector: string, formSelector: string, api: ApiInternal);
|
|
3316
|
+
instruction: string;
|
|
3317
|
+
abstract handle(context: object, eventEmitter?: any): void;
|
|
3318
|
+
abstract destroy(): void;
|
|
3319
|
+
getEnv(instruction_token: string): string;
|
|
3320
|
+
}
|
|
3321
|
+
|
|
3322
|
+
declare class InstructionModule {
|
|
3323
|
+
instructions: any[];
|
|
3324
|
+
getInstruction(id: string): Instruction | null;
|
|
3325
|
+
}
|
|
3326
|
+
|
|
3327
|
+
interface IntentTokenPayload {
|
|
3328
|
+
env: string;
|
|
3329
|
+
intent_id: string;
|
|
3330
|
+
version: number;
|
|
3331
|
+
env_alias: string;
|
|
3332
|
+
}
|
|
3333
|
+
declare class InstructionDebugger {
|
|
3334
|
+
constructor(selector: string, formSelector: string, version: number, instructionName: string, context: object, token?: string);
|
|
3335
|
+
}
|
|
3336
|
+
/**
|
|
3337
|
+
* Class CheckoutButton transform usual button into checkout
|
|
3338
|
+
*
|
|
3339
|
+
* @constructor
|
|
3340
|
+
*
|
|
3341
|
+
* @param {string} selector - Selector of html element.
|
|
3342
|
+
* @param {string} intentToken - PayDock intent token
|
|
3343
|
+
* @example
|
|
3344
|
+
* var widget = new Checkout('#widget', 'intent_token');
|
|
3345
|
+
**/
|
|
3346
|
+
declare class Checkout {
|
|
3347
|
+
protected formSelector: string;
|
|
3348
|
+
protected intentToken: string;
|
|
3349
|
+
protected debug: boolean;
|
|
3350
|
+
protected window: Window;
|
|
3351
|
+
protected eventEmitter: EventEmitter;
|
|
3352
|
+
protected container: Container;
|
|
3353
|
+
protected intentTokenPayload: IntentTokenPayload;
|
|
3354
|
+
protected api: ApiInternal;
|
|
3355
|
+
protected instructions: InstructionModule;
|
|
3356
|
+
protected currentInstruction: InstructionDestroyable & InstructionHandleable;
|
|
3357
|
+
constructor(formSelector: string, intentToken: string, debug?: boolean);
|
|
3358
|
+
private extractIntentTokenPayload;
|
|
3359
|
+
private ready;
|
|
3360
|
+
private initContractVersion;
|
|
3361
|
+
private listenInstructions;
|
|
3362
|
+
private setEnv;
|
|
3363
|
+
private createWidgetStructure;
|
|
3364
|
+
/**
|
|
3365
|
+
* If the payment was successful, the function passed as parameter will be called.
|
|
3366
|
+
* Important: Do not perform thread blocking operations in callback such as window.alert() calls.
|
|
3367
|
+
*
|
|
3368
|
+
* @example
|
|
3369
|
+
* widget.onPaymentSuccessful((data) => {
|
|
3370
|
+
* console.log('Payment successful!');
|
|
3371
|
+
* });
|
|
3372
|
+
*/
|
|
3373
|
+
onPaymentSuccessful(handler: (data: IEventData$1) => void): () => void;
|
|
3374
|
+
/**
|
|
3375
|
+
* If the payment was not successful, the function passed as parameter will be called.
|
|
3376
|
+
* Important: Do not perform thread blocking operations in callback such as window.alert() calls.
|
|
3377
|
+
*
|
|
3378
|
+
* @example
|
|
3379
|
+
* widget.onPaymentError((err) => {
|
|
3380
|
+
* console.log('Payment not successful');
|
|
3381
|
+
* });
|
|
3382
|
+
*/
|
|
3383
|
+
onPaymentFailure(handler: (data: IEventData$1) => void): () => void;
|
|
3384
|
+
/**
|
|
3385
|
+
* If the payment was expired, the function passed as parameter will be called.
|
|
3386
|
+
* Important: Do not perform thread blocking operations in callback such as window.alert() calls.
|
|
3387
|
+
*
|
|
3388
|
+
* @example
|
|
3389
|
+
* widget.onPaymentInReview((data) => {
|
|
3390
|
+
* console.log('Payment in fraud review');
|
|
3391
|
+
* });
|
|
3392
|
+
*/
|
|
3393
|
+
onPaymentExpired(handler: (data: IEventData$1) => void): () => void;
|
|
3394
|
+
private setStyles;
|
|
3395
|
+
}
|
|
3396
|
+
|
|
3285
3397
|
declare enum EVENT {
|
|
3286
3398
|
UNAVAILABLE = "unavailable",
|
|
3287
3399
|
ERROR = "error",
|
|
@@ -3687,4 +3799,4 @@ declare class PaypalWalletButtonExpress extends BaseWalletButton<PaypalWalletMet
|
|
|
3687
3799
|
private paypalSharedProps;
|
|
3688
3800
|
}
|
|
3689
3801
|
|
|
3690
|
-
export { AfterpayCheckoutButton, Api, ApplePayWalletButtonExpress, CHECKOUT_BUTTON_EVENT, Canvas3ds, ClickToPay, Configuration, ELEMENT, EVENT$1 as EVENT, Builder$1 as ExternalCheckoutBuilder, Checker as ExternalCheckoutChecker, FORM_FIELD, HtmlMultiWidget, HtmlPaymentSourceWidget, HtmlWidget, type ICheckout, type IDetails, type IElementStyleInput, type IEventCheckoutFinishData, type IPayPalMeta, type IStyles$1 as IStyles, type ITexts, MultiWidget, PAYMENT_TYPE, PURPOSE, Builder as PaymentSourceBuilder, PaymentSourceWidget, PaypalCheckoutButton, PaypalWalletButtonExpress, STYLABLE_ELEMENT, STYLABLE_ELEMENT_STATE, STYLE, SUPPORTED_CARD_TYPES, TEXT, TRIGGER, TYPE, VAULT_DISPLAY_STYLE, type VaultDisplayStyle, VaultDisplayWidget, WalletButtons, ZipmoneyCheckoutButton };
|
|
3802
|
+
export { AfterpayCheckoutButton, Api, ApplePayWalletButtonExpress, CHECKOUT_BUTTON_EVENT, Canvas3ds, Checkout, ClickToPay, Configuration, ELEMENT, EVENT$1 as EVENT, Builder$1 as ExternalCheckoutBuilder, Checker as ExternalCheckoutChecker, FORM_FIELD, HtmlMultiWidget, HtmlPaymentSourceWidget, HtmlWidget, type ICheckout, type IDetails, type IElementStyleInput, type IEventCheckoutFinishData, type IPayPalMeta, type IStyles$1 as IStyles, type ITexts, InstructionDebugger, MultiWidget, PAYMENT_TYPE, PURPOSE, Builder as PaymentSourceBuilder, PaymentSourceWidget, PaypalCheckoutButton, PaypalWalletButtonExpress, STYLABLE_ELEMENT, STYLABLE_ELEMENT_STATE, STYLE, SUPPORTED_CARD_TYPES, TEXT, TRIGGER, TYPE, VAULT_DISPLAY_STYLE, type VaultDisplayStyle, VaultDisplayWidget, WalletButtons, ZipmoneyCheckoutButton };
|