@bigcommerce/checkout-sdk 1.250.0 → 1.251.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 +15 -0
- package/dist/checkout-button.d.ts +36 -0
- package/dist/checkout-button.js +1 -1
- package/dist/checkout-button.js.map +1 -1
- package/dist/checkout-button.umd.js +1 -1
- package/dist/checkout-button.umd.js.map +1 -1
- package/dist/checkout-sdk.d.ts +36 -0
- package/dist/checkout-sdk.js +1 -1
- package/dist/checkout-sdk.js.map +1 -1
- package/dist/checkout-sdk.umd.js +1 -1
- package/dist/checkout-sdk.umd.js.map +1 -1
- package/dist/hosted-form.js +1 -1
- package/dist/hosted-form.js.map +1 -1
- package/dist/hosted-form.umd.js +1 -1
- package/dist/hosted-form.umd.js.map +1 -1
- package/docs/README.md +1 -0
- package/docs/enums/checkoutbuttonmethodtype.md +7 -0
- package/docs/interfaces/braintreepaypalcreditbuttoninitializeoptions.md +85 -0
- package/docs/interfaces/checkoutbuttoninitializeoptions.md +10 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [1.251.0](https://github.com/bigcommerce/checkout-sdk-js/compare/v1.250.0...v1.251.0) (2022-06-14)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **payment:** PAYPAL-1382 added _removeElement method instead of _hideElement in BraintreePayPalCreditButtonStrategy ([a9a5e8e](https://github.com/bigcommerce/checkout-sdk-js/commit/a9a5e8e71593cd668c0261e0e86f8309ac2c8fb2))
|
|
11
|
+
* **payment:** PAYPAL-1382 added braintreepaypalcredit checkout button strategy ([82aa29e](https://github.com/bigcommerce/checkout-sdk-js/commit/82aa29e016c493602e7ef6144c66d663e9b966b6))
|
|
12
|
+
* **payment:** PAYPAL-1382 cleared some code in BraintreePayPalCreditButtonStrategy ([33edc69](https://github.com/bigcommerce/checkout-sdk-js/commit/33edc6913baeb247ab6f396047e91326ae1f6334))
|
|
13
|
+
* **payment:** PAYPAL-1382 updated checkout button method mapper ([b165152](https://github.com/bigcommerce/checkout-sdk-js/commit/b165152f173942b37f4875426e104095fdc64294))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* **payment:** PAYPAL-1382 fixed an issue with braintreepaypalcreditv2 naming ([e061d19](https://github.com/bigcommerce/checkout-sdk-js/commit/e061d196fb975c8893272fdfda91de87e11dcd91))
|
|
19
|
+
|
|
5
20
|
## [1.250.0](https://github.com/bigcommerce/checkout-sdk-js/compare/v1.249.0...v1.250.0) (2022-06-08)
|
|
6
21
|
|
|
7
22
|
|
|
@@ -135,6 +135,36 @@ declare interface BraintreeError extends Error {
|
|
|
135
135
|
details?: unknown;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
+
declare interface BraintreePaypalCreditButtonInitializeOptions {
|
|
139
|
+
/**
|
|
140
|
+
* A set of styling options for the checkout button.
|
|
141
|
+
*/
|
|
142
|
+
style?: Pick<PaypalButtonStyleOptions, 'layout' | 'size' | 'color' | 'label' | 'shape' | 'tagline' | 'fundingicons' | 'height'>;
|
|
143
|
+
/**
|
|
144
|
+
* Address to be used for shipping.
|
|
145
|
+
* If not provided, it will use the first saved address from the active customer.
|
|
146
|
+
*/
|
|
147
|
+
shippingAddress?: Address | null;
|
|
148
|
+
/**
|
|
149
|
+
* A callback that gets called if unable to authorize and tokenize payment.
|
|
150
|
+
*
|
|
151
|
+
* @param error - The error object describing the failure.
|
|
152
|
+
*/
|
|
153
|
+
onAuthorizeError?(error: BraintreeError | StandardError): void;
|
|
154
|
+
/**
|
|
155
|
+
* A callback that gets called if unable to submit payment.
|
|
156
|
+
*
|
|
157
|
+
* @param error - The error object describing the failure.
|
|
158
|
+
*/
|
|
159
|
+
onPaymentError?(error: BraintreeError | StandardError): void;
|
|
160
|
+
/**
|
|
161
|
+
* A callback that gets called on any error instead of submit payment or authorization errors.
|
|
162
|
+
*
|
|
163
|
+
* @param error - The error object describing the failure.
|
|
164
|
+
*/
|
|
165
|
+
onError?(error: BraintreeError | StandardError): void;
|
|
166
|
+
}
|
|
167
|
+
|
|
138
168
|
declare interface BraintreePaypalV1ButtonInitializeOptions {
|
|
139
169
|
/**
|
|
140
170
|
* The ID of a container which the messaging should be inserted.
|
|
@@ -211,6 +241,11 @@ declare interface CheckoutButtonInitializeOptions extends CheckoutButtonOptions
|
|
|
211
241
|
* omitted unless you need to support Braintree Credit.
|
|
212
242
|
*/
|
|
213
243
|
braintreepaypalcredit?: BraintreePaypalV1ButtonInitializeOptions;
|
|
244
|
+
/**
|
|
245
|
+
* The options that are required to facilitate Braintree Credit. They can be
|
|
246
|
+
* omitted unless you need to support Braintree Credit.
|
|
247
|
+
*/
|
|
248
|
+
braintreepaypalcreditv2?: BraintreePaypalCreditButtonInitializeOptions;
|
|
214
249
|
/**
|
|
215
250
|
* The options that are required to facilitate PayPal. They can be omitted
|
|
216
251
|
* unless you need to support Paypal.
|
|
@@ -368,6 +403,7 @@ declare enum CheckoutButtonMethodType {
|
|
|
368
403
|
BRAINTREE_PAYPAL = "braintreepaypal",
|
|
369
404
|
BRAINTREE_VENMO = "braintreevenmo",
|
|
370
405
|
BRAINTREE_PAYPAL_CREDIT = "braintreepaypalcredit",
|
|
406
|
+
BRAINTREE_PAYPAL_CREDITV2 = "braintreepaypalcreditv2",
|
|
371
407
|
GOOGLEPAY_ADYENV2 = "googlepayadyenv2",
|
|
372
408
|
GOOGLEPAY_ADYENV3 = "googlepayadyenv3",
|
|
373
409
|
GOOGLEPAY_AUTHORIZENET = "googlepayauthorizenet",
|