@bigcommerce/checkout-sdk 1.249.0 → 1.252.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 CHANGED
@@ -2,6 +2,35 @@
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.252.0](https://github.com/bigcommerce/checkout-sdk-js/compare/v1.251.0...v1.252.0) (2022-06-14)
6
+
7
+
8
+ ### Features
9
+
10
+ * **payment:** PAYPAL-1382 added braintreepaypal checkout button strategy ([#1465](https://github.com/bigcommerce/checkout-sdk-js/issues/1465)) ([b2446ac](https://github.com/bigcommerce/checkout-sdk-js/commit/b2446ac68c4496c6a8935a1c284a7e747b00d13f))
11
+
12
+ ## [1.251.0](https://github.com/bigcommerce/checkout-sdk-js/compare/v1.250.0...v1.251.0) (2022-06-14)
13
+
14
+
15
+ ### Features
16
+
17
+ * **payment:** PAYPAL-1382 added _removeElement method instead of _hideElement in BraintreePayPalCreditButtonStrategy ([a9a5e8e](https://github.com/bigcommerce/checkout-sdk-js/commit/a9a5e8e71593cd668c0261e0e86f8309ac2c8fb2))
18
+ * **payment:** PAYPAL-1382 added braintreepaypalcredit checkout button strategy ([82aa29e](https://github.com/bigcommerce/checkout-sdk-js/commit/82aa29e016c493602e7ef6144c66d663e9b966b6))
19
+ * **payment:** PAYPAL-1382 cleared some code in BraintreePayPalCreditButtonStrategy ([33edc69](https://github.com/bigcommerce/checkout-sdk-js/commit/33edc6913baeb247ab6f396047e91326ae1f6334))
20
+ * **payment:** PAYPAL-1382 updated checkout button method mapper ([b165152](https://github.com/bigcommerce/checkout-sdk-js/commit/b165152f173942b37f4875426e104095fdc64294))
21
+
22
+
23
+ ### Bug Fixes
24
+
25
+ * **payment:** PAYPAL-1382 fixed an issue with braintreepaypalcreditv2 naming ([e061d19](https://github.com/bigcommerce/checkout-sdk-js/commit/e061d196fb975c8893272fdfda91de87e11dcd91))
26
+
27
+ ## [1.250.0](https://github.com/bigcommerce/checkout-sdk-js/compare/v1.249.0...v1.250.0) (2022-06-08)
28
+
29
+
30
+ ### Features
31
+
32
+ * **payment:** PAYPAL-1368 added checking required fields ([aa706e7](https://github.com/bigcommerce/checkout-sdk-js/commit/aa706e7d468ad5bc8e354e59e60d863c662d87d5))
33
+
5
34
  ## [1.249.0](https://github.com/bigcommerce/checkout-sdk-js/compare/v1.248.2...v1.249.0) (2022-06-06)
6
35
 
7
36
 
@@ -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.
@@ -366,8 +401,10 @@ declare enum CheckoutButtonMethodType {
366
401
  APPLEPAY = "applepay",
367
402
  AMAZON_PAY_V2 = "amazonpay",
368
403
  BRAINTREE_PAYPAL = "braintreepaypal",
404
+ BRAINTREE_PAYPALV2 = "braintreepaypalv2",
369
405
  BRAINTREE_VENMO = "braintreevenmo",
370
406
  BRAINTREE_PAYPAL_CREDIT = "braintreepaypalcredit",
407
+ BRAINTREE_PAYPAL_CREDITV2 = "braintreepaypalcreditv2",
371
408
  GOOGLEPAY_ADYENV2 = "googlepayadyenv2",
372
409
  GOOGLEPAY_ADYENV3 = "googlepayadyenv3",
373
410
  GOOGLEPAY_AUTHORIZENET = "googlepayauthorizenet",