airwallex-payment-elements 1.62.0 → 1.89.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/.gitlab-ci.yml +12 -2
- package/README.md +1 -1
- package/lib/bin/airwallex.cjs.js +2 -2
- package/lib/bin/airwallex.cjs.js.map +1 -1
- package/lib/bin/airwallex.es.js +2 -2
- package/lib/bin/airwallex.es.js.map +1 -1
- package/lib/bin/airwallex.iife.js +2 -2
- package/lib/bin/airwallex.iife.js.map +1 -1
- package/package.json +6 -5
- package/typedoc.config.js +22 -11
- package/types/airwallex.d.ts +250 -100
- package/types/cardNumber.d.ts +10 -5
- package/types/dropInElement.d.ts +45 -35
- package/types/element.d.ts +343 -242
- package/types/index.d.ts +2 -0
- package/types/qrcodeElement.d.ts +13 -5
- package/types/redirectElement.d.ts +12 -4
package/types/dropInElement.d.ts
CHANGED
|
@@ -1,11 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PaymentMethodType, BoxStyle, Appearance, CardNetwork } from './element';
|
|
2
2
|
import { Mode, RecurringOptions, Billing, AuthorizationType } from './airwallex';
|
|
3
3
|
import { ApplePayHppOrDropInRequestOptions, GooglePayRequestOptions, ContactField, LPMFlows } from './element';
|
|
4
|
+
interface WeChatPayFlow {
|
|
5
|
+
desktopFlow?: LPMFlows;
|
|
6
|
+
mobileFlow?: LPMFlows;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
interface DropinTheme {
|
|
10
|
+
palette?: {
|
|
11
|
+
primary?: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
4
14
|
|
|
5
15
|
/**
|
|
6
|
-
* Apply to dropIn element type integration, interface used when createElement called with type `dropIn`
|
|
16
|
+
* Apply to `dropIn` element type integration, interface used when `createElement` called with type `dropIn`
|
|
7
17
|
*/
|
|
8
|
-
export interface DropInElementOptions
|
|
18
|
+
export interface DropInElementOptions {
|
|
19
|
+
/**
|
|
20
|
+
* The layout of each element stays consistent, but you can modify confirm button, inputs, and more.
|
|
21
|
+
*/
|
|
22
|
+
appearance?: Appearance;
|
|
9
23
|
/**
|
|
10
24
|
* The `client_secret` of the Payment Intent when Payment Intent is provided. Otherwise, this should be the `client_secret` of the Customer object.
|
|
11
25
|
*/
|
|
@@ -15,19 +29,19 @@ export interface DropInElementOptions extends ElementOptions {
|
|
|
15
29
|
*/
|
|
16
30
|
currency: string;
|
|
17
31
|
/**
|
|
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.
|
|
32
|
+
* 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
33
|
* 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
|
-
*
|
|
34
|
+
*
|
|
21
35
|
*/
|
|
22
36
|
platformConnectedAccount?: string;
|
|
23
37
|
/**
|
|
24
|
-
* The checkout mode for the shopper, `payment` or `recurring`.
|
|
25
|
-
* @
|
|
38
|
+
* The checkout mode for the shopper, `'payment'` or `'recurring'`.
|
|
39
|
+
* @defaultValue `'payment'`
|
|
26
40
|
*/
|
|
27
41
|
mode?: Mode;
|
|
28
42
|
/**
|
|
29
43
|
* The payment methods your website would like to integrate with
|
|
30
|
-
* @deprecated use
|
|
44
|
+
* @deprecated use {@link methods} instead
|
|
31
45
|
*/
|
|
32
46
|
components?: Array<PaymentMethodType>;
|
|
33
47
|
/**
|
|
@@ -35,41 +49,41 @@ export interface DropInElementOptions extends ElementOptions {
|
|
|
35
49
|
*/
|
|
36
50
|
methods?: Array<PaymentMethodType>;
|
|
37
51
|
/**
|
|
38
|
-
* Whether the amount should be captured automatically upon successful payment authorization.
|
|
52
|
+
* Whether the amount should be captured automatically upon successful payment authorization.
|
|
39
53
|
* Set it to `false` if you want to place a hold on the payment method and capture the funds sometime later.
|
|
40
|
-
* @defaultValue `true`
|
|
54
|
+
* @defaultValue `true`
|
|
41
55
|
*/
|
|
42
56
|
autoCapture?: boolean;
|
|
43
57
|
/**
|
|
44
|
-
* The authorization type for the card payment.
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* @defaultValue `final_auth`
|
|
58
|
+
* The authorization type for the card payment.
|
|
59
|
+
* 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.
|
|
60
|
+
* Currently `pre_auth` is only available when the card brand is Visa or Mastercard. `autoCapture` will be automatically set to `false` if you enable `pre_auth`.
|
|
61
|
+
* @defaultValue `'final_auth'`
|
|
49
62
|
*/
|
|
50
63
|
authorizationType?: AuthorizationType;
|
|
51
64
|
/**
|
|
52
65
|
* Whether you require the shopper to provide CVC when they checkout with a network tokenized card.
|
|
53
66
|
*/
|
|
54
67
|
cvcRequired?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* One or more card networks that you support.
|
|
70
|
+
*/
|
|
71
|
+
allowedCardNetworks?: CardNetwork[];
|
|
55
72
|
/**
|
|
56
73
|
* The options for Wechat Pay.
|
|
57
74
|
*/
|
|
58
|
-
wechatpay?:
|
|
59
|
-
desktopFlow?: LPMFlows;
|
|
60
|
-
mobileFlow?: LPMFlows;
|
|
61
|
-
};
|
|
75
|
+
wechatpay?: WeChatPayFlow;
|
|
62
76
|
/**
|
|
63
|
-
* Checkout configuration options for Apple Pay.
|
|
77
|
+
* Checkout configuration options for Apple Pay.
|
|
64
78
|
*/
|
|
65
79
|
applePayRequestOptions?: ApplePayHppOrDropInRequestOptions;
|
|
66
80
|
/**
|
|
67
|
-
* Checkout configuration options for Google Pay.
|
|
81
|
+
* Checkout configuration options for Google Pay.
|
|
68
82
|
*/
|
|
69
83
|
googlePayRequestOptions?: GooglePayRequestOptions;
|
|
70
84
|
/**
|
|
71
85
|
* Indicate to improve 3DS experience, indicate if the payment form will collect billing info from shopper
|
|
72
|
-
* @deprecated please use
|
|
86
|
+
* @deprecated please use {@link requiredBillingContactFields} instead
|
|
73
87
|
*/
|
|
74
88
|
withBilling?: boolean;
|
|
75
89
|
/**
|
|
@@ -77,20 +91,20 @@ export interface DropInElementOptions extends ElementOptions {
|
|
|
77
91
|
*/
|
|
78
92
|
requiredBillingContactFields?: ContactField[];
|
|
79
93
|
/**
|
|
80
|
-
*
|
|
94
|
+
* Box style for the dropIn element.
|
|
81
95
|
*/
|
|
82
96
|
style?: BoxStyle;
|
|
83
97
|
/**
|
|
84
|
-
* The container
|
|
98
|
+
* The container of the authentication form used in 3D Secure authentication.
|
|
85
99
|
*/
|
|
86
100
|
authFormContainer?: string;
|
|
87
101
|
/**
|
|
88
|
-
* The ID of the Payment Intent you would like to checkout. Required when `mode` is `payment`.
|
|
102
|
+
* The ID of the Payment Intent you would like to checkout. Required when `mode` is `'payment'`.
|
|
89
103
|
*/
|
|
90
104
|
intent_id?: string;
|
|
91
105
|
/**
|
|
92
106
|
* 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`.
|
|
107
|
+
* This field is required when `mode` is `'recurring'`.
|
|
94
108
|
*/
|
|
95
109
|
customer_id?: string;
|
|
96
110
|
/**
|
|
@@ -106,25 +120,21 @@ export interface DropInElementOptions extends ElementOptions {
|
|
|
106
120
|
*/
|
|
107
121
|
shopper_name?: string;
|
|
108
122
|
/**
|
|
109
|
-
* The
|
|
123
|
+
* The shopper's phone number.
|
|
110
124
|
*/
|
|
111
125
|
shopper_phone?: string;
|
|
112
126
|
/**
|
|
113
|
-
* The
|
|
127
|
+
* The shopper's email address.
|
|
114
128
|
*/
|
|
115
129
|
shopper_email?: string;
|
|
116
130
|
/**
|
|
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
|
|
131
|
+
* Billing information provided by the merchant.
|
|
132
|
+
* This option overrides the billing information from the shopper as provided in the input billing fields. Do not set `withBilling` and `requiredBillingContactFields` when you use this option.
|
|
119
133
|
*/
|
|
120
134
|
billing?: Billing;
|
|
121
135
|
|
|
122
136
|
/**
|
|
123
137
|
* Customize DropIn Element style.
|
|
124
138
|
*/
|
|
125
|
-
theme?:
|
|
126
|
-
palette?: {
|
|
127
|
-
primary?: string;
|
|
128
|
-
};
|
|
129
|
-
};
|
|
139
|
+
theme?: DropinTheme;
|
|
130
140
|
}
|