@bigcommerce/checkout-sdk 1.326.1 → 1.326.2

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/docs/README.md CHANGED
@@ -78,10 +78,6 @@
78
78
  - [AdyenV3CreditCardComponentOptions](interfaces/AdyenV3CreditCardComponentOptions.md)
79
79
  - [AdyenV3PaymentInitializeOptions](interfaces/AdyenV3PaymentInitializeOptions.md)
80
80
  - [AdyenV3ValidationState](interfaces/AdyenV3ValidationState.md)
81
- - [AmazonPayCustomerInitializeOptions](interfaces/AmazonPayCustomerInitializeOptions.md)
82
- - [AmazonPayOrderReference](interfaces/AmazonPayOrderReference.md)
83
- - [AmazonPayPaymentInitializeOptions](interfaces/AmazonPayPaymentInitializeOptions.md)
84
- - [AmazonPayShippingInitializeOptions](interfaces/AmazonPayShippingInitializeOptions.md)
85
81
  - [AmazonPayV2ButtonConfig](interfaces/AmazonPayV2ButtonConfig.md)
86
82
  - [AmazonPayV2ButtonParams](interfaces/AmazonPayV2ButtonParams.md)
87
83
  - [AmazonPayV2CheckoutSession](interfaces/AmazonPayV2CheckoutSession.md)
@@ -91,7 +87,6 @@
91
87
  - [AmazonPayV2PaymentInitializeOptions](interfaces/AmazonPayV2PaymentInitializeOptions.md)
92
88
  - [AmazonPayV2Price](interfaces/AmazonPayV2Price.md)
93
89
  - [AmazonPayV2ShippingInitializeOptions](interfaces/AmazonPayV2ShippingInitializeOptions.md)
94
- - [AmazonPayWidgetError](interfaces/AmazonPayWidgetError.md)
95
90
  - [ApplePayButtonInitializeOptions](interfaces/ApplePayButtonInitializeOptions.md)
96
91
  - [ApplePayButtonInitializeOptions_2](interfaces/ApplePayButtonInitializeOptions_2.md)
97
92
  - [ApplePayCustomerInitializeOptions](interfaces/ApplePayCustomerInitializeOptions.md)
@@ -371,7 +371,7 @@ initialization.
371
371
 
372
372
  ```js
373
373
  await service.deinitializeCustomer({
374
- methodId: 'amazon',
374
+ methodId: 'amazonpay',
375
375
  });
376
376
  ```
377
377
 
@@ -402,7 +402,7 @@ result of payment initialization.
402
402
 
403
403
  ```js
404
404
  await service.deinitializePayment({
405
- methodId: 'amazon',
405
+ methodId: 'amazonpay',
406
406
  });
407
407
  ```
408
408
 
@@ -433,7 +433,7 @@ initialization.
433
433
 
434
434
  ```js
435
435
  await service.deinitializeShipping({
436
- methodId: 'amazon',
436
+ methodId: 'amazonpay',
437
437
  });
438
438
  ```
439
439
 
@@ -645,13 +645,13 @@ ___
645
645
 
646
646
  Initializes the sign-in step of a checkout process.
647
647
 
648
- Some payment methods, such as Amazon, have their own sign-in flow. In
648
+ Some payment methods, such as Amazon Pay, have their own sign-in flow. In
649
649
  order to support them, this method must be called.
650
650
 
651
651
  ```js
652
652
  await service.initializeCustomer({
653
- methodId: 'amazon',
654
- amazon: {
653
+ methodId: 'amazonpay',
654
+ amazonpay: {
655
655
  container: 'signInButton',
656
656
  },
657
657
  });
@@ -679,14 +679,15 @@ Initializes the payment step of a checkout process.
679
679
 
680
680
  Before a payment method can accept payment details, it must first be
681
681
  initialized. Some payment methods require you to provide additional
682
- initialization options. For example, Amazon requires a container ID in
683
- order to initialize their payment widget.
682
+ initialization options. For example, you can provide an element ID for
683
+ Amazon Pay if you want users to be able to select a different payment
684
+ method by clicking on the element.
684
685
 
685
686
  ```js
686
687
  await service.initializePayment({
687
- methodId: 'amazon',
688
- amazon: {
689
- container: 'walletWidget',
688
+ methodId: 'amazonpay',
689
+ amazonpay: {
690
+ editButtonId: 'edit-button',
690
691
  },
691
692
  });
692
693
  ```
@@ -711,15 +712,15 @@ ___
711
712
 
712
713
  Initializes the shipping step of a checkout process.
713
714
 
714
- Some payment methods, such as Amazon, can provide shipping information to
715
- be used for checkout. In order to support them, this method must be
716
- called.
715
+ Some payment methods, such as Amazon Pay, can provide shipping
716
+ information to be used for checkout. In order to support them, this
717
+ method must be called.
717
718
 
718
719
  ```js
719
720
  await service.initializeShipping({
720
- methodId: 'amazon',
721
- amazon: {
722
- container: 'addressBook',
721
+ methodId: 'amazonpay',
722
+ amazonpay: {
723
+ editAddressButtonId: 'changeAddressButton',
723
724
  },
724
725
  });
725
726
  ```
@@ -9,6 +9,20 @@ When AmazonPayV2 is initialized, a sign-in button will be inserted into the
9
9
  DOM. When the customer clicks on it, they will be redirected to Amazon to
10
10
  sign in.
11
11
 
12
+ ```html
13
+ <!-- This is where the Amazon Pay button will be inserted -->
14
+ <div id="signInButton"></div>
15
+ ```
16
+
17
+ ```js
18
+ service.initializeCustomer({
19
+ methodId: 'amazonpay',
20
+ amazonpay: {
21
+ container: 'signInButton',
22
+ },
23
+ });
24
+ ```
25
+
12
26
  ## Table of contents
13
27
 
14
28
  ### Properties
@@ -10,8 +10,8 @@ When the customer clicks on it, they will be redirected to Amazon to
10
10
  select a different payment method.
11
11
 
12
12
  ```html
13
- <!-- This is where the Amazon button will be inserted -->
14
- <div id="edit-button"></div>
13
+ <!-- This is the change payment button that will be bound -->
14
+ <button id="edit-button">Change card</button>
15
15
  ```
16
16
 
17
17
  ```js
@@ -9,6 +9,20 @@ When AmazonPayV2 is initialized, a change shipping button will be bound.
9
9
  When the customer clicks on it, they will be redirected to Amazon to
10
10
  select a different shipping address.
11
11
 
12
+ ```html
13
+ <!-- This is the change shipping button that will be bound -->
14
+ <button id="edit-button">Change shipping</button>
15
+ ```
16
+
17
+ ```js
18
+ service.initializeShipping({
19
+ methodId: 'amazonpay',
20
+ amazonpay: {
21
+ editAddressButtonId: 'edit-button',
22
+ },
23
+ });
24
+ ```
25
+
12
26
  ## Table of contents
13
27
 
14
28
  ### Properties
@@ -24,7 +24,6 @@ information in order to initialize the customer step of checkout.
24
24
 
25
25
  ### Properties
26
26
 
27
- - [amazon](BaseCustomerInitializeOptions.md#amazon)
28
27
  - [amazonpay](BaseCustomerInitializeOptions.md#amazonpay)
29
28
  - [bolt](BaseCustomerInitializeOptions.md#bolt)
30
29
  - [braintreepaypal](BaseCustomerInitializeOptions.md#braintreepaypal)
@@ -48,15 +47,6 @@ information in order to initialize the customer step of checkout.
48
47
 
49
48
  ## Properties
50
49
 
51
- ### amazon
52
-
53
- • `Optional` **amazon**: [`AmazonPayCustomerInitializeOptions`](AmazonPayCustomerInitializeOptions.md)
54
-
55
- The options that are required to initialize the customer step of checkout
56
- when using Amazon Pay.
57
-
58
- ___
59
-
60
50
  ### amazonpay
61
51
 
62
52
  • `Optional` **amazonpay**: [`AmazonPayV2CustomerInitializeOptions`](AmazonPayV2CustomerInitializeOptions.md)
@@ -15,7 +15,6 @@ current checkout flow.
15
15
 
16
16
  ### Properties
17
17
 
18
- - [amazon](BasePaymentInitializeOptions.md#amazon)
19
18
  - [amazonpay](BasePaymentInitializeOptions.md#amazonpay)
20
19
  - [bluesnapv2](BasePaymentInitializeOptions.md#bluesnapv2)
21
20
  - [bolt](BasePaymentInitializeOptions.md#bolt)
@@ -53,15 +52,6 @@ current checkout flow.
53
52
 
54
53
  ## Properties
55
54
 
56
- ### amazon
57
-
58
- • `Optional` **amazon**: [`AmazonPayPaymentInitializeOptions`](AmazonPayPaymentInitializeOptions.md)
59
-
60
- The options that are required to initialize the Amazon Pay payment
61
- method. They can be omitted unless you need to support AmazonPay.
62
-
63
- ___
64
-
65
55
  ### amazonpay
66
56
 
67
57
  • `Optional` **amazonpay**: [`AmazonPayV2PaymentInitializeOptions`](AmazonPayV2PaymentInitializeOptions.md)
@@ -77,7 +77,7 @@ A callback that gets called if unable to authorize and tokenize payment.
77
77
 
78
78
  | Name | Type | Description |
79
79
  | :------ | :------ | :------ |
80
- | `error` | [`StandardError`](../classes/StandardError.md) \| [`BraintreeError`](BraintreeError.md) | The error object describing the failure. |
80
+ | `error` | [`BraintreeError`](BraintreeError.md) \| [`StandardError`](../classes/StandardError.md) | The error object describing the failure. |
81
81
 
82
82
  #### Returns
83
83
 
@@ -95,7 +95,7 @@ A callback that gets called on any error instead of submit payment or authorizat
95
95
 
96
96
  | Name | Type | Description |
97
97
  | :------ | :------ | :------ |
98
- | `error` | [`StandardError`](../classes/StandardError.md) \| [`BraintreeError`](BraintreeError.md) | The error object describing the failure. |
98
+ | `error` | [`BraintreeError`](BraintreeError.md) \| [`StandardError`](../classes/StandardError.md) | The error object describing the failure. |
99
99
 
100
100
  #### Returns
101
101
 
@@ -113,7 +113,7 @@ A callback that gets called if unable to submit payment.
113
113
 
114
114
  | Name | Type | Description |
115
115
  | :------ | :------ | :------ |
116
- | `error` | [`StandardError`](../classes/StandardError.md) \| [`BraintreeError`](BraintreeError.md) | The error object describing the failure. |
116
+ | `error` | [`BraintreeError`](BraintreeError.md) \| [`StandardError`](../classes/StandardError.md) | The error object describing the failure. |
117
117
 
118
118
  #### Returns
119
119
 
@@ -68,7 +68,7 @@ A callback that gets called if unable to authorize and tokenize payment.
68
68
 
69
69
  | Name | Type | Description |
70
70
  | :------ | :------ | :------ |
71
- | `error` | [`StandardError`](../classes/StandardError.md) \| [`BraintreeError`](BraintreeError.md) | The error object describing the failure. |
71
+ | `error` | [`BraintreeError`](BraintreeError.md) \| [`StandardError`](../classes/StandardError.md) | The error object describing the failure. |
72
72
 
73
73
  #### Returns
74
74
 
@@ -86,7 +86,7 @@ A callback that gets called on any error instead of submit payment or authorizat
86
86
 
87
87
  | Name | Type | Description |
88
88
  | :------ | :------ | :------ |
89
- | `error` | [`StandardError`](../classes/StandardError.md) \| [`BraintreeError`](BraintreeError.md) | The error object describing the failure. |
89
+ | `error` | [`BraintreeError`](BraintreeError.md) \| [`StandardError`](../classes/StandardError.md) | The error object describing the failure. |
90
90
 
91
91
  #### Returns
92
92
 
@@ -104,7 +104,7 @@ A callback that gets called if unable to submit payment.
104
104
 
105
105
  | Name | Type | Description |
106
106
  | :------ | :------ | :------ |
107
- | `error` | [`StandardError`](../classes/StandardError.md) \| [`BraintreeError`](BraintreeError.md) | The error object describing the failure. |
107
+ | `error` | [`BraintreeError`](BraintreeError.md) \| [`StandardError`](../classes/StandardError.md) | The error object describing the failure. |
108
108
 
109
109
  #### Returns
110
110
 
@@ -32,7 +32,7 @@ A callback that gets called on any error instead of submit payment or authorizat
32
32
 
33
33
  | Name | Type | Description |
34
34
  | :------ | :------ | :------ |
35
- | `error` | [`StandardError`](../classes/StandardError.md) \| [`BraintreeError`](BraintreeError.md) | The error object describing the failure. |
35
+ | `error` | [`BraintreeError`](BraintreeError.md) \| [`StandardError`](../classes/StandardError.md) | The error object describing the failure. |
36
36
 
37
37
  #### Returns
38
38
 
@@ -47,7 +47,7 @@ A callback that gets called on any error.
47
47
 
48
48
  | Name | Type | Description |
49
49
  | :------ | :------ | :------ |
50
- | `error` | [`StandardError`](../classes/StandardError.md) \| [`BraintreeError`](BraintreeError.md) | The error object describing the failure. |
50
+ | `error` | [`BraintreeError`](BraintreeError.md) \| [`StandardError`](../classes/StandardError.md) | The error object describing the failure. |
51
51
 
52
52
  #### Returns
53
53
 
@@ -27,7 +27,6 @@ step of checkout.
27
27
 
28
28
  ### Properties
29
29
 
30
- - [amazon](ShippingInitializeOptions.md#amazon)
31
30
  - [amazonpay](ShippingInitializeOptions.md#amazonpay)
32
31
  - [methodId](ShippingInitializeOptions.md#methodid)
33
32
  - [params](ShippingInitializeOptions.md#params)
@@ -36,15 +35,6 @@ step of checkout.
36
35
 
37
36
  ## Properties
38
37
 
39
- ### amazon
40
-
41
- • `Optional` **amazon**: [`AmazonPayShippingInitializeOptions`](AmazonPayShippingInitializeOptions.md)
42
-
43
- The options that are required to initialize the shipping step of checkout
44
- when using Amazon Pay.
45
-
46
- ___
47
-
48
38
  ### amazonpay
49
39
 
50
40
  • `Optional` **amazonpay**: [`AmazonPayV2ShippingInitializeOptions`](AmazonPayV2ShippingInitializeOptions.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigcommerce/checkout-sdk",
3
- "version": "1.326.1",
3
+ "version": "1.326.2",
4
4
  "description": "BigCommerce Checkout JavaScript SDK",
5
5
  "license": "MIT",
6
6
  "main": "dist/checkout-sdk.js",
@@ -1,65 +0,0 @@
1
- [@bigcommerce/checkout-sdk](../README.md) / AmazonPayCustomerInitializeOptions
2
-
3
- # Interface: AmazonPayCustomerInitializeOptions
4
-
5
- A set of options that are required to initialize the customer step of
6
- checkout to support Amazon Pay.
7
-
8
- When AmazonPay is initialized, a sign-in button will be inserted into the
9
- DOM. When the customer clicks on it, they will be redirected to Amazon to
10
- sign in.
11
-
12
- ## Table of contents
13
-
14
- ### Properties
15
-
16
- - [color](AmazonPayCustomerInitializeOptions.md#color)
17
- - [container](AmazonPayCustomerInitializeOptions.md#container)
18
- - [size](AmazonPayCustomerInitializeOptions.md#size)
19
-
20
- ### Methods
21
-
22
- - [onError](AmazonPayCustomerInitializeOptions.md#onerror)
23
-
24
- ## Properties
25
-
26
- ### color
27
-
28
- • `Optional` **color**: ``"Gold"`` \| ``"LightGray"`` \| ``"DarkGray"``
29
-
30
- The colour of the sign-in button.
31
-
32
- ___
33
-
34
- ### container
35
-
36
- • **container**: `string`
37
-
38
- The ID of a container which the sign-in button should insert into.
39
-
40
- ___
41
-
42
- ### size
43
-
44
- • `Optional` **size**: ``"small"`` \| ``"medium"`` \| ``"large"`` \| ``"x-large"``
45
-
46
- The size of the sign-in button.
47
-
48
- ## Methods
49
-
50
- ### onError
51
-
52
- ▸ `Optional` **onError**(`error`): `void`
53
-
54
- A callback that gets called if unable to initialize the widget or select
55
- one of the address options provided by the widget.
56
-
57
- #### Parameters
58
-
59
- | Name | Type | Description |
60
- | :------ | :------ | :------ |
61
- | `error` | [`AmazonPayWidgetError`](AmazonPayWidgetError.md) \| [`StandardError`](../classes/StandardError.md) | The error object describing the failure. |
62
-
63
- #### Returns
64
-
65
- `void`
@@ -1,30 +0,0 @@
1
- [@bigcommerce/checkout-sdk](../README.md) / AmazonPayOrderReference
2
-
3
- # Interface: AmazonPayOrderReference
4
-
5
- ## Table of contents
6
-
7
- ### Methods
8
-
9
- - [getAmazonBillingAgreementId](AmazonPayOrderReference.md#getamazonbillingagreementid)
10
- - [getAmazonOrderReferenceId](AmazonPayOrderReference.md#getamazonorderreferenceid)
11
-
12
- ## Methods
13
-
14
- ### getAmazonBillingAgreementId
15
-
16
- ▸ **getAmazonBillingAgreementId**(): `string`
17
-
18
- #### Returns
19
-
20
- `string`
21
-
22
- ___
23
-
24
- ### getAmazonOrderReferenceId
25
-
26
- ▸ **getAmazonOrderReferenceId**(): `string`
27
-
28
- #### Returns
29
-
30
- `string`
@@ -1,100 +0,0 @@
1
- [@bigcommerce/checkout-sdk](../README.md) / AmazonPayPaymentInitializeOptions
2
-
3
- # Interface: AmazonPayPaymentInitializeOptions
4
-
5
- A set of options that are required to initialize the Amazon Pay payment
6
- method.
7
-
8
- When AmazonPay is initialized, a widget will be inserted into the DOM. The
9
- widget has a list of payment options for the customer to choose from.
10
-
11
- ```html
12
- <!-- This is where the widget will be inserted -->
13
- <div id="container"></div>
14
- ```
15
-
16
- ```js
17
- service.initializePayment({
18
- methodId: 'amazon',
19
- amazon: {
20
- container: 'container',
21
- },
22
- });
23
- ```
24
-
25
- ## Table of contents
26
-
27
- ### Properties
28
-
29
- - [container](AmazonPayPaymentInitializeOptions.md#container)
30
-
31
- ### Methods
32
-
33
- - [onError](AmazonPayPaymentInitializeOptions.md#onerror)
34
- - [onPaymentSelect](AmazonPayPaymentInitializeOptions.md#onpaymentselect)
35
- - [onReady](AmazonPayPaymentInitializeOptions.md#onready)
36
-
37
- ## Properties
38
-
39
- ### container
40
-
41
- • **container**: `string`
42
-
43
- The ID of a container which the payment widget should insert into.
44
-
45
- ## Methods
46
-
47
- ### onError
48
-
49
- ▸ `Optional` **onError**(`error`): `void`
50
-
51
- A callback that gets called if unable to initialize the widget or select
52
- one of the payment options.
53
-
54
- #### Parameters
55
-
56
- | Name | Type | Description |
57
- | :------ | :------ | :------ |
58
- | `error` | [`AmazonPayWidgetError`](AmazonPayWidgetError.md) \| [`StandardError`](../classes/StandardError.md) | The error object describing the failure. |
59
-
60
- #### Returns
61
-
62
- `void`
63
-
64
- ___
65
-
66
- ### onPaymentSelect
67
-
68
- ▸ `Optional` **onPaymentSelect**(`reference`): `void`
69
-
70
- A callback that gets called when the customer selects one of the payment
71
- options provided by the widget.
72
-
73
- #### Parameters
74
-
75
- | Name | Type | Description |
76
- | :------ | :------ | :------ |
77
- | `reference` | [`AmazonPayOrderReference`](AmazonPayOrderReference.md) | The order reference provided by Amazon. |
78
-
79
- #### Returns
80
-
81
- `void`
82
-
83
- ___
84
-
85
- ### onReady
86
-
87
- ▸ `Optional` **onReady**(`reference`): `void`
88
-
89
- A callback that gets called when the widget is loaded and ready to be
90
- interacted with.
91
-
92
- #### Parameters
93
-
94
- | Name | Type | Description |
95
- | :------ | :------ | :------ |
96
- | `reference` | [`AmazonPayOrderReference`](AmazonPayOrderReference.md) | The order reference provided by Amazon. |
97
-
98
- #### Returns
99
-
100
- `void`
@@ -1,85 +0,0 @@
1
- [@bigcommerce/checkout-sdk](../README.md) / AmazonPayShippingInitializeOptions
2
-
3
- # Interface: AmazonPayShippingInitializeOptions
4
-
5
- A set of options that are required to initialize the shipping step of
6
- checkout in order to support Amazon Pay.
7
-
8
- When Amazon Pay is initialized, a widget will be inserted into the DOM. The
9
- widget has a list of shipping addresses for the customer to choose from.
10
-
11
- ## Table of contents
12
-
13
- ### Properties
14
-
15
- - [container](AmazonPayShippingInitializeOptions.md#container)
16
-
17
- ### Methods
18
-
19
- - [onAddressSelect](AmazonPayShippingInitializeOptions.md#onaddressselect)
20
- - [onError](AmazonPayShippingInitializeOptions.md#onerror)
21
- - [onReady](AmazonPayShippingInitializeOptions.md#onready)
22
-
23
- ## Properties
24
-
25
- ### container
26
-
27
- • **container**: `string`
28
-
29
- The ID of a container which the address widget should insert into.
30
-
31
- ## Methods
32
-
33
- ### onAddressSelect
34
-
35
- ▸ `Optional` **onAddressSelect**(`reference`): `void`
36
-
37
- A callback that gets called when the customer selects an address option.
38
-
39
- #### Parameters
40
-
41
- | Name | Type | Description |
42
- | :------ | :------ | :------ |
43
- | `reference` | [`AmazonPayOrderReference`](AmazonPayOrderReference.md) | The order reference provided by Amazon. |
44
-
45
- #### Returns
46
-
47
- `void`
48
-
49
- ___
50
-
51
- ### onError
52
-
53
- ▸ `Optional` **onError**(`error`): `void`
54
-
55
- A callback that gets called if unable to initialize the widget or select
56
- one of the address options provided by the widget.
57
-
58
- #### Parameters
59
-
60
- | Name | Type | Description |
61
- | :------ | :------ | :------ |
62
- | `error` | [`AmazonPayWidgetError`](AmazonPayWidgetError.md) \| [`StandardError`](../classes/StandardError.md) | The error object describing the failure of the initialization. |
63
-
64
- #### Returns
65
-
66
- `void`
67
-
68
- ___
69
-
70
- ### onReady
71
-
72
- ▸ `Optional` **onReady**(`reference`): `void`
73
-
74
- A callback that gets called when the widget is loaded and ready to be
75
- interacted with.
76
-
77
- #### Parameters
78
-
79
- | Name | Type | Description |
80
- | :------ | :------ | :------ |
81
- | `reference` | [`AmazonPayOrderReference`](AmazonPayOrderReference.md) | The order reference provided by Amazon. |
82
-
83
- #### Returns
84
-
85
- `void`
@@ -1,25 +0,0 @@
1
- [@bigcommerce/checkout-sdk](../README.md) / AmazonPayWidgetError
2
-
3
- # Interface: AmazonPayWidgetError
4
-
5
- ## Hierarchy
6
-
7
- - `Error`
8
-
9
- ↳ **`AmazonPayWidgetError`**
10
-
11
- ## Table of contents
12
-
13
- ### Methods
14
-
15
- - [getErrorCode](AmazonPayWidgetError.md#geterrorcode)
16
-
17
- ## Methods
18
-
19
- ### getErrorCode
20
-
21
- ▸ **getErrorCode**(): `string`
22
-
23
- #### Returns
24
-
25
- `string`