@bigcommerce/checkout-sdk 1.374.7 → 1.375.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/docs/README.md CHANGED
@@ -302,9 +302,7 @@
302
302
  - [PaymentRequestOptions](interfaces/PaymentRequestOptions.md)
303
303
  - [PaymentSettings](interfaces/PaymentSettings.md)
304
304
  - [PaypalButtonInitializeOptions](interfaces/PaypalButtonInitializeOptions.md)
305
- - [PaypalCommercePaymentInitializeOptions](interfaces/PaypalCommercePaymentInitializeOptions.md)
306
305
  - [PaypalExpressPaymentInitializeOptions](interfaces/PaypalExpressPaymentInitializeOptions.md)
307
- - [PaypalFieldsStyleOptions](interfaces/PaypalFieldsStyleOptions.md)
308
306
  - [PaypalStyleOptions](interfaces/PaypalStyleOptions.md)
309
307
  - [PhysicalItem](interfaces/PhysicalItem.md)
310
308
  - [PickupMethod](interfaces/PickupMethod.md)
@@ -41,7 +41,6 @@ current checkout flow.
41
41
  - [moneris](BasePaymentInitializeOptions.md#moneris)
42
42
  - [opy](BasePaymentInitializeOptions.md#opy)
43
43
  - [params](BasePaymentInitializeOptions.md#params)
44
- - [paypalcommerce](BasePaymentInitializeOptions.md#paypalcommerce)
45
44
  - [paypalexpress](BasePaymentInitializeOptions.md#paypalexpress)
46
45
  - [square](BasePaymentInitializeOptions.md#square)
47
46
  - [stripeupe](BasePaymentInitializeOptions.md#stripeupe)
@@ -299,15 +298,6 @@ The parameters of the request, if required.
299
298
 
300
299
  ___
301
300
 
302
- ### paypalcommerce
303
-
304
- • `Optional` **paypalcommerce**: [`PaypalCommercePaymentInitializeOptions`](PaypalCommercePaymentInitializeOptions.md)
305
-
306
- The options that are required to initialize the PayPal Commerce payment method.
307
- They can be omitted unless you need to support PayPal Commerce.
308
-
309
- ___
310
-
311
301
  ### paypalexpress
312
302
 
313
303
  • `Optional` **paypalexpress**: [`PaypalExpressPaymentInitializeOptions`](PaypalExpressPaymentInitializeOptions.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigcommerce/checkout-sdk",
3
- "version": "1.374.7",
3
+ "version": "1.375.0",
4
4
  "description": "BigCommerce Checkout JavaScript SDK",
5
5
  "license": "MIT",
6
6
  "main": "dist/checkout-sdk.js",
@@ -1,186 +0,0 @@
1
- [@bigcommerce/checkout-sdk](../README.md) / PaypalCommercePaymentInitializeOptions
2
-
3
- # Interface: PaypalCommercePaymentInitializeOptions
4
-
5
- A set of options that are required to initialize the PayPal Commerce payment
6
- method for presenting its PayPal button.
7
-
8
- Please note that the minimum version of checkout-sdk is 1.100
9
-
10
- Also, PayPal (also known as PayPal Commerce Platform) requires specific options to initialize the PayPal Smart Payment Button on checkout page that substitutes a standard submit button
11
- ```html
12
- <!-- This is where the PayPal button will be inserted -->
13
- <div id="container"></div>
14
- <!-- This is where the PayPal alternative payment methods fields will be inserted. -->
15
- <div id="apm-fields-container"></div>
16
- ```
17
-
18
- ```js
19
- service.initializePayment({
20
- methodId: 'paypalcommerce',
21
- paypalcommerce: {
22
- container: '#container',
23
- apmFieldsContainer: '#apm-fields-container',
24
- apmFieldsStyles: {
25
- base: {
26
- backgroundColor: 'transparent',
27
- },
28
- input: {
29
- backgroundColor: 'white',
30
- fontSize: '1rem',
31
- color: '#333',
32
- borderColor: '#d9d9d9',
33
- borderRadius: '4px',
34
- borderWidth: '1px',
35
- padding: '1rem',
36
- },
37
- invalid: {
38
- color: '#ed6a6a',
39
- },
40
- active: {
41
- color: '#4496f6',
42
- },
43
- },
44
- clientId: 'YOUR_CLIENT_ID',
45
- // Callback for submitting payment form that gets called when a buyer approves PayPal payment
46
- submitForm: () => {
47
- // Example function
48
- this.submitOrder(
49
- {
50
- payment: { methodId: 'paypalcommerce', }
51
- }
52
- );
53
- },
54
- // Callback is used to define the state of the payment form, validate if it is applicable for submit.
55
- onValidate: (resolve, reject) => {
56
- // Example function
57
- const isValid = this.validatePaymentForm();
58
- if (isValid) {
59
- return resolve();
60
- }
61
- return reject();
62
- },
63
- // Callback that is called right before render of a Smart Payment Button. It gets called when a buyer is eligible for use of the particular PayPal method. This callback can be used to hide the standard submit button.
64
- onRenderButton: () => {
65
- // Example function
66
- this.hidePaymentSubmitButton();
67
- }
68
- },
69
- });
70
- ```
71
-
72
- ## Table of contents
73
-
74
- ### Properties
75
-
76
- - [apmFieldsContainer](PaypalCommercePaymentInitializeOptions.md#apmfieldscontainer)
77
- - [apmFieldsStyles](PaypalCommercePaymentInitializeOptions.md#apmfieldsstyles)
78
- - [clientId](PaypalCommercePaymentInitializeOptions.md#clientid)
79
- - [container](PaypalCommercePaymentInitializeOptions.md#container)
80
-
81
- ### Methods
82
-
83
- - [onError](PaypalCommercePaymentInitializeOptions.md#onerror)
84
- - [onRenderButton](PaypalCommercePaymentInitializeOptions.md#onrenderbutton)
85
- - [onValidate](PaypalCommercePaymentInitializeOptions.md#onvalidate)
86
- - [submitForm](PaypalCommercePaymentInitializeOptions.md#submitform)
87
-
88
- ## Properties
89
-
90
- ### apmFieldsContainer
91
-
92
- • `Optional` **apmFieldsContainer**: `string`
93
-
94
- The CSS selector of a container where the alternative payment methods fields widget should be inserted into.
95
- It's necessary to specify this parameter when using Alternative Payment Methods.
96
- Without it alternative payment methods will not work.
97
-
98
- ___
99
-
100
- ### apmFieldsStyles
101
-
102
- • `Optional` **apmFieldsStyles**: [`PaypalFieldsStyleOptions`](PaypalFieldsStyleOptions.md)
103
-
104
- Object with styles to customize alternative payment methods fields.
105
-
106
- ___
107
-
108
- ### clientId
109
-
110
- • **clientId**: `string`
111
-
112
- The Client ID of the Paypal App
113
-
114
- ___
115
-
116
- ### container
117
-
118
- • **container**: `string`
119
-
120
- The CSS selector of a container where the payment widget should be inserted into.
121
-
122
- ## Methods
123
-
124
- ### onError
125
-
126
- ▸ `Optional` **onError**(`error`): `void`
127
-
128
- A callback for displaying error popup. This callback requires error object as parameter.
129
-
130
- #### Parameters
131
-
132
- | Name | Type |
133
- | :------ | :------ |
134
- | `error` | `Error` |
135
-
136
- #### Returns
137
-
138
- `void`
139
-
140
- ___
141
-
142
- ### onRenderButton
143
-
144
- ▸ `Optional` **onRenderButton**(): `void`
145
-
146
- A callback right before render Smart Payment Button that gets called when
147
- Smart Payment Button is eligible. This callback can be used to hide the standard submit button.
148
-
149
- #### Returns
150
-
151
- `void`
152
-
153
- ___
154
-
155
- ### onValidate
156
-
157
- ▸ **onValidate**(`resolve`, `reject`): `Promise`<`void`\>
158
-
159
- A callback that gets called when a buyer click on Smart Payment Button
160
- and should validate payment form.
161
-
162
- #### Parameters
163
-
164
- | Name | Type | Description |
165
- | :------ | :------ | :------ |
166
- | `resolve` | () => `void` | A function, that gets called if form is valid. |
167
- | `reject` | () => `void` | A function, that gets called if form is not valid. |
168
-
169
- #### Returns
170
-
171
- `Promise`<`void`\>
172
-
173
- reject() or resolve()
174
-
175
- ___
176
-
177
- ### submitForm
178
-
179
- ▸ **submitForm**(): `void`
180
-
181
- A callback for submitting payment form that gets called
182
- when buyer approved PayPal account.
183
-
184
- #### Returns
185
-
186
- `void`
@@ -1,46 +0,0 @@
1
- [@bigcommerce/checkout-sdk](../README.md) / PaypalFieldsStyleOptions
2
-
3
- # Interface: PaypalFieldsStyleOptions
4
-
5
- ## Table of contents
6
-
7
- ### Properties
8
-
9
- - [rules](PaypalFieldsStyleOptions.md#rules)
10
- - [variables](PaypalFieldsStyleOptions.md#variables)
11
-
12
- ## Properties
13
-
14
- ### rules
15
-
16
- • `Optional` **rules**: `Object`
17
-
18
- #### Index signature
19
-
20
- ▪ [key: `string`]: `any`
21
-
22
- ___
23
-
24
- ### variables
25
-
26
- • `Optional` **variables**: `Object`
27
-
28
- #### Type declaration
29
-
30
- | Name | Type |
31
- | :------ | :------ |
32
- | `borderColor?` | `string` |
33
- | `borderFocusColor?` | `string` |
34
- | `borderRadius?` | `string` |
35
- | `borderWidth?` | `string` |
36
- | `colorBackground?` | `string` |
37
- | `colorDanger?` | `string` |
38
- | `colorInfo?` | `string` |
39
- | `colorTextPlaceholder?` | `string` |
40
- | `fontFamily?` | `string` |
41
- | `fontSizeBase?` | `string` |
42
- | `fontSizeLg?` | `string` |
43
- | `fontSizeM?` | `string` |
44
- | `fontSizeSm?` | `string` |
45
- | `spacingUnit?` | `string` |
46
- | `textColor?` | `string` |