@bigcommerce/checkout-sdk 1.205.1 → 1.207.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/CHANGELOG.md +28 -0
- package/dist/checkout-button.js +1 -1
- package/dist/checkout-button.js.map +1 -1
- package/dist/checkout-button.umd.js +5 -5
- package/dist/checkout-button.umd.js.map +1 -1
- package/dist/checkout-sdk.d.ts +52 -1
- package/dist/checkout-sdk.js +1 -1
- package/dist/checkout-sdk.js.map +1 -1
- package/dist/checkout-sdk.umd.js +7 -7
- package/dist/checkout-sdk.umd.js.map +1 -1
- package/dist/embedded-checkout.js +1 -1
- package/dist/embedded-checkout.umd.js +5 -5
- package/dist/embedded-checkout.umd.js.map +1 -1
- package/dist/hosted-form.umd.js +2 -2
- package/dist/hosted-form.umd.js.map +1 -1
- package/dist/internal-mappers.umd.js +1 -1
- package/dist/internal-mappers.umd.js.map +1 -1
- package/docs/README.md +2 -0
- package/docs/interfaces/adyencomponent.md +24 -0
- package/docs/interfaces/adyencomponentevents.md +16 -0
- package/docs/interfaces/adyencreditcardcomponentoptions.md +18 -0
- package/docs/interfaces/adyenv2paymentinitializeoptions.md +25 -0
- package/docs/interfaces/cardpaymentmethodstate.md +3 -3
- package/docs/interfaces/cardstate.md +14 -0
- package/docs/interfaces/cardstateerrors.md +11 -0
- package/docs/interfaces/paymentinitializeoptions.md +10 -0
- package/docs/interfaces/stripeupepaymentinitializeoptions.md +41 -0
- package/package.json +1 -1
package/dist/checkout-sdk.d.ts
CHANGED
|
@@ -68,6 +68,13 @@ declare interface AdyenBaseCardComponentOptions {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
declare interface AdyenComponent {
|
|
71
|
+
componentRef?: {
|
|
72
|
+
showValidation(): void;
|
|
73
|
+
};
|
|
74
|
+
props?: {
|
|
75
|
+
type?: string;
|
|
76
|
+
};
|
|
77
|
+
state?: CardState;
|
|
71
78
|
mount(containerId: string): HTMLElement;
|
|
72
79
|
unmount(): void;
|
|
73
80
|
}
|
|
@@ -83,6 +90,7 @@ declare interface AdyenComponentEvents {
|
|
|
83
90
|
* incomplete field. Called again when errors are cleared.
|
|
84
91
|
*/
|
|
85
92
|
onError?(state: AdyenComponentState, component: AdyenComponent): void;
|
|
93
|
+
onFieldValid?(state: AdyenComponentState, component: AdyenComponent): void;
|
|
86
94
|
}
|
|
87
95
|
|
|
88
96
|
declare type AdyenComponentState = (CardState | WechatState);
|
|
@@ -252,6 +260,8 @@ declare interface AdyenV2PaymentInitializeOptions {
|
|
|
252
260
|
* Optional. Overwriting the default options
|
|
253
261
|
*/
|
|
254
262
|
options?: Omit<AdyenCreditCardComponentOptions, 'onChange'> | AdyenIdealComponentOptions;
|
|
263
|
+
shouldShowNumberField?: boolean;
|
|
264
|
+
validateCardFields(componentState: AdyenComponentState): void;
|
|
255
265
|
}
|
|
256
266
|
|
|
257
267
|
/**
|
|
@@ -1133,12 +1143,20 @@ declare interface CardPaymentMethodState extends AdyenPaymentMethodState {
|
|
|
1133
1143
|
encryptedExpiryMonth: string;
|
|
1134
1144
|
encryptedExpiryYear: string;
|
|
1135
1145
|
encryptedSecurityCode: string;
|
|
1136
|
-
holderName
|
|
1146
|
+
holderName: string;
|
|
1137
1147
|
}
|
|
1138
1148
|
|
|
1139
1149
|
declare interface CardState {
|
|
1140
1150
|
data: CardDataPaymentMethodState;
|
|
1141
1151
|
isValid?: boolean;
|
|
1152
|
+
valid?: {
|
|
1153
|
+
[key: string]: boolean;
|
|
1154
|
+
};
|
|
1155
|
+
errors?: CardStateErrors;
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
declare interface CardStateErrors {
|
|
1159
|
+
[key: string]: string;
|
|
1142
1160
|
}
|
|
1143
1161
|
|
|
1144
1162
|
declare interface Cart {
|
|
@@ -5078,6 +5096,11 @@ declare interface PaymentInitializeOptions extends PaymentRequestOptions {
|
|
|
5078
5096
|
* They can be omitted unless you need to support StripeV3.
|
|
5079
5097
|
*/
|
|
5080
5098
|
stripev3?: StripeV3PaymentInitializeOptions;
|
|
5099
|
+
/**
|
|
5100
|
+
* The options that are required to initialize the StripeUPE payment method.
|
|
5101
|
+
* They can be omitted unless you need to support StripeUPE.
|
|
5102
|
+
*/
|
|
5103
|
+
stripeupe?: StripeUPEPaymentInitializeOptions;
|
|
5081
5104
|
/**
|
|
5082
5105
|
* The options that are required to initialize the Mollie payment method.
|
|
5083
5106
|
* They can be omitted unless you need to support Mollie.
|
|
@@ -6076,6 +6099,34 @@ declare interface StripeElementStyleVariant extends StripeElementCSSProperties {
|
|
|
6076
6099
|
};
|
|
6077
6100
|
}
|
|
6078
6101
|
|
|
6102
|
+
/**
|
|
6103
|
+
* A set of options that are required to initialize the Stripe payment method.
|
|
6104
|
+
*
|
|
6105
|
+
* Once Stripe payment is initialized, credit card form fields, provided by the
|
|
6106
|
+
* payment provider as iframes, will be inserted into the current page. These
|
|
6107
|
+
* options provide a location and styling for each of the form fields.
|
|
6108
|
+
*
|
|
6109
|
+
* ```html
|
|
6110
|
+
* <!-- This is where the credit card component will be inserted -->
|
|
6111
|
+
* <div id="container"></div>
|
|
6112
|
+
* ```
|
|
6113
|
+
*
|
|
6114
|
+
* ```js
|
|
6115
|
+
* service.initializePayment({
|
|
6116
|
+
* methodId: 'stripeupe',
|
|
6117
|
+
* stripeupe {
|
|
6118
|
+
* containerId: 'container',
|
|
6119
|
+
* },
|
|
6120
|
+
* });
|
|
6121
|
+
* ```
|
|
6122
|
+
*/
|
|
6123
|
+
declare interface StripeUPEPaymentInitializeOptions {
|
|
6124
|
+
/**
|
|
6125
|
+
* The location to insert the credit card number form field.
|
|
6126
|
+
*/
|
|
6127
|
+
containerId: string;
|
|
6128
|
+
}
|
|
6129
|
+
|
|
6079
6130
|
/**
|
|
6080
6131
|
* A set of options that are required to initialize the Stripe payment method.
|
|
6081
6132
|
*
|