@bigcommerce/checkout-sdk 1.248.2 → 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 +29 -0
- package/dist/checkout-button.d.ts +83 -9
- 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 +86 -10
- 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 +14 -1
- package/docs/enums/checkoutbuttonmethodtype.md +7 -0
- package/docs/enums/paypalbuttonstylecoloroption.md +36 -0
- package/docs/enums/paypalbuttonstylelabeloption.md +43 -0
- package/docs/enums/paypalbuttonstylelayoutoption.md +22 -0
- package/docs/enums/paypalbuttonstyleshapeoption.md +22 -0
- package/docs/enums/paypalbuttonstylesizeoption.md +36 -0
- package/docs/interfaces/braintreeerror.md +8 -1
- package/docs/interfaces/braintreepaypalcreditbuttoninitializeoptions.md +85 -0
- package/docs/interfaces/{braintreepaypalbuttoninitializeoptions.md → braintreepaypalv1buttoninitializeoptions.md} +26 -9
- package/docs/interfaces/checkoutbuttoninitializeoptions.md +12 -2
- package/docs/interfaces/orderpaymentrequestbody.md +1 -1
- package/docs/interfaces/paypalbuttonstyleoptions.md +5 -5
- package/package.json +1 -1
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.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
|
+
|
|
20
|
+
## [1.250.0](https://github.com/bigcommerce/checkout-sdk-js/compare/v1.249.0...v1.250.0) (2022-06-08)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
* **payment:** PAYPAL-1368 added checking required fields ([aa706e7](https://github.com/bigcommerce/checkout-sdk-js/commit/aa706e7d468ad5bc8e354e59e60d863c662d87d5))
|
|
26
|
+
|
|
27
|
+
## [1.249.0](https://github.com/bigcommerce/checkout-sdk-js/compare/v1.248.2...v1.249.0) (2022-06-06)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Features
|
|
31
|
+
|
|
32
|
+
* **payment:** PAYPAL-0000 updated braintree paypal checkout button strategy to prepare strategies separation ([5d68a3d](https://github.com/bigcommerce/checkout-sdk-js/commit/5d68a3d2b30bb7b6ddaa363e42da30655fef6f6b))
|
|
33
|
+
|
|
5
34
|
### [1.248.2](https://github.com/bigcommerce/checkout-sdk-js/compare/v1.248.1...v1.248.2) (2022-06-03)
|
|
6
35
|
|
|
7
36
|
|
|
@@ -132,10 +132,40 @@ declare interface ApplePayButtonInitializeOptions {
|
|
|
132
132
|
declare interface BraintreeError extends Error {
|
|
133
133
|
type: 'CUSTOMER' | 'MERCHANT' | 'NETWORK' | 'INTERNAL' | 'UNKNOWN';
|
|
134
134
|
code: string;
|
|
135
|
-
|
|
135
|
+
details?: unknown;
|
|
136
|
+
}
|
|
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;
|
|
136
166
|
}
|
|
137
167
|
|
|
138
|
-
declare interface
|
|
168
|
+
declare interface BraintreePaypalV1ButtonInitializeOptions {
|
|
139
169
|
/**
|
|
140
170
|
* The ID of a container which the messaging should be inserted.
|
|
141
171
|
*/
|
|
@@ -165,6 +195,12 @@ declare interface BraintreePaypalButtonInitializeOptions {
|
|
|
165
195
|
* @param error - The error object describing the failure.
|
|
166
196
|
*/
|
|
167
197
|
onPaymentError?(error: BraintreeError | StandardError): void;
|
|
198
|
+
/**
|
|
199
|
+
* A callback that gets called on any error instead of submit payment or authorization errors.
|
|
200
|
+
*
|
|
201
|
+
* @param error - The error object describing the failure.
|
|
202
|
+
*/
|
|
203
|
+
onError?(error: BraintreeError | StandardError): void;
|
|
168
204
|
}
|
|
169
205
|
|
|
170
206
|
declare enum ButtonColor {
|
|
@@ -199,12 +235,17 @@ declare interface CheckoutButtonInitializeOptions extends CheckoutButtonOptions
|
|
|
199
235
|
* The options that are required to facilitate Braintree PayPal. They can be
|
|
200
236
|
* omitted unless you need to support Braintree PayPal.
|
|
201
237
|
*/
|
|
202
|
-
braintreepaypal?:
|
|
238
|
+
braintreepaypal?: BraintreePaypalV1ButtonInitializeOptions;
|
|
203
239
|
/**
|
|
204
240
|
* The options that are required to facilitate Braintree Credit. They can be
|
|
205
241
|
* omitted unless you need to support Braintree Credit.
|
|
206
242
|
*/
|
|
207
|
-
braintreepaypalcredit?:
|
|
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;
|
|
208
249
|
/**
|
|
209
250
|
* The options that are required to facilitate PayPal. They can be omitted
|
|
210
251
|
* unless you need to support Paypal.
|
|
@@ -362,6 +403,7 @@ declare enum CheckoutButtonMethodType {
|
|
|
362
403
|
BRAINTREE_PAYPAL = "braintreepaypal",
|
|
363
404
|
BRAINTREE_VENMO = "braintreevenmo",
|
|
364
405
|
BRAINTREE_PAYPAL_CREDIT = "braintreepaypalcredit",
|
|
406
|
+
BRAINTREE_PAYPAL_CREDITV2 = "braintreepaypalcreditv2",
|
|
365
407
|
GOOGLEPAY_ADYENV2 = "googlepayadyenv2",
|
|
366
408
|
GOOGLEPAY_ADYENV3 = "googlepayadyenv3",
|
|
367
409
|
GOOGLEPAY_AUTHORIZENET = "googlepayauthorizenet",
|
|
@@ -446,12 +488,32 @@ declare interface PaypalButtonInitializeOptions {
|
|
|
446
488
|
onPaymentError?(error: StandardError): void;
|
|
447
489
|
}
|
|
448
490
|
|
|
491
|
+
declare enum PaypalButtonStyleColorOption {
|
|
492
|
+
GOLD = "gold",
|
|
493
|
+
BLUE = "blue",
|
|
494
|
+
SIlVER = "silver",
|
|
495
|
+
BLACK = "black"
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
declare enum PaypalButtonStyleLabelOption {
|
|
499
|
+
CHECKOUT = "checkout",
|
|
500
|
+
PAY = "pay",
|
|
501
|
+
BUYNOW = "buynow",
|
|
502
|
+
PAYPAL = "paypal",
|
|
503
|
+
CREDIT = "credit"
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
declare enum PaypalButtonStyleLayoutOption {
|
|
507
|
+
HORIZONTAL = "horizontal",
|
|
508
|
+
VERTICAL = "vertical"
|
|
509
|
+
}
|
|
510
|
+
|
|
449
511
|
declare interface PaypalButtonStyleOptions {
|
|
450
|
-
layout?:
|
|
451
|
-
size?:
|
|
452
|
-
color?:
|
|
453
|
-
label?:
|
|
454
|
-
shape?:
|
|
512
|
+
layout?: PaypalButtonStyleLayoutOption;
|
|
513
|
+
size?: PaypalButtonStyleSizeOption;
|
|
514
|
+
color?: PaypalButtonStyleColorOption;
|
|
515
|
+
label?: PaypalButtonStyleLabelOption;
|
|
516
|
+
shape?: PaypalButtonStyleShapeOption;
|
|
455
517
|
tagline?: boolean;
|
|
456
518
|
fundingicons?: boolean;
|
|
457
519
|
height?: number;
|
|
@@ -466,6 +528,18 @@ declare interface PaypalButtonStyleOptions_2 {
|
|
|
466
528
|
tagline?: boolean;
|
|
467
529
|
}
|
|
468
530
|
|
|
531
|
+
declare enum PaypalButtonStyleShapeOption {
|
|
532
|
+
PILL = "pill",
|
|
533
|
+
RECT = "rect"
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
declare enum PaypalButtonStyleSizeOption {
|
|
537
|
+
SMALL = "small",
|
|
538
|
+
MEDIUM = "medium",
|
|
539
|
+
LARGE = "large",
|
|
540
|
+
RESPONSIVE = "responsive"
|
|
541
|
+
}
|
|
542
|
+
|
|
469
543
|
declare interface PaypalCommerceButtonInitializeOptions {
|
|
470
544
|
/**
|
|
471
545
|
* A set of styling options for the checkout button.
|