@adyen/adyen-web 4.9.0 → 5.2.1
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/adyen.css +4 -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 +4 -0
- package/dist/cjs/adyen.css.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/es/adyen.css +4 -0
- package/dist/es/adyen.css.map +1 -1
- package/dist/es/index.js +1 -1
- package/dist/es/it-IT.js +1 -1
- package/dist/types/components/ApplePay/ApplePay.d.ts +1 -4
- package/dist/types/components/ApplePay/defaultProps.d.ts +0 -2
- package/dist/types/components/ApplePay/types.d.ts +1 -4
- package/dist/types/components/BacsDD/components/types.d.ts +1 -1
- package/dist/types/components/BankTransfer/types.d.ts +1 -1
- package/dist/types/components/BaseElement.d.ts +2 -13
- package/dist/types/components/BcmcMobile/BcmcMobile.d.ts +8 -1
- package/dist/types/components/Blik/components/BlikInput.d.ts +1 -1
- package/dist/types/components/Card/Bancontact.d.ts +14 -3
- package/dist/types/components/Card/Card.d.ts +8 -1
- package/dist/types/components/Card/components/CardInput/components/CardFields.d.ts +1 -1
- package/dist/types/components/Card/components/CardInput/components/types.d.ts +6 -5
- package/dist/types/components/Card/components/CardInput/types.d.ts +4 -3
- package/dist/types/components/Card/types.d.ts +4 -2
- package/dist/types/components/Dragonpay/Dragonpay.d.ts +9 -4
- package/dist/types/components/Dragonpay/types.d.ts +1 -1
- package/dist/types/components/Dropin/Dropin.d.ts +0 -3
- package/dist/types/components/Dropin/components/utils.d.ts +2 -0
- package/dist/types/components/Dropin/defaultProps.d.ts +0 -2
- package/dist/types/components/Dropin/types.d.ts +2 -1
- package/dist/types/components/Econtext/Econtext.d.ts +11 -1
- package/dist/types/components/Econtext/components/EcontextInput/EcontextInput.d.ts +14 -2
- package/dist/types/components/Giftcard/Giftcard.d.ts +3 -2
- package/dist/types/components/GooglePay/GooglePay.d.ts +0 -4
- package/dist/types/components/GooglePay/defaultProps.d.ts +0 -2
- package/dist/types/components/GooglePay/types.d.ts +1 -1
- package/dist/types/components/Klarna/types.d.ts +3 -3
- package/dist/types/components/MBWay/components/MBWayInput/types.d.ts +1 -1
- package/dist/types/components/PayPal/Paypal.d.ts +1 -2
- package/dist/types/components/PayPal/types.d.ts +6 -1
- package/dist/types/components/Pix/Pix.d.ts +8 -1
- package/dist/types/components/Redirect/components/RedirectShopper/RedirectShopper.d.ts +2 -3
- package/dist/types/components/Swish/Swish.d.ts +8 -1
- package/dist/types/components/UIElement.d.ts +30 -26
- package/dist/types/components/WeChat/WeChat.d.ts +8 -1
- package/dist/types/components/helpers/IssuerListContainer.d.ts +8 -8
- package/dist/types/components/helpers/QRLoaderContainer.d.ts +2 -1
- package/dist/types/components/index.d.ts +1 -1
- package/dist/types/components/internal/Await/types.d.ts +1 -1
- package/dist/types/components/internal/IssuerList/ContentSeparator/ContentSeparator.d.ts +4 -0
- package/dist/types/components/internal/IssuerList/ContentSeparator/index.d.ts +1 -0
- package/dist/types/components/internal/IssuerList/IssuerButtonGroup/IssuerButton.d.ts +11 -0
- package/dist/types/components/internal/IssuerList/IssuerButtonGroup/IssuerButtonGroup.d.ts +10 -0
- package/dist/types/components/internal/IssuerList/IssuerButtonGroup/index.d.ts +1 -0
- package/dist/types/components/internal/IssuerList/IssuerList.d.ts +2 -7
- package/dist/types/components/internal/IssuerList/types.d.ts +16 -0
- package/dist/types/components/internal/PayButton/PayButton.d.ts +2 -2
- package/dist/types/components/internal/QRLoader/QRLoader.d.ts +6 -6
- package/dist/types/components/internal/QRLoader/types.d.ts +0 -1
- package/dist/types/components/internal/SecuredFields/SecuredFieldsProvider.d.ts +3 -3
- package/dist/types/components/internal/SecuredFields/defaultProps.d.ts +2 -1
- package/dist/types/components/internal/SecuredFields/lib/configuration/constants.d.ts +11 -6
- package/dist/types/components/internal/SecuredFields/lib/core/AbstractCSF.d.ts +2 -1
- package/dist/types/components/internal/SecuredFields/lib/core/AbstractSecuredField.d.ts +4 -3
- package/dist/types/components/internal/SecuredFields/lib/core/SecuredField.d.ts +2 -2
- package/dist/types/components/internal/SecuredFields/lib/core/utils/handleBrandFromBinLookup.d.ts +2 -1
- package/dist/types/components/internal/SecuredFields/lib/core/utils/processBrand.d.ts +6 -0
- package/dist/types/components/internal/SecuredFields/lib/types.d.ts +9 -4
- package/dist/types/components/internal/SecuredFields/lib/utilities/commonUtils.d.ts +4 -1
- package/dist/types/components/types.d.ts +48 -0
- package/dist/types/components/utils.d.ts +3 -0
- package/dist/types/core/CheckoutSession/CheckoutSession.d.ts +47 -0
- package/dist/types/core/CheckoutSession/index.d.ts +1 -0
- package/dist/types/core/CheckoutSession/utils.d.ts +2 -0
- package/dist/types/core/Errors/AdyenCheckoutError.d.ts +14 -0
- package/dist/types/core/RiskModule/RiskModule.d.ts +2 -1
- package/dist/types/core/Services/{collect-id.d.ts → analytics/collect-id.d.ts} +0 -0
- package/dist/types/core/Services/{log-event.d.ts → analytics/log-event.d.ts} +0 -0
- package/dist/types/core/Services/{post-telemetry.d.ts → analytics/post-telemetry.d.ts} +0 -0
- package/dist/types/core/Services/sessions/check-balance.d.ts +6 -0
- package/dist/types/core/Services/sessions/constants.d.ts +1 -0
- package/dist/types/core/Services/sessions/create-order.d.ts +6 -0
- package/dist/types/core/Services/sessions/make-payment.d.ts +6 -0
- package/dist/types/core/Services/sessions/setup-session.d.ts +6 -0
- package/dist/types/core/Services/sessions/submit-details.d.ts +6 -0
- package/dist/types/core/core.d.ts +14 -1
- package/dist/types/core/types.d.ts +1 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/types/index.d.ts +38 -0
- package/dist/types/utils/Script.d.ts +3 -1
- package/dist/types/utils/Storage.d.ts +10 -0
- package/dist/types/utils/hasOwnProperty.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { CheckoutSession, CheckoutSessionBalanceResponse, CheckoutSessionDetailsResponse, CheckoutSessionOrdersResponse, CheckoutSessionPaymentResponse, CheckoutSessionSetupResponse } from '../../types';
|
|
2
|
+
declare class Session {
|
|
3
|
+
private readonly session;
|
|
4
|
+
private readonly storage;
|
|
5
|
+
readonly clientKey: string;
|
|
6
|
+
readonly loadingContext: string;
|
|
7
|
+
constructor(rawSession: CheckoutSession, clientKey: string, loadingContext: string);
|
|
8
|
+
get id(): string;
|
|
9
|
+
get data(): string;
|
|
10
|
+
/**
|
|
11
|
+
* Updates the session.data with the latest data blob
|
|
12
|
+
*/
|
|
13
|
+
private updateSessionData;
|
|
14
|
+
/**
|
|
15
|
+
* Fetches data from a session
|
|
16
|
+
*/
|
|
17
|
+
setupSession(options: any): Promise<CheckoutSessionSetupResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Submits a session payment
|
|
20
|
+
*/
|
|
21
|
+
submitPayment(data: any): Promise<CheckoutSessionPaymentResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* Submits session payment additional details
|
|
24
|
+
*/
|
|
25
|
+
submitDetails(data: any): Promise<CheckoutSessionDetailsResponse>;
|
|
26
|
+
/**
|
|
27
|
+
* Checks the balance for a payment method
|
|
28
|
+
*/
|
|
29
|
+
checkBalance(data: any): Promise<CheckoutSessionBalanceResponse>;
|
|
30
|
+
/**
|
|
31
|
+
* Creates an order for the current session
|
|
32
|
+
*/
|
|
33
|
+
createOrder(): Promise<CheckoutSessionOrdersResponse>;
|
|
34
|
+
/**
|
|
35
|
+
* Gets the stored session but only if the current id and the stored id match
|
|
36
|
+
*/
|
|
37
|
+
getStoredSession(): CheckoutSession;
|
|
38
|
+
/**
|
|
39
|
+
* Stores the session
|
|
40
|
+
*/
|
|
41
|
+
storeSession(): void;
|
|
42
|
+
/**
|
|
43
|
+
* Clears the stored session
|
|
44
|
+
*/
|
|
45
|
+
removeStoredSession(): void;
|
|
46
|
+
}
|
|
47
|
+
export default Session;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './CheckoutSession';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare class AdyenCheckoutError extends Error {
|
|
2
|
+
protected static errorTypes: {
|
|
3
|
+
/** Network error. */
|
|
4
|
+
NETWORK_ERROR: string;
|
|
5
|
+
/** Shopper canceled the current transaction. */
|
|
6
|
+
CANCEL: string;
|
|
7
|
+
/** Implementation error. The method or parameter are incorrect or are not supported. */
|
|
8
|
+
IMPLEMENTATION_ERROR: string;
|
|
9
|
+
/** Generic error. */
|
|
10
|
+
ERROR: string;
|
|
11
|
+
};
|
|
12
|
+
constructor(type: keyof typeof AdyenCheckoutError.errorTypes, message?: string);
|
|
13
|
+
}
|
|
14
|
+
export default AdyenCheckoutError;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
|
-
import BaseElement
|
|
2
|
+
import BaseElement from '../../components/BaseElement';
|
|
3
|
+
import { BaseElementProps } from '../../components/types';
|
|
3
4
|
export interface RiskModuleOptions {
|
|
4
5
|
enabled: boolean;
|
|
5
6
|
onComplete: (data: any) => void;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const API_VERSION = "v1";
|
|
@@ -2,7 +2,9 @@ import UIElement from '../components/UIElement';
|
|
|
2
2
|
import { PaymentAction } from '../types';
|
|
3
3
|
import { CoreOptions } from './types';
|
|
4
4
|
import { PaymentMethods, PaymentMethodOptions } from '../types';
|
|
5
|
+
import Session from './CheckoutSession';
|
|
5
6
|
declare class Core {
|
|
7
|
+
session: Session;
|
|
6
8
|
private paymentMethodsResponse;
|
|
7
9
|
modules: any;
|
|
8
10
|
options: CoreOptions;
|
|
@@ -14,6 +16,17 @@ declare class Core {
|
|
|
14
16
|
buildId: string;
|
|
15
17
|
};
|
|
16
18
|
constructor(options: CoreOptions);
|
|
19
|
+
initialize(): Promise<this>;
|
|
20
|
+
/**
|
|
21
|
+
* Submit data to payments using the onSubmit event or the session flow if available
|
|
22
|
+
* @param data -
|
|
23
|
+
*/
|
|
24
|
+
submitPayment(data: any): void;
|
|
25
|
+
/**
|
|
26
|
+
* Submits details using onAdditionalDetails or the session flow if available
|
|
27
|
+
* @param details -
|
|
28
|
+
*/
|
|
29
|
+
submitDetails(details: any): void;
|
|
17
30
|
/**
|
|
18
31
|
* Instantiates a new UIElement component ready to be mounted
|
|
19
32
|
* @param paymentMethod - name or class of the paymentMethod
|
|
@@ -34,7 +47,7 @@ declare class Core {
|
|
|
34
47
|
* @param options - props to update
|
|
35
48
|
* @returns this - the element instance
|
|
36
49
|
*/
|
|
37
|
-
update: (options?: CoreOptions) => this
|
|
50
|
+
update: (options?: CoreOptions) => Promise<this>;
|
|
38
51
|
/**
|
|
39
52
|
* Remove the reference of a component
|
|
40
53
|
* @param component - reference to the component to be removed
|
|
@@ -4,6 +4,7 @@ import { AnalyticsOptions } from './Analytics/types';
|
|
|
4
4
|
import { PaymentMethodsResponseObject } from './ProcessResponse/PaymentMethodsResponse/types';
|
|
5
5
|
import { RiskModuleOptions } from './RiskModule/RiskModule';
|
|
6
6
|
export interface CoreOptions {
|
|
7
|
+
session?: any;
|
|
7
8
|
/**
|
|
8
9
|
* Use test. When you're ready to accept live payments, change the value to one of our {@link https://docs.adyen.com/checkout/drop-in-web#testing-your-integration | live environments}.
|
|
9
10
|
*/
|
package/dist/types/index.d.ts
CHANGED
|
@@ -134,6 +134,10 @@ export interface Order {
|
|
|
134
134
|
* The pspReference that belongs to the order.
|
|
135
135
|
*/
|
|
136
136
|
pspReference: string;
|
|
137
|
+
/**
|
|
138
|
+
* The remaining amount to complete the order.
|
|
139
|
+
*/
|
|
140
|
+
remainingAmount?: PaymentAmount;
|
|
137
141
|
}
|
|
138
142
|
export interface OrderStatus {
|
|
139
143
|
expiresAt: string;
|
|
@@ -170,3 +174,37 @@ export declare type PaymentMethodOptions<P extends keyof PaymentMethods> = Insta
|
|
|
170
174
|
* Visibility options for a fieldset
|
|
171
175
|
*/
|
|
172
176
|
export declare type FieldsetVisibility = 'editable' | 'hidden' | 'readOnly';
|
|
177
|
+
export declare type CheckoutSession = {
|
|
178
|
+
id: string;
|
|
179
|
+
sessionData: string;
|
|
180
|
+
};
|
|
181
|
+
export declare type CheckoutSessionSetupResponse = {
|
|
182
|
+
id: string;
|
|
183
|
+
sessionData: string;
|
|
184
|
+
amount: PaymentAmount;
|
|
185
|
+
expiresAt: string;
|
|
186
|
+
paymentMethods: any;
|
|
187
|
+
returnUrl: string;
|
|
188
|
+
};
|
|
189
|
+
export declare type CheckoutSessionPaymentResponse = {
|
|
190
|
+
sessionData: string;
|
|
191
|
+
status?: string;
|
|
192
|
+
resultCode?: string;
|
|
193
|
+
action?: PaymentAction;
|
|
194
|
+
};
|
|
195
|
+
export declare type CheckoutSessionDetailsResponse = {
|
|
196
|
+
sessionData: string;
|
|
197
|
+
status?: string;
|
|
198
|
+
resultCode?: string;
|
|
199
|
+
action?: PaymentAction;
|
|
200
|
+
};
|
|
201
|
+
export declare type CheckoutSessionBalanceResponse = {
|
|
202
|
+
sessionData: string;
|
|
203
|
+
balance?: PaymentAmount;
|
|
204
|
+
transactionLimit?: PaymentAmount;
|
|
205
|
+
};
|
|
206
|
+
export declare type CheckoutSessionOrdersResponse = {
|
|
207
|
+
sessionData: string;
|
|
208
|
+
orderData: string;
|
|
209
|
+
pspReference: string;
|
|
210
|
+
};
|
|
@@ -15,7 +15,9 @@ declare class Script {
|
|
|
15
15
|
private readonly script;
|
|
16
16
|
private readonly src;
|
|
17
17
|
private readonly node;
|
|
18
|
-
|
|
18
|
+
private readonly attributes;
|
|
19
|
+
private readonly dataAttributes;
|
|
20
|
+
constructor(src: any, node?: string, attributes?: Partial<HTMLScriptElement>, dataAttributes?: Record<string, string | undefined>);
|
|
19
21
|
load: () => Promise<any>;
|
|
20
22
|
remove: () => void;
|
|
21
23
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function hasOwnProperty(obj: any, prop: any): any;
|
package/package.json
CHANGED