airwallex-payment-elements 1.45.0 → 1.62.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/lib/bin/airwallex.cjs.js +2 -2
- package/lib/bin/airwallex.es.js +2 -2
- package/lib/bin/airwallex.iife.js +2 -2
- package/package.json +5 -9
- package/{typedocconfig.js → typedoc.config.js} +7 -18
- package/types/airwallex.d.ts +197 -161
- package/types/cardNumber.d.ts +7 -7
- package/types/dropInElement.d.ts +34 -27
- package/types/element.d.ts +386 -223
package/types/cardNumber.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The
|
|
2
|
+
* The Payment Intent you would like to checkout.
|
|
3
3
|
* Refer to [Airwallex Client API](https://www.airwallex.com/docs/api#/Payment_Acceptance/Payment_Intents/Intro)
|
|
4
4
|
*
|
|
5
5
|
* ***Hint***:
|
|
6
|
-
* This interface only
|
|
7
|
-
* For
|
|
6
|
+
* This interface only contains information necessary for a checkout via UI elements.
|
|
7
|
+
* For detailed information on each field refer to the API Reference.
|
|
8
8
|
*/
|
|
9
9
|
import { Billing } from './airwallex';
|
|
10
10
|
|
|
11
11
|
export interface Intent {
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* The ID of the Paymnent Intent.
|
|
14
14
|
*/
|
|
15
15
|
id: string;
|
|
16
16
|
/**
|
|
17
|
-
* client_secret of
|
|
17
|
+
* The `client_secret` of the Payment Intent when Payment Intent is provided. Otherwise, this should be the `client_secret` of the Customer object.
|
|
18
18
|
*/
|
|
19
19
|
client_secret?: string;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* Unique request ID specified by the merchant.
|
|
22
22
|
*/
|
|
23
23
|
request_id?: string;
|
|
24
24
|
amount?: number;
|
|
@@ -70,7 +70,7 @@ export interface Intent {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
|
-
* Interface for
|
|
73
|
+
* Interface for Payment Method returned to the merchant when provided in createPaymentConsent.
|
|
74
74
|
* Refer to the type description: https://www.airwallex.com/docs/api#/Payment_Acceptance/Payment_Methods/_api_v1_pa_payment_methods_create/post
|
|
75
75
|
*/
|
|
76
76
|
export interface PaymentMethodBasicInfo {
|
package/types/dropInElement.d.ts
CHANGED
|
@@ -3,24 +3,25 @@ import { Mode, RecurringOptions, Billing, AuthorizationType } from './airwallex'
|
|
|
3
3
|
import { ApplePayHppOrDropInRequestOptions, GooglePayRequestOptions, ContactField, LPMFlows } from './element';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* Apply to dropIn element type integration, interface used when
|
|
6
|
+
* Apply to dropIn element type integration, interface used when createElement called with type `dropIn`
|
|
7
7
|
*/
|
|
8
8
|
export interface DropInElementOptions extends ElementOptions {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
* If no intent provided, this should be the client_secret of the customer
|
|
10
|
+
* The `client_secret` of the Payment Intent when Payment Intent is provided. Otherwise, this should be the `client_secret` of the Customer object.
|
|
12
11
|
*/
|
|
13
12
|
client_secret: string;
|
|
14
13
|
/**
|
|
15
|
-
*
|
|
14
|
+
* The three-letter ISO currency code representing the currency of the Payment Intent or Payment Consent.
|
|
16
15
|
*/
|
|
17
16
|
currency: string;
|
|
18
17
|
/**
|
|
19
|
-
*
|
|
18
|
+
* When using Payments for Platforms, specify the ID of the connected account associated with the payment if you want to use its information to process the payment.
|
|
19
|
+
* For example, the statement descriptor displayed on the shopper's credit card or bank statement and the payment methods activated by the connected account.
|
|
20
|
+
*
|
|
20
21
|
*/
|
|
21
22
|
platformConnectedAccount?: string;
|
|
22
23
|
/**
|
|
23
|
-
*
|
|
24
|
+
* The checkout mode for the shopper, `payment` or `recurring`.
|
|
24
25
|
* @default payment
|
|
25
26
|
*/
|
|
26
27
|
mode?: Mode;
|
|
@@ -30,34 +31,40 @@ export interface DropInElementOptions extends ElementOptions {
|
|
|
30
31
|
*/
|
|
31
32
|
components?: Array<PaymentMethodType>;
|
|
32
33
|
/**
|
|
33
|
-
* The payment methods your website would like to integrate with
|
|
34
|
+
* The payment methods your website would like to integrate with.
|
|
34
35
|
*/
|
|
35
36
|
methods?: Array<PaymentMethodType>;
|
|
36
37
|
/**
|
|
37
|
-
*
|
|
38
|
+
* Whether the amount should be captured automatically upon successful payment authorization.
|
|
39
|
+
* Set it to `false` if you want to place a hold on the payment method and capture the funds sometime later.
|
|
38
40
|
* @defaultValue `true` if authorization type is `final_auth` and `false` for `pre_auth`.
|
|
39
41
|
*/
|
|
40
42
|
autoCapture?: boolean;
|
|
41
43
|
/**
|
|
42
|
-
* The authorization type
|
|
44
|
+
* The authorization type for the card payment. Options include: `pre_auth`, `final_auth`.
|
|
45
|
+
* Defaults to `final_auth` to enable funds to be captured immediately after successful authorization.
|
|
46
|
+
* Set it to `pre_auth` if you want to place a hold on your customer’s card for more than 7 days, i.e., extend the authorization time window.
|
|
47
|
+
* Currently `pre_auth` is only available when the card brand is Visa or Mastercard. You should also set `autoCapture` to `false` if you want to enable `pre_auth`.
|
|
43
48
|
* @defaultValue `final_auth`
|
|
44
49
|
*/
|
|
45
50
|
authorizationType?: AuthorizationType;
|
|
46
51
|
/**
|
|
47
|
-
*
|
|
52
|
+
* Whether you require the shopper to provide CVC when they checkout with a network tokenized card.
|
|
53
|
+
*/
|
|
54
|
+
cvcRequired?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* The options for Wechat Pay.
|
|
48
57
|
*/
|
|
49
58
|
wechatpay?: {
|
|
50
59
|
desktopFlow?: LPMFlows;
|
|
51
60
|
mobileFlow?: LPMFlows;
|
|
52
61
|
};
|
|
53
62
|
/**
|
|
54
|
-
*
|
|
55
|
-
* If you want to integrate with apple pay, you need to provide the following options
|
|
63
|
+
* Checkout configuration options for Apple Pay.
|
|
56
64
|
*/
|
|
57
65
|
applePayRequestOptions?: ApplePayHppOrDropInRequestOptions;
|
|
58
66
|
/**
|
|
59
|
-
*
|
|
60
|
-
* If you want to integrate with apple pay, you need to provide the following options
|
|
67
|
+
* Checkout configuration options for Google Pay.
|
|
61
68
|
*/
|
|
62
69
|
googlePayRequestOptions?: GooglePayRequestOptions;
|
|
63
70
|
/**
|
|
@@ -70,50 +77,50 @@ export interface DropInElementOptions extends ElementOptions {
|
|
|
70
77
|
*/
|
|
71
78
|
requiredBillingContactFields?: ContactField[];
|
|
72
79
|
/**
|
|
73
|
-
* Style for dropIn element
|
|
80
|
+
* Style for the dropIn element.
|
|
74
81
|
*/
|
|
75
82
|
style?: BoxStyle;
|
|
76
83
|
/**
|
|
77
|
-
*
|
|
84
|
+
* The container ID of the authentication form used in 3D Secure authentication.
|
|
78
85
|
*/
|
|
79
86
|
authFormContainer?: string;
|
|
80
87
|
/**
|
|
81
|
-
* The
|
|
88
|
+
* The ID of the Payment Intent you would like to checkout. Required when `mode` is `payment`.
|
|
82
89
|
*/
|
|
83
90
|
intent_id?: string;
|
|
84
91
|
/**
|
|
85
|
-
*
|
|
92
|
+
* The ID of the Customer used in registered user checkout. Refer to [Airwallex Client API](https://www.airwallex.com/docs/api#/Payment_Acceptance/Customers/Intro)
|
|
93
|
+
* This field is required when `mode` is `recurring`.
|
|
86
94
|
*/
|
|
87
95
|
customer_id?: string;
|
|
88
96
|
/**
|
|
89
|
-
*
|
|
97
|
+
* Options for recurring flow.
|
|
90
98
|
*/
|
|
91
99
|
recurringOptions?: RecurringOptions;
|
|
92
100
|
/**
|
|
93
|
-
* The
|
|
94
|
-
* If you want to integrate with `bank_transfer` payment method, it would be required
|
|
101
|
+
* The two-letter ISO country code of the shopper's country. This is required for `bank_transfer`, `online_banking`, `skrill` or `seven_eleven` payment methods.
|
|
95
102
|
*/
|
|
96
103
|
country_code?: string;
|
|
97
104
|
/**
|
|
98
|
-
*
|
|
105
|
+
* The shopper's full name.
|
|
99
106
|
*/
|
|
100
107
|
shopper_name?: string;
|
|
101
108
|
/**
|
|
102
|
-
*
|
|
109
|
+
* The shoppers's phone number.
|
|
103
110
|
*/
|
|
104
111
|
shopper_phone?: string;
|
|
105
112
|
/**
|
|
106
|
-
*
|
|
113
|
+
* The shoppers's email address.
|
|
107
114
|
*/
|
|
108
115
|
shopper_email?: string;
|
|
109
116
|
/**
|
|
110
|
-
* Billing
|
|
111
|
-
* This option
|
|
117
|
+
* Billing information provided by the merchant.
|
|
118
|
+
* This option overrides the billing information from the shopper as provided in the input billing fields. Do not sett `withBilling` and `requiredBillingContactFields` when you use this option.
|
|
112
119
|
*/
|
|
113
120
|
billing?: Billing;
|
|
114
121
|
|
|
115
122
|
/**
|
|
116
|
-
* Customize DropIn Element
|
|
123
|
+
* Customize DropIn Element style.
|
|
117
124
|
*/
|
|
118
125
|
theme?: {
|
|
119
126
|
palette?: {
|