@adyen/adyen-web 5.43.0 → 5.44.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/README.md +1 -1
- package/dist/adyen.css +1 -0
- package/dist/adyen.css.map +1 -1
- package/dist/adyen.js +1 -1
- package/dist/adyen.js.map +1 -1
- package/dist/cjs/adyen.css +1 -0
- package/dist/cjs/adyen.css.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/es/adyen.css +1 -0
- package/dist/es/adyen.css.map +1 -1
- package/dist/es/index.js +1 -1
- package/dist/es.modern/adyen.css +1 -0
- package/dist/es.modern/adyen.css.map +1 -1
- package/dist/es.modern/index.js +1 -1
- package/dist/types/components/Ach/Ach.d.ts +1 -1
- package/dist/types/components/BcmcMobile/BcmcMobile.d.ts +1 -1
- package/dist/types/components/Card/Bancontact.d.ts +1 -1
- package/dist/types/components/Card/Card.d.ts +1 -1
- package/dist/types/components/CashAppPay/CashAppPay.d.ts +80 -0
- package/dist/types/components/CashAppPay/components/CashAppComponent.d.ts +16 -0
- package/dist/types/components/CashAppPay/defaultProps.d.ts +7 -0
- package/dist/types/components/CashAppPay/index.d.ts +1 -0
- package/dist/types/components/CashAppPay/services/CashAppSdkLoader.d.ts +9 -0
- package/dist/types/components/CashAppPay/services/CashAppService.d.ts +21 -0
- package/dist/types/components/CashAppPay/services/config.d.ts +3 -0
- package/dist/types/components/CashAppPay/services/types.d.ts +49 -0
- package/dist/types/components/CashAppPay/types.d.ts +60 -0
- package/dist/types/components/ClickToPay/ClickToPay.d.ts +1 -1
- package/dist/types/components/Dragonpay/Dragonpay.d.ts +1 -1
- package/dist/types/components/Dropin/Dropin.d.ts +5 -5
- package/dist/types/components/Dropin/defaultProps.d.ts +0 -1
- package/dist/types/components/DuitNow/DuitNow.d.ts +1 -1
- package/dist/types/components/Giftcard/Giftcard.d.ts +2 -11
- package/dist/types/components/Giftcard/types.d.ts +8 -0
- package/dist/types/components/PayNow/PayNow.d.ts +1 -1
- package/dist/types/components/PromptPay/PromptPay.d.ts +1 -1
- package/dist/types/components/Swish/Swish.d.ts +1 -1
- package/dist/types/components/WeChat/WeChat.d.ts +1 -1
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/internal/Countdown/CountdownA11yReporter.d.ts +25 -0
- package/dist/types/components/internal/Countdown/index.d.ts +3 -29
- package/dist/types/components/internal/Countdown/types.d.ts +9 -0
- package/dist/types/components/internal/Countdown/useCountdownA11yReporter.d.ts +2 -0
- package/dist/types/components/internal/RedirectButton/RedirectButton.d.ts +3 -1
- package/dist/types/components/internal/SecuredFields/lib/configuration/constants.d.ts +1 -1
- package/dist/types/components/types.d.ts +8 -2
- package/dist/types/core/Errors/SRPanel.d.ts +4 -7
- package/dist/types/core/Errors/types.d.ts +6 -0
- package/dist/types/core/ProcessResponse/PaymentMethodsResponse/PaymentMethodsResponse.d.ts +2 -1
- package/dist/types/core/core.d.ts +1 -6
- package/dist/types/core/types.d.ts +48 -1
- package/dist/types/language/config.d.ts +1 -0
- package/dist/types/language/locales/index.d.ts +2 -0
- package/dist/types/language/utils.d.ts +1 -1
- package/dist/types/types/index.d.ts +8 -1
- package/package.json +9 -9
|
@@ -9,7 +9,6 @@ export declare class AchElement extends UIElement<AchElementProps> {
|
|
|
9
9
|
hasHolderName?: boolean;
|
|
10
10
|
enableStoreDetails: boolean;
|
|
11
11
|
bankAccountNumber: string;
|
|
12
|
-
environment?: string;
|
|
13
12
|
session?: import("../../core/CheckoutSession/CheckoutSession").default;
|
|
14
13
|
onChange?: (state: any, element: UIElement<any>) => void;
|
|
15
14
|
onValid?: (state: any, element: UIElement<any>) => void;
|
|
@@ -22,6 +21,7 @@ export declare class AchElement extends UIElement<AchElementProps> {
|
|
|
22
21
|
onPaymentCompleted?: (result: any, element: UIElement<any>) => void;
|
|
23
22
|
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: UIElement<any>) => void;
|
|
24
23
|
isInstantPayment?: boolean;
|
|
24
|
+
environment?: string;
|
|
25
25
|
type?: string;
|
|
26
26
|
name?: string;
|
|
27
27
|
icon?: string;
|
|
@@ -12,7 +12,6 @@ declare class BCMCMobileElement extends QRLoaderContainer {
|
|
|
12
12
|
introduction: string;
|
|
13
13
|
instructions?: string;
|
|
14
14
|
copyBtn?: boolean;
|
|
15
|
-
environment?: string;
|
|
16
15
|
session?: import("../../core/CheckoutSession/CheckoutSession").default;
|
|
17
16
|
onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
18
17
|
onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
@@ -25,6 +24,7 @@ declare class BCMCMobileElement extends QRLoaderContainer {
|
|
|
25
24
|
onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
|
|
26
25
|
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
|
|
27
26
|
isInstantPayment?: boolean;
|
|
27
|
+
environment?: string;
|
|
28
28
|
name?: string;
|
|
29
29
|
icon?: string;
|
|
30
30
|
amount?: import("../../types").PaymentAmount;
|
|
@@ -67,7 +67,6 @@ declare class BancontactElement extends CardElement {
|
|
|
67
67
|
onFocus?: (event: import("../internal/SecuredFields/lib/types").CbObjOnFocus) => void;
|
|
68
68
|
onBinValue?: (event: import("../internal/SecuredFields/lib/types").CbObjOnBinValue) => void;
|
|
69
69
|
onBinLookup?: (event: import("../internal/SecuredFields/lib/types").CbObjOnBinLookup) => void;
|
|
70
|
-
environment?: string;
|
|
71
70
|
session?: import("../../core/CheckoutSession/CheckoutSession").default;
|
|
72
71
|
onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
73
72
|
onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
@@ -79,6 +78,7 @@ declare class BancontactElement extends CardElement {
|
|
|
79
78
|
onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
|
|
80
79
|
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
|
|
81
80
|
isInstantPayment?: boolean;
|
|
81
|
+
environment?: string;
|
|
82
82
|
name?: string;
|
|
83
83
|
amount?: import("../../types").PaymentAmount;
|
|
84
84
|
secondaryAmount?: import("../../types").PaymentAmountExtended;
|
|
@@ -76,7 +76,6 @@ export declare class CardElement extends UIElement<CardElementProps> {
|
|
|
76
76
|
onFocus?: (event: import("../internal/SecuredFields/lib/types").CbObjOnFocus) => void;
|
|
77
77
|
onBinValue?: (event: import("../internal/SecuredFields/lib/types").CbObjOnBinValue) => void;
|
|
78
78
|
onBinLookup?: (event: CbObjOnBinLookup) => void;
|
|
79
|
-
environment?: string;
|
|
80
79
|
session?: import("../../core/CheckoutSession/CheckoutSession").default;
|
|
81
80
|
onChange?: (state: any, element: UIElement<any>) => void;
|
|
82
81
|
onValid?: (state: any, element: UIElement<any>) => void;
|
|
@@ -88,6 +87,7 @@ export declare class CardElement extends UIElement<CardElementProps> {
|
|
|
88
87
|
onPaymentCompleted?: (result: any, element: UIElement<any>) => void;
|
|
89
88
|
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: UIElement<any>) => void;
|
|
90
89
|
isInstantPayment?: boolean;
|
|
90
|
+
environment?: string;
|
|
91
91
|
name?: string;
|
|
92
92
|
amount?: import("../../types").PaymentAmount;
|
|
93
93
|
secondaryAmount?: import("../../types").PaymentAmountExtended;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { h } from 'preact';
|
|
2
|
+
import UIElement from '../UIElement';
|
|
3
|
+
import { CashAppPayElementData, CashAppPayElementProps } from './types';
|
|
4
|
+
export declare class CashAppPay extends UIElement<CashAppPayElementProps> {
|
|
5
|
+
static type: string;
|
|
6
|
+
private readonly cashAppService;
|
|
7
|
+
protected static defaultProps: {
|
|
8
|
+
onClick: (actions: any) => void;
|
|
9
|
+
showPayButton: boolean;
|
|
10
|
+
enableStoreDetails: boolean;
|
|
11
|
+
storePaymentMethod: boolean;
|
|
12
|
+
};
|
|
13
|
+
constructor(props: any);
|
|
14
|
+
formatProps(props: CashAppPayElementProps): {
|
|
15
|
+
enableStoreDetails: boolean;
|
|
16
|
+
storePaymentMethod?: boolean;
|
|
17
|
+
onClick?(actions: {
|
|
18
|
+
resolve: () => void;
|
|
19
|
+
reject: () => void;
|
|
20
|
+
}): void;
|
|
21
|
+
referenceId?: string;
|
|
22
|
+
redirectURL?: string;
|
|
23
|
+
button?: {
|
|
24
|
+
shape?: "round" | "semiround";
|
|
25
|
+
size?: "small" | "medium";
|
|
26
|
+
theme?: "dark" | "light";
|
|
27
|
+
width?: "full" | "static";
|
|
28
|
+
};
|
|
29
|
+
configuration?: {
|
|
30
|
+
clientId: string;
|
|
31
|
+
scopeId: string;
|
|
32
|
+
};
|
|
33
|
+
storedPaymentMethodId?: string;
|
|
34
|
+
cashtag?: string;
|
|
35
|
+
session?: import("../../core/CheckoutSession/CheckoutSession").default;
|
|
36
|
+
onChange?: (state: any, element: UIElement<any>) => void;
|
|
37
|
+
onValid?: (state: any, element: UIElement<any>) => void;
|
|
38
|
+
beforeSubmit?: (state: any, element: UIElement<any>, actions: any) => Promise<void>;
|
|
39
|
+
onSubmit?: (state: any, element: UIElement<any>) => void;
|
|
40
|
+
onComplete?: (state: any, element: UIElement<any>) => void;
|
|
41
|
+
onActionHandled?: (rtnObj: import("../types").ActionHandledReturnObject) => void;
|
|
42
|
+
onAdditionalDetails?: (state: any, element: UIElement<any>) => void;
|
|
43
|
+
onError?: (error: any, element?: UIElement<any>) => void;
|
|
44
|
+
onPaymentCompleted?: (result: any, element: UIElement<any>) => void;
|
|
45
|
+
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: UIElement<any>) => void;
|
|
46
|
+
isInstantPayment?: boolean;
|
|
47
|
+
environment?: string;
|
|
48
|
+
type?: string;
|
|
49
|
+
name?: string;
|
|
50
|
+
icon?: string;
|
|
51
|
+
amount?: import("../../types").PaymentAmount;
|
|
52
|
+
secondaryAmount?: import("../../types").PaymentAmountExtended;
|
|
53
|
+
showPayButton?: boolean;
|
|
54
|
+
setStatusAutomatically?: boolean;
|
|
55
|
+
payButton?: (options: import("../types").PayButtonFunctionProps) => h.JSX.Element;
|
|
56
|
+
loadingContext?: string;
|
|
57
|
+
createFromAction?: (action: import("../../types").PaymentAction, props: object) => UIElement<any>;
|
|
58
|
+
clientKey?: string;
|
|
59
|
+
elementRef?: any;
|
|
60
|
+
i18n?: import("../../language").default;
|
|
61
|
+
_parentInstance?: import("../../core/core").default;
|
|
62
|
+
order?: import("../../types").Order;
|
|
63
|
+
modules?: {
|
|
64
|
+
srPanel?: import("../../core/Errors/SRPanel").SRPanel;
|
|
65
|
+
analytics?: import("../../core/Analytics/Analytics").default;
|
|
66
|
+
resources?: import("../../core/Context/Resources").Resources;
|
|
67
|
+
risk?: import("../../core/RiskModule").default;
|
|
68
|
+
};
|
|
69
|
+
isDropin?: boolean;
|
|
70
|
+
};
|
|
71
|
+
formatData(): CashAppPayElementData;
|
|
72
|
+
get displayName(): string;
|
|
73
|
+
get additionalInfo(): "" | "Cash App Pay";
|
|
74
|
+
submit: () => void;
|
|
75
|
+
get isValid(): boolean;
|
|
76
|
+
private handleOnChangeStoreDetails;
|
|
77
|
+
private handleAuthorize;
|
|
78
|
+
render(): h.JSX.Element;
|
|
79
|
+
}
|
|
80
|
+
export default CashAppPay;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { h, RefObject } from 'preact';
|
|
2
|
+
import AdyenCheckoutError from '../../../core/Errors/AdyenCheckoutError';
|
|
3
|
+
import { ICashAppService } from '../services/types';
|
|
4
|
+
import { CashAppPayEventData } from '../types';
|
|
5
|
+
import './CashAppComponent.scss';
|
|
6
|
+
interface CashAppComponentProps {
|
|
7
|
+
enableStoreDetails?: boolean;
|
|
8
|
+
cashAppService: ICashAppService;
|
|
9
|
+
onClick(): void;
|
|
10
|
+
onChangeStoreDetails(data: any): void;
|
|
11
|
+
onAuthorize(payEventData: CashAppPayEventData): void;
|
|
12
|
+
onError(error: AdyenCheckoutError): void;
|
|
13
|
+
ref(ref: RefObject<typeof CashAppComponent>): void;
|
|
14
|
+
}
|
|
15
|
+
export declare function CashAppComponent({ enableStoreDetails, cashAppService, onClick, onChangeStoreDetails, onAuthorize, onError }: CashAppComponentProps): h.JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './CashAppPay';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ICashAppWindowObject } from './types';
|
|
2
|
+
export interface ICashAppSdkLoader {
|
|
3
|
+
load(environment: string): Promise<ICashAppWindowObject>;
|
|
4
|
+
}
|
|
5
|
+
declare class CashAppSdkLoader implements ICashAppSdkLoader {
|
|
6
|
+
private isSdkIsAvailableOnWindow;
|
|
7
|
+
load(environment: string): Promise<ICashAppWindowObject>;
|
|
8
|
+
}
|
|
9
|
+
export { CashAppSdkLoader };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ICashAppSdkLoader } from './CashAppSdkLoader';
|
|
2
|
+
import { CashAppPayEvents, CashAppServiceConfig, ICashAppService } from './types';
|
|
3
|
+
export default class CashAppService implements ICashAppService {
|
|
4
|
+
private readonly sdkLoader;
|
|
5
|
+
private readonly configuration;
|
|
6
|
+
private pay;
|
|
7
|
+
/**
|
|
8
|
+
* Reference to CashApp 'begin' method
|
|
9
|
+
*/
|
|
10
|
+
private startAuthorization?;
|
|
11
|
+
constructor(sdkLoader: ICashAppSdkLoader, configuration: CashAppServiceConfig);
|
|
12
|
+
get hasOneTimePayment(): boolean;
|
|
13
|
+
get hasOnFilePayment(): boolean;
|
|
14
|
+
setStorePaymentMethod(store: boolean): void;
|
|
15
|
+
initialize(): Promise<void>;
|
|
16
|
+
renderButton(target: HTMLElement): Promise<void>;
|
|
17
|
+
begin(): void;
|
|
18
|
+
subscribeToEvent(eventType: CashAppPayEvents, callback: Function): Function;
|
|
19
|
+
createCustomerRequest(): Promise<void>;
|
|
20
|
+
restart(): Promise<void>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { PaymentAmount } from '../../../types';
|
|
2
|
+
export interface ICashAppWindowObject {
|
|
3
|
+
pay({ clientId }: {
|
|
4
|
+
clientId: string;
|
|
5
|
+
}): Promise<ICashAppSDK>;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* https://developers.cash.app/docs/api/technical-documentation/sdks/pay-kit/technical-reference
|
|
9
|
+
*/
|
|
10
|
+
export interface ICashAppSDK {
|
|
11
|
+
render(target: string | HTMLElement, options?: any): Promise<{
|
|
12
|
+
begin?: () => void;
|
|
13
|
+
}>;
|
|
14
|
+
addEventListener(eventType: CashAppPayEvents, callback: Function): void;
|
|
15
|
+
removeEventListener(eventType: CashAppPayEvents, callback: Function): void;
|
|
16
|
+
customerRequest(customerRequest: any): Promise<void>;
|
|
17
|
+
restart(): Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
export declare enum CashAppPayEvents {
|
|
20
|
+
CustomerDismissed = "CUSTOMER_DISMISSED",
|
|
21
|
+
CustomerRequestApproved = "CUSTOMER_REQUEST_APPROVED",
|
|
22
|
+
CustomerRequestDeclined = "CUSTOMER_REQUEST_DECLINED",
|
|
23
|
+
CustomerRequestFailed = "CUSTOMER_REQUEST_FAILED"
|
|
24
|
+
}
|
|
25
|
+
export interface ICashAppService {
|
|
26
|
+
begin(): void;
|
|
27
|
+
initialize(): Promise<void>;
|
|
28
|
+
setStorePaymentMethod(store: boolean): void;
|
|
29
|
+
renderButton(target: HTMLElement): Promise<void>;
|
|
30
|
+
restart(): Promise<void>;
|
|
31
|
+
createCustomerRequest(): Promise<void>;
|
|
32
|
+
subscribeToEvent(eventType: CashAppPayEvents, callback: Function): Function;
|
|
33
|
+
}
|
|
34
|
+
export type CashAppServiceConfig = {
|
|
35
|
+
useCashAppButtonUi: boolean;
|
|
36
|
+
storePaymentMethod: boolean;
|
|
37
|
+
environment: string;
|
|
38
|
+
clientId: string;
|
|
39
|
+
scopeId: string;
|
|
40
|
+
amount: PaymentAmount;
|
|
41
|
+
referenceId?: string;
|
|
42
|
+
redirectURL?: string;
|
|
43
|
+
button?: {
|
|
44
|
+
shape?: 'semiround' | 'round';
|
|
45
|
+
size?: 'medium' | 'small';
|
|
46
|
+
theme?: 'dark' | 'light';
|
|
47
|
+
width?: 'static' | 'full';
|
|
48
|
+
};
|
|
49
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { UIElementProps } from '../types';
|
|
2
|
+
export interface CashAppPayElementProps extends UIElementProps {
|
|
3
|
+
/**
|
|
4
|
+
* Indicates that the payment must be stored (Ex: in case there is no checkbox but merchant wants to store it)
|
|
5
|
+
*/
|
|
6
|
+
storePaymentMethod?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Enables storing the payment method using the Checkbox
|
|
9
|
+
*/
|
|
10
|
+
enableStoreDetails?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Callback triggered before starting the CashAppPay flow. Use case: Validate customer data, check product availability
|
|
13
|
+
*/
|
|
14
|
+
onClick?(actions: {
|
|
15
|
+
resolve: () => void;
|
|
16
|
+
reject: () => void;
|
|
17
|
+
}): void;
|
|
18
|
+
/**
|
|
19
|
+
* A reference to your system (for example, a cart or checkout identifier). Maximum length 1024 characters.
|
|
20
|
+
* https://developers.cash.app/docs/api/technical-documentation/sdks/pay-kit/technical-reference#parameters-3
|
|
21
|
+
*/
|
|
22
|
+
referenceId?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The destination for the customer after approving (or declining) in Cash App for mobile redirect flow.
|
|
25
|
+
* https://developers.cash.app/docs/api/technical-documentation/sdks/pay-kit/technical-reference#customerrequest
|
|
26
|
+
* @defaultValue window.location.ref
|
|
27
|
+
*/
|
|
28
|
+
redirectURL?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Button customization
|
|
31
|
+
* https://developers.cash.app/docs/api/technical-documentation/sdks/pay-kit/use-cases#customize-the-cash-app-pay-button
|
|
32
|
+
*/
|
|
33
|
+
button?: {
|
|
34
|
+
shape?: 'semiround' | 'round';
|
|
35
|
+
size?: 'medium' | 'small';
|
|
36
|
+
theme?: 'dark' | 'light';
|
|
37
|
+
width?: 'static' | 'full';
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* CashAppPay configuration sent by the /paymentMethods response
|
|
41
|
+
*/
|
|
42
|
+
configuration?: {
|
|
43
|
+
clientId: string;
|
|
44
|
+
scopeId: string;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export type CashAppPayElementData = {
|
|
48
|
+
paymentMethod: {
|
|
49
|
+
type: string;
|
|
50
|
+
grantId?: string;
|
|
51
|
+
storedPaymentMethodId?: string;
|
|
52
|
+
};
|
|
53
|
+
storePaymentMethod?: boolean;
|
|
54
|
+
};
|
|
55
|
+
export type CashAppPayEventData = {
|
|
56
|
+
cashTag?: string;
|
|
57
|
+
customerId?: string;
|
|
58
|
+
grantId?: string;
|
|
59
|
+
onFileGrantId?: string;
|
|
60
|
+
};
|
|
@@ -14,7 +14,6 @@ export declare class ClickToPayElement extends UIElement<ClickToPayElementProps>
|
|
|
14
14
|
shopperEmail: any;
|
|
15
15
|
telephoneNumber: any;
|
|
16
16
|
locale: string;
|
|
17
|
-
environment?: string;
|
|
18
17
|
session?: import("../../core/CheckoutSession/CheckoutSession").default;
|
|
19
18
|
onChange?: (state: any, element: UIElement<any>) => void;
|
|
20
19
|
onValid?: (state: any, element: UIElement<any>) => void;
|
|
@@ -27,6 +26,7 @@ export declare class ClickToPayElement extends UIElement<ClickToPayElementProps>
|
|
|
27
26
|
onPaymentCompleted?: (result: any, element: UIElement<any>) => void;
|
|
28
27
|
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: UIElement<any>) => void;
|
|
29
28
|
isInstantPayment?: boolean;
|
|
29
|
+
environment?: string;
|
|
30
30
|
type?: string;
|
|
31
31
|
name?: string;
|
|
32
32
|
icon?: string;
|
|
@@ -21,7 +21,6 @@ export declare class DragonpayElement extends UIElement<DragonpayElementProps> {
|
|
|
21
21
|
loadingContext?: string;
|
|
22
22
|
reference?: string;
|
|
23
23
|
i18n?: import("../../language").default;
|
|
24
|
-
environment?: string;
|
|
25
24
|
session?: import("../../core/CheckoutSession/CheckoutSession").default;
|
|
26
25
|
onChange?: (state: any, element: UIElement<any>) => void;
|
|
27
26
|
onValid?: (state: any, element: UIElement<any>) => void;
|
|
@@ -34,6 +33,7 @@ export declare class DragonpayElement extends UIElement<DragonpayElementProps> {
|
|
|
34
33
|
onPaymentCompleted?: (result: any, element: UIElement<any>) => void;
|
|
35
34
|
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: UIElement<any>) => void;
|
|
36
35
|
isInstantPayment?: boolean;
|
|
36
|
+
environment?: string;
|
|
37
37
|
name?: string;
|
|
38
38
|
icon?: string;
|
|
39
39
|
amount?: import("../../types").PaymentAmount;
|
|
@@ -9,7 +9,6 @@ declare class DropinElement extends UIElement<DropinElementProps> {
|
|
|
9
9
|
isDropin: boolean;
|
|
10
10
|
onReady: () => void;
|
|
11
11
|
onComplete: () => void;
|
|
12
|
-
onCancel: () => void;
|
|
13
12
|
onError: () => void;
|
|
14
13
|
onSelect: () => void;
|
|
15
14
|
onDisableStoredPaymentMethod: any;
|
|
@@ -47,13 +46,13 @@ declare class DropinElement extends UIElement<DropinElementProps> {
|
|
|
47
46
|
onSelect?: (paymentMethod: UIElement<any>) => void;
|
|
48
47
|
showRemovePaymentMethodButton?: boolean;
|
|
49
48
|
onDisableStoredPaymentMethod?: (storedPaymentMethod: any, resolve: any, reject: any) => void;
|
|
50
|
-
|
|
49
|
+
/**
|
|
50
|
+
* Calls the onSubmit event with the state of the activePaymentMethod
|
|
51
|
+
*/
|
|
51
52
|
session?: import("../../core/CheckoutSession/CheckoutSession").default;
|
|
52
53
|
onChange?: (state: any, element: UIElement<any>) => void;
|
|
53
54
|
onValid?: (state: any, element: UIElement<any>) => void;
|
|
54
|
-
beforeSubmit?: (state: any, element: UIElement<any>, actions: any) => Promise<void>;
|
|
55
|
-
* Calls the onSubmit event with the state of the activePaymentMethod
|
|
56
|
-
*/
|
|
55
|
+
beforeSubmit?: (state: any, element: UIElement<any>, actions: any) => Promise<void>;
|
|
57
56
|
onComplete?: (state: any, element: UIElement<any>) => void;
|
|
58
57
|
onActionHandled?: (rtnObj: import("../types").ActionHandledReturnObject) => void;
|
|
59
58
|
onAdditionalDetails?: (state: any, element: UIElement<any>) => void;
|
|
@@ -61,6 +60,7 @@ declare class DropinElement extends UIElement<DropinElementProps> {
|
|
|
61
60
|
onPaymentCompleted?: (result: any, element: UIElement<any>) => void;
|
|
62
61
|
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: UIElement<any>) => void;
|
|
63
62
|
isInstantPayment?: boolean;
|
|
63
|
+
environment?: string;
|
|
64
64
|
type?: string;
|
|
65
65
|
name?: string;
|
|
66
66
|
icon?: string;
|
|
@@ -12,7 +12,6 @@ declare class DuitNowElement extends QRLoaderContainer {
|
|
|
12
12
|
introduction: string;
|
|
13
13
|
instructions?: string;
|
|
14
14
|
copyBtn?: boolean;
|
|
15
|
-
environment?: string;
|
|
16
15
|
session?: import("../../core/CheckoutSession/CheckoutSession").default;
|
|
17
16
|
onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
18
17
|
onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
@@ -25,6 +24,7 @@ declare class DuitNowElement extends QRLoaderContainer {
|
|
|
25
24
|
onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
|
|
26
25
|
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
|
|
27
26
|
isInstantPayment?: boolean;
|
|
27
|
+
environment?: string;
|
|
28
28
|
name?: string;
|
|
29
29
|
icon?: string;
|
|
30
30
|
amount?: import("../../types").PaymentAmount;
|
|
@@ -1,23 +1,14 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
2
|
import UIElement from '../UIElement';
|
|
3
3
|
import { PaymentResponse } from '../types';
|
|
4
|
+
import { GiftCardElementData } from './types';
|
|
4
5
|
export declare class GiftcardElement extends UIElement {
|
|
5
6
|
static type: string;
|
|
6
7
|
protected static defaultProps: {
|
|
7
8
|
brandsConfiguration: {};
|
|
8
9
|
};
|
|
9
10
|
formatProps(props: any): any;
|
|
10
|
-
|
|
11
|
-
* Formats the component data output
|
|
12
|
-
*/
|
|
13
|
-
formatData(): {
|
|
14
|
-
paymentMethod: {
|
|
15
|
-
type: any;
|
|
16
|
-
brand: any;
|
|
17
|
-
encryptedCardNumber: any;
|
|
18
|
-
encryptedSecurityCode: any;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
11
|
+
formatData(): GiftCardElementData;
|
|
21
12
|
get isValid(): boolean;
|
|
22
13
|
get icon(): any;
|
|
23
14
|
get displayName(): any;
|
|
@@ -12,7 +12,6 @@ declare class PayNowElement extends QRLoaderContainer {
|
|
|
12
12
|
introduction: string;
|
|
13
13
|
instructions?: string;
|
|
14
14
|
copyBtn?: boolean;
|
|
15
|
-
environment?: string;
|
|
16
15
|
session?: import("../../core/CheckoutSession/CheckoutSession").default;
|
|
17
16
|
onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
18
17
|
onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
@@ -25,6 +24,7 @@ declare class PayNowElement extends QRLoaderContainer {
|
|
|
25
24
|
onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
|
|
26
25
|
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
|
|
27
26
|
isInstantPayment?: boolean;
|
|
27
|
+
environment?: string;
|
|
28
28
|
name?: string;
|
|
29
29
|
icon?: string;
|
|
30
30
|
amount?: import("../../types").PaymentAmount;
|
|
@@ -12,7 +12,6 @@ declare class PromptPayElement extends QRLoaderContainer {
|
|
|
12
12
|
introduction: string;
|
|
13
13
|
instructions?: string;
|
|
14
14
|
copyBtn?: boolean;
|
|
15
|
-
environment?: string;
|
|
16
15
|
session?: import("../../core/CheckoutSession/CheckoutSession").default;
|
|
17
16
|
onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
18
17
|
onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
@@ -25,6 +24,7 @@ declare class PromptPayElement extends QRLoaderContainer {
|
|
|
25
24
|
onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
|
|
26
25
|
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
|
|
27
26
|
isInstantPayment?: boolean;
|
|
27
|
+
environment?: string;
|
|
28
28
|
name?: string;
|
|
29
29
|
icon?: string;
|
|
30
30
|
amount?: import("../../types").PaymentAmount;
|
|
@@ -12,7 +12,6 @@ declare class SwishElement extends QRLoaderContainer {
|
|
|
12
12
|
introduction: string;
|
|
13
13
|
instructions: string;
|
|
14
14
|
copyBtn?: boolean;
|
|
15
|
-
environment?: string;
|
|
16
15
|
session?: import("../../core/CheckoutSession/CheckoutSession").default;
|
|
17
16
|
onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
18
17
|
onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
@@ -25,6 +24,7 @@ declare class SwishElement extends QRLoaderContainer {
|
|
|
25
24
|
onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
|
|
26
25
|
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
|
|
27
26
|
isInstantPayment?: boolean;
|
|
27
|
+
environment?: string;
|
|
28
28
|
name?: string;
|
|
29
29
|
icon?: string;
|
|
30
30
|
amount?: import("../../types").PaymentAmount;
|
|
@@ -12,7 +12,6 @@ declare class WeChatPayElement extends QRLoaderContainer {
|
|
|
12
12
|
introduction: string;
|
|
13
13
|
instructions?: string;
|
|
14
14
|
copyBtn?: boolean;
|
|
15
|
-
environment?: string;
|
|
16
15
|
session?: import("../../core/CheckoutSession/CheckoutSession").default;
|
|
17
16
|
onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
18
17
|
onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
@@ -25,6 +24,7 @@ declare class WeChatPayElement extends QRLoaderContainer {
|
|
|
25
24
|
onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
|
|
26
25
|
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
|
|
27
26
|
isInstantPayment?: boolean;
|
|
27
|
+
environment?: string;
|
|
28
28
|
name?: string;
|
|
29
29
|
icon?: string;
|
|
30
30
|
amount?: import("../../types").PaymentAmount;
|
|
@@ -4,6 +4,7 @@ import ApplePay from './ApplePay';
|
|
|
4
4
|
import Atome from './Atome';
|
|
5
5
|
import { BillDeskOnline, BillDeskWallet } from './BillDesk';
|
|
6
6
|
import Card from './Card';
|
|
7
|
+
import CashAppPay from './CashAppPay';
|
|
7
8
|
import ClickToPay from './ClickToPay';
|
|
8
9
|
import Bancontact from './Card/Bancontact';
|
|
9
10
|
import Donation from './Donation';
|
|
@@ -108,6 +109,7 @@ declare const componentsMap: {
|
|
|
108
109
|
/** Wallets */
|
|
109
110
|
amazonpay: typeof AmazonPay;
|
|
110
111
|
applepay: typeof ApplePay;
|
|
112
|
+
cashapp: typeof CashAppPay;
|
|
111
113
|
clicktopay: typeof ClickToPay;
|
|
112
114
|
googlepay: typeof GooglePay;
|
|
113
115
|
paypal: typeof PayPal;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { SRPanel } from '../../../core/Errors/SRPanel';
|
|
2
|
+
import Language from '../../../language';
|
|
3
|
+
import { CountdownTime } from './types';
|
|
4
|
+
interface ICountdownA11yService {
|
|
5
|
+
srPanel: SRPanel;
|
|
6
|
+
i18n: Language;
|
|
7
|
+
}
|
|
8
|
+
export declare class CountdownA11yReporter {
|
|
9
|
+
protected TRANSLATION_KEY: string;
|
|
10
|
+
protected LONG_TIMEOUT: number;
|
|
11
|
+
protected MID_TIMEOUT: number;
|
|
12
|
+
protected SHORT_TIMEOUT: number;
|
|
13
|
+
private readonly srPanel;
|
|
14
|
+
private readonly i18n;
|
|
15
|
+
private srInterval;
|
|
16
|
+
private timeout;
|
|
17
|
+
private timeLeft;
|
|
18
|
+
constructor(props: ICountdownA11yService);
|
|
19
|
+
update(time: CountdownTime): void;
|
|
20
|
+
tearDown(): void;
|
|
21
|
+
private setInterval;
|
|
22
|
+
private getSrMessages;
|
|
23
|
+
private clearInterval;
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
@@ -1,30 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
onTick?: (time: any) => void;
|
|
5
|
-
onCompleted?: () => void;
|
|
6
|
-
}
|
|
7
|
-
interface CountdownState {
|
|
8
|
-
startTime: Date;
|
|
9
|
-
endTime: Date;
|
|
10
|
-
minutes: string;
|
|
11
|
-
seconds: string;
|
|
12
|
-
}
|
|
13
|
-
declare class Countdown extends Component<CountdownProps, CountdownState> {
|
|
14
|
-
constructor(props: any);
|
|
15
|
-
static defaultProps: {
|
|
16
|
-
onTick: () => void;
|
|
17
|
-
onCompleted: () => void;
|
|
18
|
-
};
|
|
19
|
-
protected interval: any;
|
|
20
|
-
tick(): void | {
|
|
21
|
-
minutes: any;
|
|
22
|
-
seconds: any;
|
|
23
|
-
percentage: number;
|
|
24
|
-
};
|
|
25
|
-
clearInterval(): void;
|
|
26
|
-
componentDidMount(): void;
|
|
27
|
-
componentWillUnmount(): void;
|
|
28
|
-
render(): h.JSX.Element;
|
|
29
|
-
}
|
|
1
|
+
import { h } from 'preact';
|
|
2
|
+
import { CountdownProps } from './types';
|
|
3
|
+
declare function Countdown({ minutesFromNow, onTick, onCompleted }: CountdownProps): h.JSX.Element;
|
|
30
4
|
export default Countdown;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
|
-
declare function RedirectButton({ payButton, onSubmit, amount, name, ...props }: {
|
|
2
|
+
declare function RedirectButton({ label, icon, payButton, onSubmit, amount, name, ...props }: {
|
|
3
3
|
[x: string]: any;
|
|
4
|
+
label?: any;
|
|
5
|
+
icon?: any;
|
|
4
6
|
payButton: any;
|
|
5
7
|
onSubmit: any;
|
|
6
8
|
amount?: any;
|
|
@@ -11,7 +11,7 @@ export declare const ENCRYPTED_BANK_LOCATION_FIELD = "encryptedBankLocationId";
|
|
|
11
11
|
export declare const ENCRYPTED_SECURITY_CODE_3_DIGITS = "encryptedSecurityCode3digits";
|
|
12
12
|
export declare const ENCRYPTED_SECURITY_CODE_4_DIGITS = "encryptedSecurityCode4digits";
|
|
13
13
|
export declare const GIFT_CARD = "giftcard";
|
|
14
|
-
export declare const SF_VERSION = "4.
|
|
14
|
+
export declare const SF_VERSION = "4.5.0";
|
|
15
15
|
export declare const DEFAULT_CARD_GROUP_TYPES: string[];
|
|
16
16
|
export declare const NON_CREDIT_CARD_TYPE_SECURED_FIELDS: string[];
|
|
17
17
|
export declare const CREDIT_CARD_SF_FIELDS: string[];
|