@bigcommerce/checkout-sdk 1.215.0 → 1.218.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 +23 -0
- package/dist/checkout-button.js +1 -1
- package/dist/checkout-button.js.map +1 -1
- package/dist/checkout-button.umd.js +2 -2
- package/dist/checkout-button.umd.js.map +1 -1
- package/dist/checkout-sdk.d.ts +84 -44
- package/dist/checkout-sdk.js +1 -1
- package/dist/checkout-sdk.js.map +1 -1
- package/dist/checkout-sdk.umd.js +5 -5
- package/dist/checkout-sdk.umd.js.map +1 -1
- package/dist/internal-mappers.d.ts +48 -1
- package/docs/README.md +3 -0
- package/docs/interfaces/gatewayorderpayment.md +16 -0
- package/docs/interfaces/giftcertificateorderpayment.md +9 -0
- package/docs/interfaces/opypaymentinitializeoptions.md +44 -0
- package/docs/interfaces/order.md +7 -7
- package/docs/interfaces/orderconsignment.md +19 -0
- package/docs/interfaces/orderpayment.md +7 -0
- package/docs/interfaces/ordershippingconsignment.md +222 -0
- package/docs/interfaces/paymentinitializeoptions.md +10 -0
- package/docs/interfaces/squarepaymentinitializeoptions.md +0 -48
- package/package.json +1 -1
|
@@ -201,6 +201,10 @@ declare interface GatewayOrderPayment extends OrderPayment {
|
|
|
201
201
|
step: string;
|
|
202
202
|
instructions: string;
|
|
203
203
|
};
|
|
204
|
+
mandate?: {
|
|
205
|
+
id: string;
|
|
206
|
+
url?: string;
|
|
207
|
+
};
|
|
204
208
|
}
|
|
205
209
|
|
|
206
210
|
declare interface GiftCertificate {
|
|
@@ -562,6 +566,7 @@ declare interface Order {
|
|
|
562
566
|
billingAddress: BillingAddress;
|
|
563
567
|
cartId: string;
|
|
564
568
|
coupons: Coupon[];
|
|
569
|
+
consignments: OrderConsignment[];
|
|
565
570
|
currency: Currency;
|
|
566
571
|
customerCanBeCreated: boolean;
|
|
567
572
|
customerId: number;
|
|
@@ -583,7 +588,10 @@ declare interface Order {
|
|
|
583
588
|
status: string;
|
|
584
589
|
taxes: Tax[];
|
|
585
590
|
taxTotal: number;
|
|
586
|
-
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
declare interface OrderConsignment {
|
|
594
|
+
shipping: OrderShippingConsignment[];
|
|
587
595
|
}
|
|
588
596
|
|
|
589
597
|
declare interface OrderMetaState extends InternalOrderMeta {
|
|
@@ -596,6 +604,7 @@ declare interface OrderMetaState extends InternalOrderMeta {
|
|
|
596
604
|
declare interface OrderPayment {
|
|
597
605
|
providerId: string;
|
|
598
606
|
gatewayId?: string;
|
|
607
|
+
methodId?: string;
|
|
599
608
|
paymentId?: string;
|
|
600
609
|
description: string;
|
|
601
610
|
amount: number;
|
|
@@ -603,6 +612,44 @@ declare interface OrderPayment {
|
|
|
603
612
|
|
|
604
613
|
declare type OrderPayments = Array<GatewayOrderPayment | GiftCertificateOrderPayment>;
|
|
605
614
|
|
|
615
|
+
declare interface OrderShippingConsignment {
|
|
616
|
+
lineItems: Array<{
|
|
617
|
+
id: number;
|
|
618
|
+
}>;
|
|
619
|
+
shippingAddressId: number;
|
|
620
|
+
firstName: string;
|
|
621
|
+
lastName: string;
|
|
622
|
+
company: string;
|
|
623
|
+
address1: string;
|
|
624
|
+
address2: string;
|
|
625
|
+
city: string;
|
|
626
|
+
stateOrProvince: string;
|
|
627
|
+
postalCode: string;
|
|
628
|
+
country: string;
|
|
629
|
+
countryCode: string;
|
|
630
|
+
email: string;
|
|
631
|
+
phone: string;
|
|
632
|
+
itemsTotal: number;
|
|
633
|
+
itemsShipped: number;
|
|
634
|
+
shippingMethod: string;
|
|
635
|
+
baseCost: number;
|
|
636
|
+
costExTax: number;
|
|
637
|
+
costIncTax: number;
|
|
638
|
+
costTax: number;
|
|
639
|
+
costTaxClassId: number;
|
|
640
|
+
baseHandlingCost: number;
|
|
641
|
+
handlingCostExTax: number;
|
|
642
|
+
handlingCostIncTax: number;
|
|
643
|
+
handlingCostTax: number;
|
|
644
|
+
handlingCostTaxClassId: number;
|
|
645
|
+
shippingZoneId: number;
|
|
646
|
+
shippingZoneName: string;
|
|
647
|
+
customFields: Array<{
|
|
648
|
+
name: string;
|
|
649
|
+
value: string | null;
|
|
650
|
+
}>;
|
|
651
|
+
}
|
|
652
|
+
|
|
606
653
|
declare interface PhysicalItem extends LineItem {
|
|
607
654
|
isShippingRequired: boolean;
|
|
608
655
|
giftWrapping?: {
|
package/docs/README.md
CHANGED
|
@@ -225,10 +225,13 @@
|
|
|
225
225
|
* [NonceGenerationError](interfaces/noncegenerationerror.md)
|
|
226
226
|
* [NonceInstrument](interfaces/nonceinstrument.md)
|
|
227
227
|
* [OptionsResponse](interfaces/optionsresponse.md)
|
|
228
|
+
* [OpyPaymentInitializeOptions](interfaces/opypaymentinitializeoptions.md)
|
|
228
229
|
* [Order](interfaces/order.md)
|
|
230
|
+
* [OrderConsignment](interfaces/orderconsignment.md)
|
|
229
231
|
* [OrderPayment](interfaces/orderpayment.md)
|
|
230
232
|
* [OrderPaymentRequestBody](interfaces/orderpaymentrequestbody.md)
|
|
231
233
|
* [OrderRequestBody](interfaces/orderrequestbody.md)
|
|
234
|
+
* [OrderShippingConsignment](interfaces/ordershippingconsignment.md)
|
|
232
235
|
* [PasswordRequirements](interfaces/passwordrequirements.md)
|
|
233
236
|
* [PayPalInstrument](interfaces/paypalinstrument.md)
|
|
234
237
|
* [PaymentInitializeOptions](interfaces/paymentinitializeoptions.md)
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
* [description](gatewayorderpayment.md#description)
|
|
17
17
|
* [detail](gatewayorderpayment.md#detail)
|
|
18
18
|
* [gatewayId](gatewayorderpayment.md#optional-gatewayid)
|
|
19
|
+
* [mandate](gatewayorderpayment.md#optional-mandate)
|
|
20
|
+
* [methodId](gatewayorderpayment.md#optional-methodid)
|
|
19
21
|
* [paymentId](gatewayorderpayment.md#optional-paymentid)
|
|
20
22
|
* [providerId](gatewayorderpayment.md#providerid)
|
|
21
23
|
|
|
@@ -57,6 +59,20 @@ ___
|
|
|
57
59
|
|
|
58
60
|
___
|
|
59
61
|
|
|
62
|
+
### `Optional` mandate
|
|
63
|
+
|
|
64
|
+
• **mandate**? : *undefined | object*
|
|
65
|
+
|
|
66
|
+
___
|
|
67
|
+
|
|
68
|
+
### `Optional` methodId
|
|
69
|
+
|
|
70
|
+
• **methodId**? : *undefined | string*
|
|
71
|
+
|
|
72
|
+
*Inherited from [GatewayOrderPayment](gatewayorderpayment.md).[methodId](gatewayorderpayment.md#optional-methodid)*
|
|
73
|
+
|
|
74
|
+
___
|
|
75
|
+
|
|
60
76
|
### `Optional` paymentId
|
|
61
77
|
|
|
62
78
|
• **paymentId**? : *undefined | string*
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
* [description](giftcertificateorderpayment.md#description)
|
|
17
17
|
* [detail](giftcertificateorderpayment.md#detail)
|
|
18
18
|
* [gatewayId](giftcertificateorderpayment.md#optional-gatewayid)
|
|
19
|
+
* [methodId](giftcertificateorderpayment.md#optional-methodid)
|
|
19
20
|
* [paymentId](giftcertificateorderpayment.md#optional-paymentid)
|
|
20
21
|
* [providerId](giftcertificateorderpayment.md#providerid)
|
|
21
22
|
|
|
@@ -57,6 +58,14 @@ ___
|
|
|
57
58
|
|
|
58
59
|
___
|
|
59
60
|
|
|
61
|
+
### `Optional` methodId
|
|
62
|
+
|
|
63
|
+
• **methodId**? : *undefined | string*
|
|
64
|
+
|
|
65
|
+
*Inherited from [GatewayOrderPayment](gatewayorderpayment.md).[methodId](gatewayorderpayment.md#optional-methodid)*
|
|
66
|
+
|
|
67
|
+
___
|
|
68
|
+
|
|
60
69
|
### `Optional` paymentId
|
|
61
70
|
|
|
62
71
|
• **paymentId**? : *undefined | string*
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
[@bigcommerce/checkout-sdk](../README.md) › [OpyPaymentInitializeOptions](opypaymentinitializeoptions.md)
|
|
2
|
+
|
|
3
|
+
# Interface: OpyPaymentInitializeOptions
|
|
4
|
+
|
|
5
|
+
A set of options that are required to initialize the payment step of
|
|
6
|
+
checkout in order to support Opy.
|
|
7
|
+
|
|
8
|
+
When Opy is initialized, a widget will be inserted into the DOM. The
|
|
9
|
+
widget will open a modal that will show more information about Opy when
|
|
10
|
+
clicking it.
|
|
11
|
+
|
|
12
|
+
**`example`**
|
|
13
|
+
|
|
14
|
+
```html
|
|
15
|
+
<!-- This is where the Opy widget will be inserted -->
|
|
16
|
+
<div id="opy-widget"></div>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
```js
|
|
20
|
+
service.initializePayment({
|
|
21
|
+
methodId: 'opy',
|
|
22
|
+
opy: {
|
|
23
|
+
containerId: 'opy-widget',
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Hierarchy
|
|
29
|
+
|
|
30
|
+
* **OpyPaymentInitializeOptions**
|
|
31
|
+
|
|
32
|
+
## Index
|
|
33
|
+
|
|
34
|
+
### Properties
|
|
35
|
+
|
|
36
|
+
* [containerId](opypaymentinitializeoptions.md#containerid)
|
|
37
|
+
|
|
38
|
+
## Properties
|
|
39
|
+
|
|
40
|
+
### containerId
|
|
41
|
+
|
|
42
|
+
• **containerId**: *string*
|
|
43
|
+
|
|
44
|
+
The ID of a container which the payment widget should insert into.
|
package/docs/interfaces/order.md
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* [baseAmount](order.md#baseamount)
|
|
14
14
|
* [billingAddress](order.md#billingaddress)
|
|
15
15
|
* [cartId](order.md#cartid)
|
|
16
|
+
* [consignments](order.md#consignments)
|
|
16
17
|
* [coupons](order.md#coupons)
|
|
17
18
|
* [currency](order.md#currency)
|
|
18
19
|
* [customerCanBeCreated](order.md#customercanbecreated)
|
|
@@ -26,7 +27,6 @@
|
|
|
26
27
|
* [isDownloadable](order.md#isdownloadable)
|
|
27
28
|
* [isTaxIncluded](order.md#istaxincluded)
|
|
28
29
|
* [lineItems](order.md#lineitems)
|
|
29
|
-
* [mandateUrl](order.md#optional-mandateurl)
|
|
30
30
|
* [orderAmount](order.md#orderamount)
|
|
31
31
|
* [orderAmountAsInteger](order.md#orderamountasinteger)
|
|
32
32
|
* [orderId](order.md#orderid)
|
|
@@ -57,6 +57,12 @@ ___
|
|
|
57
57
|
|
|
58
58
|
___
|
|
59
59
|
|
|
60
|
+
### consignments
|
|
61
|
+
|
|
62
|
+
• **consignments**: *[OrderConsignment](orderconsignment.md)[]*
|
|
63
|
+
|
|
64
|
+
___
|
|
65
|
+
|
|
60
66
|
### coupons
|
|
61
67
|
|
|
62
68
|
• **coupons**: *[Coupon](coupon.md)[]*
|
|
@@ -135,12 +141,6 @@ ___
|
|
|
135
141
|
|
|
136
142
|
___
|
|
137
143
|
|
|
138
|
-
### `Optional` mandateUrl
|
|
139
|
-
|
|
140
|
-
• **mandateUrl**? : *undefined | string*
|
|
141
|
-
|
|
142
|
-
___
|
|
143
|
-
|
|
144
144
|
### orderAmount
|
|
145
145
|
|
|
146
146
|
• **orderAmount**: *number*
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[@bigcommerce/checkout-sdk](../README.md) › [OrderConsignment](orderconsignment.md)
|
|
2
|
+
|
|
3
|
+
# Interface: OrderConsignment
|
|
4
|
+
|
|
5
|
+
## Hierarchy
|
|
6
|
+
|
|
7
|
+
* **OrderConsignment**
|
|
8
|
+
|
|
9
|
+
## Index
|
|
10
|
+
|
|
11
|
+
### Properties
|
|
12
|
+
|
|
13
|
+
* [shipping](orderconsignment.md#shipping)
|
|
14
|
+
|
|
15
|
+
## Properties
|
|
16
|
+
|
|
17
|
+
### shipping
|
|
18
|
+
|
|
19
|
+
• **shipping**: *[OrderShippingConsignment](ordershippingconsignment.md)[]*
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
* [amount](orderpayment.md#amount)
|
|
18
18
|
* [description](orderpayment.md#description)
|
|
19
19
|
* [gatewayId](orderpayment.md#optional-gatewayid)
|
|
20
|
+
* [methodId](orderpayment.md#optional-methodid)
|
|
20
21
|
* [paymentId](orderpayment.md#optional-paymentid)
|
|
21
22
|
* [providerId](orderpayment.md#providerid)
|
|
22
23
|
|
|
@@ -40,6 +41,12 @@ ___
|
|
|
40
41
|
|
|
41
42
|
___
|
|
42
43
|
|
|
44
|
+
### `Optional` methodId
|
|
45
|
+
|
|
46
|
+
• **methodId**? : *undefined | string*
|
|
47
|
+
|
|
48
|
+
___
|
|
49
|
+
|
|
43
50
|
### `Optional` paymentId
|
|
44
51
|
|
|
45
52
|
• **paymentId**? : *undefined | string*
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
[@bigcommerce/checkout-sdk](../README.md) › [OrderShippingConsignment](ordershippingconsignment.md)
|
|
2
|
+
|
|
3
|
+
# Interface: OrderShippingConsignment
|
|
4
|
+
|
|
5
|
+
## Hierarchy
|
|
6
|
+
|
|
7
|
+
* **OrderShippingConsignment**
|
|
8
|
+
|
|
9
|
+
## Index
|
|
10
|
+
|
|
11
|
+
### Properties
|
|
12
|
+
|
|
13
|
+
* [address1](ordershippingconsignment.md#address1)
|
|
14
|
+
* [address2](ordershippingconsignment.md#address2)
|
|
15
|
+
* [baseCost](ordershippingconsignment.md#basecost)
|
|
16
|
+
* [baseHandlingCost](ordershippingconsignment.md#basehandlingcost)
|
|
17
|
+
* [city](ordershippingconsignment.md#city)
|
|
18
|
+
* [company](ordershippingconsignment.md#company)
|
|
19
|
+
* [costExTax](ordershippingconsignment.md#costextax)
|
|
20
|
+
* [costIncTax](ordershippingconsignment.md#costinctax)
|
|
21
|
+
* [costTax](ordershippingconsignment.md#costtax)
|
|
22
|
+
* [costTaxClassId](ordershippingconsignment.md#costtaxclassid)
|
|
23
|
+
* [country](ordershippingconsignment.md#country)
|
|
24
|
+
* [countryCode](ordershippingconsignment.md#countrycode)
|
|
25
|
+
* [customFields](ordershippingconsignment.md#customfields)
|
|
26
|
+
* [email](ordershippingconsignment.md#email)
|
|
27
|
+
* [firstName](ordershippingconsignment.md#firstname)
|
|
28
|
+
* [handlingCostExTax](ordershippingconsignment.md#handlingcostextax)
|
|
29
|
+
* [handlingCostIncTax](ordershippingconsignment.md#handlingcostinctax)
|
|
30
|
+
* [handlingCostTax](ordershippingconsignment.md#handlingcosttax)
|
|
31
|
+
* [handlingCostTaxClassId](ordershippingconsignment.md#handlingcosttaxclassid)
|
|
32
|
+
* [itemsShipped](ordershippingconsignment.md#itemsshipped)
|
|
33
|
+
* [itemsTotal](ordershippingconsignment.md#itemstotal)
|
|
34
|
+
* [lastName](ordershippingconsignment.md#lastname)
|
|
35
|
+
* [lineItems](ordershippingconsignment.md#lineitems)
|
|
36
|
+
* [phone](ordershippingconsignment.md#phone)
|
|
37
|
+
* [postalCode](ordershippingconsignment.md#postalcode)
|
|
38
|
+
* [shippingAddressId](ordershippingconsignment.md#shippingaddressid)
|
|
39
|
+
* [shippingMethod](ordershippingconsignment.md#shippingmethod)
|
|
40
|
+
* [shippingZoneId](ordershippingconsignment.md#shippingzoneid)
|
|
41
|
+
* [shippingZoneName](ordershippingconsignment.md#shippingzonename)
|
|
42
|
+
* [stateOrProvince](ordershippingconsignment.md#stateorprovince)
|
|
43
|
+
|
|
44
|
+
## Properties
|
|
45
|
+
|
|
46
|
+
### address1
|
|
47
|
+
|
|
48
|
+
• **address1**: *string*
|
|
49
|
+
|
|
50
|
+
___
|
|
51
|
+
|
|
52
|
+
### address2
|
|
53
|
+
|
|
54
|
+
• **address2**: *string*
|
|
55
|
+
|
|
56
|
+
___
|
|
57
|
+
|
|
58
|
+
### baseCost
|
|
59
|
+
|
|
60
|
+
• **baseCost**: *number*
|
|
61
|
+
|
|
62
|
+
___
|
|
63
|
+
|
|
64
|
+
### baseHandlingCost
|
|
65
|
+
|
|
66
|
+
• **baseHandlingCost**: *number*
|
|
67
|
+
|
|
68
|
+
___
|
|
69
|
+
|
|
70
|
+
### city
|
|
71
|
+
|
|
72
|
+
• **city**: *string*
|
|
73
|
+
|
|
74
|
+
___
|
|
75
|
+
|
|
76
|
+
### company
|
|
77
|
+
|
|
78
|
+
• **company**: *string*
|
|
79
|
+
|
|
80
|
+
___
|
|
81
|
+
|
|
82
|
+
### costExTax
|
|
83
|
+
|
|
84
|
+
• **costExTax**: *number*
|
|
85
|
+
|
|
86
|
+
___
|
|
87
|
+
|
|
88
|
+
### costIncTax
|
|
89
|
+
|
|
90
|
+
• **costIncTax**: *number*
|
|
91
|
+
|
|
92
|
+
___
|
|
93
|
+
|
|
94
|
+
### costTax
|
|
95
|
+
|
|
96
|
+
• **costTax**: *number*
|
|
97
|
+
|
|
98
|
+
___
|
|
99
|
+
|
|
100
|
+
### costTaxClassId
|
|
101
|
+
|
|
102
|
+
• **costTaxClassId**: *number*
|
|
103
|
+
|
|
104
|
+
___
|
|
105
|
+
|
|
106
|
+
### country
|
|
107
|
+
|
|
108
|
+
• **country**: *string*
|
|
109
|
+
|
|
110
|
+
___
|
|
111
|
+
|
|
112
|
+
### countryCode
|
|
113
|
+
|
|
114
|
+
• **countryCode**: *string*
|
|
115
|
+
|
|
116
|
+
___
|
|
117
|
+
|
|
118
|
+
### customFields
|
|
119
|
+
|
|
120
|
+
• **customFields**: *Array‹object›*
|
|
121
|
+
|
|
122
|
+
___
|
|
123
|
+
|
|
124
|
+
### email
|
|
125
|
+
|
|
126
|
+
• **email**: *string*
|
|
127
|
+
|
|
128
|
+
___
|
|
129
|
+
|
|
130
|
+
### firstName
|
|
131
|
+
|
|
132
|
+
• **firstName**: *string*
|
|
133
|
+
|
|
134
|
+
___
|
|
135
|
+
|
|
136
|
+
### handlingCostExTax
|
|
137
|
+
|
|
138
|
+
• **handlingCostExTax**: *number*
|
|
139
|
+
|
|
140
|
+
___
|
|
141
|
+
|
|
142
|
+
### handlingCostIncTax
|
|
143
|
+
|
|
144
|
+
• **handlingCostIncTax**: *number*
|
|
145
|
+
|
|
146
|
+
___
|
|
147
|
+
|
|
148
|
+
### handlingCostTax
|
|
149
|
+
|
|
150
|
+
• **handlingCostTax**: *number*
|
|
151
|
+
|
|
152
|
+
___
|
|
153
|
+
|
|
154
|
+
### handlingCostTaxClassId
|
|
155
|
+
|
|
156
|
+
• **handlingCostTaxClassId**: *number*
|
|
157
|
+
|
|
158
|
+
___
|
|
159
|
+
|
|
160
|
+
### itemsShipped
|
|
161
|
+
|
|
162
|
+
• **itemsShipped**: *number*
|
|
163
|
+
|
|
164
|
+
___
|
|
165
|
+
|
|
166
|
+
### itemsTotal
|
|
167
|
+
|
|
168
|
+
• **itemsTotal**: *number*
|
|
169
|
+
|
|
170
|
+
___
|
|
171
|
+
|
|
172
|
+
### lastName
|
|
173
|
+
|
|
174
|
+
• **lastName**: *string*
|
|
175
|
+
|
|
176
|
+
___
|
|
177
|
+
|
|
178
|
+
### lineItems
|
|
179
|
+
|
|
180
|
+
• **lineItems**: *Array‹object›*
|
|
181
|
+
|
|
182
|
+
___
|
|
183
|
+
|
|
184
|
+
### phone
|
|
185
|
+
|
|
186
|
+
• **phone**: *string*
|
|
187
|
+
|
|
188
|
+
___
|
|
189
|
+
|
|
190
|
+
### postalCode
|
|
191
|
+
|
|
192
|
+
• **postalCode**: *string*
|
|
193
|
+
|
|
194
|
+
___
|
|
195
|
+
|
|
196
|
+
### shippingAddressId
|
|
197
|
+
|
|
198
|
+
• **shippingAddressId**: *number*
|
|
199
|
+
|
|
200
|
+
___
|
|
201
|
+
|
|
202
|
+
### shippingMethod
|
|
203
|
+
|
|
204
|
+
• **shippingMethod**: *string*
|
|
205
|
+
|
|
206
|
+
___
|
|
207
|
+
|
|
208
|
+
### shippingZoneId
|
|
209
|
+
|
|
210
|
+
• **shippingZoneId**: *number*
|
|
211
|
+
|
|
212
|
+
___
|
|
213
|
+
|
|
214
|
+
### shippingZoneName
|
|
215
|
+
|
|
216
|
+
• **shippingZoneName**: *string*
|
|
217
|
+
|
|
218
|
+
___
|
|
219
|
+
|
|
220
|
+
### stateOrProvince
|
|
221
|
+
|
|
222
|
+
• **stateOrProvince**: *string*
|
|
@@ -44,6 +44,7 @@ current checkout flow.
|
|
|
44
44
|
* [methodId](paymentinitializeoptions.md#methodid)
|
|
45
45
|
* [mollie](paymentinitializeoptions.md#optional-mollie)
|
|
46
46
|
* [moneris](paymentinitializeoptions.md#optional-moneris)
|
|
47
|
+
* [opy](paymentinitializeoptions.md#optional-opy)
|
|
47
48
|
* [params](paymentinitializeoptions.md#optional-params)
|
|
48
49
|
* [paypalcommerce](paymentinitializeoptions.md#optional-paypalcommerce)
|
|
49
50
|
* [paypalexpress](paymentinitializeoptions.md#optional-paypalexpress)
|
|
@@ -286,6 +287,15 @@ They can be omitted unless you need to support Moneris.
|
|
|
286
287
|
|
|
287
288
|
___
|
|
288
289
|
|
|
290
|
+
### `Optional` opy
|
|
291
|
+
|
|
292
|
+
• **opy**? : *[OpyPaymentInitializeOptions](opypaymentinitializeoptions.md)*
|
|
293
|
+
|
|
294
|
+
The options that are required to initialize the Opy payment
|
|
295
|
+
method. They can be omitted unless you need to support Opy.
|
|
296
|
+
|
|
297
|
+
___
|
|
298
|
+
|
|
289
299
|
### `Optional` params
|
|
290
300
|
|
|
291
301
|
• **params**? : *TParams*
|
|
@@ -36,45 +36,6 @@ service.initializePayment({
|
|
|
36
36
|
});
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
Additional options can be passed in to enable Masterpass (if configured for
|
|
40
|
-
the account) and customize the fields.
|
|
41
|
-
|
|
42
|
-
```html
|
|
43
|
-
<!-- This container is where Masterpass button will be inserted -->
|
|
44
|
-
<div id="masterpass"></div>
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
```js
|
|
48
|
-
service.initializePayment({
|
|
49
|
-
methodId: 'squarev2',
|
|
50
|
-
square: {
|
|
51
|
-
cardNumber: {
|
|
52
|
-
elementId: 'card-number',
|
|
53
|
-
},
|
|
54
|
-
cvv: {
|
|
55
|
-
elementId: 'card-code',
|
|
56
|
-
},
|
|
57
|
-
expirationDate: {
|
|
58
|
-
elementId: 'card-expiry',
|
|
59
|
-
},
|
|
60
|
-
postalCode: {
|
|
61
|
-
elementId: 'card-code',
|
|
62
|
-
},
|
|
63
|
-
inputClass: 'form-input',
|
|
64
|
-
inputStyles: [
|
|
65
|
-
{
|
|
66
|
-
color: '#333',
|
|
67
|
-
fontSize: '13px',
|
|
68
|
-
lineHeight: '20px',
|
|
69
|
-
},
|
|
70
|
-
],
|
|
71
|
-
masterpass: {
|
|
72
|
-
elementId: 'masterpass',
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
});
|
|
76
|
-
```
|
|
77
|
-
|
|
78
39
|
## Hierarchy
|
|
79
40
|
|
|
80
41
|
* **SquarePaymentInitializeOptions**
|
|
@@ -88,7 +49,6 @@ service.initializePayment({
|
|
|
88
49
|
* [expirationDate](squarepaymentinitializeoptions.md#expirationdate)
|
|
89
50
|
* [inputClass](squarepaymentinitializeoptions.md#optional-inputclass)
|
|
90
51
|
* [inputStyles](squarepaymentinitializeoptions.md#optional-inputstyles)
|
|
91
|
-
* [masterpass](squarepaymentinitializeoptions.md#optional-masterpass)
|
|
92
52
|
* [postalCode](squarepaymentinitializeoptions.md#postalcode)
|
|
93
53
|
|
|
94
54
|
### Methods
|
|
@@ -138,14 +98,6 @@ The set of CSS styles to apply to all form fields.
|
|
|
138
98
|
|
|
139
99
|
___
|
|
140
100
|
|
|
141
|
-
### `Optional` masterpass
|
|
142
|
-
|
|
143
|
-
• **masterpass**? : *[SquareFormElement](squareformelement.md)*
|
|
144
|
-
|
|
145
|
-
Initialize Masterpass placeholder ID
|
|
146
|
-
|
|
147
|
-
___
|
|
148
|
-
|
|
149
101
|
### postalCode
|
|
150
102
|
|
|
151
103
|
• **postalCode**: *[SquareFormElement](squareformelement.md)*
|