@bigcommerce/checkout-sdk 1.308.4 → 1.309.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 +7 -0
- package/dist/checkout-button.js +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 +68 -1
- 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/docs/README.md +3 -1
- package/docs/interfaces/SquareV2PaymentInitializeOptions.md +90 -0
- package/docs/interfaces/WithSquareV2PaymentInitializeOptions.md +18 -0
- package/package.json +2 -1
package/docs/README.md
CHANGED
|
@@ -328,6 +328,7 @@
|
|
|
328
328
|
- [SpamProtectionOptions](interfaces/SpamProtectionOptions.md)
|
|
329
329
|
- [SquareFormElement](interfaces/SquareFormElement.md)
|
|
330
330
|
- [SquarePaymentInitializeOptions](interfaces/SquarePaymentInitializeOptions.md)
|
|
331
|
+
- [SquareV2PaymentInitializeOptions](interfaces/SquareV2PaymentInitializeOptions.md)
|
|
331
332
|
- [StepStyles](interfaces/StepStyles.md)
|
|
332
333
|
- [StepTracker](interfaces/StepTracker.md)
|
|
333
334
|
- [StepTrackerConfig](interfaces/StepTrackerConfig.md)
|
|
@@ -374,6 +375,7 @@
|
|
|
374
375
|
- [WithCheckoutcomiDealInstrument](interfaces/WithCheckoutcomiDealInstrument.md)
|
|
375
376
|
- [WithDocumentInstrument](interfaces/WithDocumentInstrument.md)
|
|
376
377
|
- [WithMollieIssuerInstrument](interfaces/WithMollieIssuerInstrument.md)
|
|
378
|
+
- [WithSquareV2PaymentInitializeOptions](interfaces/WithSquareV2PaymentInitializeOptions.md)
|
|
377
379
|
- [WorldpayAccessPaymentInitializeOptions](interfaces/WorldpayAccessPaymentInitializeOptions.md)
|
|
378
380
|
- [ZipCodeElementOptions](interfaces/ZipCodeElementOptions.md)
|
|
379
381
|
|
|
@@ -665,7 +667,7 @@ ___
|
|
|
665
667
|
|
|
666
668
|
### PaymentInitializeOptions
|
|
667
669
|
|
|
668
|
-
Ƭ **PaymentInitializeOptions**: [`BasePaymentInitializeOptions`](interfaces/BasePaymentInitializeOptions.md) & [`WithAdyenV2PaymentInitializeOptions`](interfaces/WithAdyenV2PaymentInitializeOptions.md) & [`WithAdyenV3PaymentInitializeOptions`](interfaces/WithAdyenV3PaymentInitializeOptions.md) & [`WithApplePayPaymentInitializeOptions`](interfaces/WithApplePayPaymentInitializeOptions.md)
|
|
670
|
+
Ƭ **PaymentInitializeOptions**: [`BasePaymentInitializeOptions`](interfaces/BasePaymentInitializeOptions.md) & [`WithAdyenV2PaymentInitializeOptions`](interfaces/WithAdyenV2PaymentInitializeOptions.md) & [`WithAdyenV3PaymentInitializeOptions`](interfaces/WithAdyenV3PaymentInitializeOptions.md) & [`WithApplePayPaymentInitializeOptions`](interfaces/WithApplePayPaymentInitializeOptions.md) & [`WithSquareV2PaymentInitializeOptions`](interfaces/WithSquareV2PaymentInitializeOptions.md)
|
|
669
671
|
|
|
670
672
|
___
|
|
671
673
|
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
[@bigcommerce/checkout-sdk](../README.md) / SquareV2PaymentInitializeOptions
|
|
2
|
+
|
|
3
|
+
# Interface: SquareV2PaymentInitializeOptions
|
|
4
|
+
|
|
5
|
+
A set of options that are required to initialize the Square payment method.
|
|
6
|
+
|
|
7
|
+
Once Square payment is initialized, an iframed payment element will be
|
|
8
|
+
inserted into the current page. These options provide a location, styling,
|
|
9
|
+
and a callback function that advises when it's safe to pay.
|
|
10
|
+
|
|
11
|
+
**`example`**
|
|
12
|
+
|
|
13
|
+
```html
|
|
14
|
+
<!-- These container is where the hosted (iframed) payment method element will be inserted -->
|
|
15
|
+
<div id="card-payment"></div>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
```js
|
|
19
|
+
service.initializePayment({
|
|
20
|
+
methodId: 'squarev2',
|
|
21
|
+
squarev2: {
|
|
22
|
+
containerId: 'card-payment',
|
|
23
|
+
style: {
|
|
24
|
+
input: {
|
|
25
|
+
backgroundColor: '#F7F8F9',
|
|
26
|
+
color: '#373F4A',
|
|
27
|
+
fontFamily: 'Helvetica Neue',
|
|
28
|
+
fontSize: '16px',
|
|
29
|
+
fontWeight: 'normal'
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
onValidationChange: (isReadyToPay: boolean) => {
|
|
33
|
+
if (isReadyToPay) {
|
|
34
|
+
// Show or hide some component or message...
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Table of contents
|
|
42
|
+
|
|
43
|
+
### Properties
|
|
44
|
+
|
|
45
|
+
- [containerId](SquareV2PaymentInitializeOptions.md#containerid)
|
|
46
|
+
- [style](SquareV2PaymentInitializeOptions.md#style)
|
|
47
|
+
|
|
48
|
+
### Methods
|
|
49
|
+
|
|
50
|
+
- [onValidationChange](SquareV2PaymentInitializeOptions.md#onvalidationchange)
|
|
51
|
+
|
|
52
|
+
## Properties
|
|
53
|
+
|
|
54
|
+
### containerId
|
|
55
|
+
|
|
56
|
+
• **containerId**: `string`
|
|
57
|
+
|
|
58
|
+
The ID of a container which the payment widget should insert into.
|
|
59
|
+
|
|
60
|
+
___
|
|
61
|
+
|
|
62
|
+
### style
|
|
63
|
+
|
|
64
|
+
• `Optional` **style**: `CardClassSelectors`
|
|
65
|
+
|
|
66
|
+
A map of .css classes and values that customize the style of the
|
|
67
|
+
input fields from the card element.
|
|
68
|
+
|
|
69
|
+
For more information about applying custom styles to the card form, see
|
|
70
|
+
the available [CardClassSelectors](https://developer.squareup.com/reference/sdks/web/payments/objects/CardClassSelectors)
|
|
71
|
+
for styling.
|
|
72
|
+
|
|
73
|
+
## Methods
|
|
74
|
+
|
|
75
|
+
### onValidationChange
|
|
76
|
+
|
|
77
|
+
▸ `Optional` **onValidationChange**(`isReadyToPay`): `void`
|
|
78
|
+
|
|
79
|
+
A callback that gets called when the validity of the
|
|
80
|
+
payment component changes.
|
|
81
|
+
|
|
82
|
+
#### Parameters
|
|
83
|
+
|
|
84
|
+
| Name | Type |
|
|
85
|
+
| :------ | :------ |
|
|
86
|
+
| `isReadyToPay` | `boolean` |
|
|
87
|
+
|
|
88
|
+
#### Returns
|
|
89
|
+
|
|
90
|
+
`void`
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
[@bigcommerce/checkout-sdk](../README.md) / WithSquareV2PaymentInitializeOptions
|
|
2
|
+
|
|
3
|
+
# Interface: WithSquareV2PaymentInitializeOptions
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Properties
|
|
8
|
+
|
|
9
|
+
- [squarev2](WithSquareV2PaymentInitializeOptions.md#squarev2)
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
### squarev2
|
|
14
|
+
|
|
15
|
+
• `Optional` **squarev2**: [`SquareV2PaymentInitializeOptions`](SquareV2PaymentInitializeOptions.md)
|
|
16
|
+
|
|
17
|
+
The options that are required to initialize the Square payment method.
|
|
18
|
+
They can be omitted unless you need to support Square.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigcommerce/checkout-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.309.0",
|
|
4
4
|
"description": "BigCommerce Checkout JavaScript SDK",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/checkout-sdk.js",
|
|
@@ -84,6 +84,7 @@
|
|
|
84
84
|
"@nrwl/jest": "^13.10.3",
|
|
85
85
|
"@nrwl/nx-plugin": "^13.10.3",
|
|
86
86
|
"@nrwl/workspace": "^13.10.3",
|
|
87
|
+
"@square/web-payments-sdk-types": "^1.44.1",
|
|
87
88
|
"@types/applepayjs": "^3.0.2",
|
|
88
89
|
"@types/glob": "^7.2.0",
|
|
89
90
|
"@types/grecaptcha": "^2.0.36",
|