@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
package/dist/checkout-sdk.d.ts
CHANGED
|
@@ -4078,6 +4078,10 @@ declare interface GatewayOrderPayment extends OrderPayment {
|
|
|
4078
4078
|
step: string;
|
|
4079
4079
|
instructions: string;
|
|
4080
4080
|
};
|
|
4081
|
+
mandate?: {
|
|
4082
|
+
id: string;
|
|
4083
|
+
url?: string;
|
|
4084
|
+
};
|
|
4081
4085
|
}
|
|
4082
4086
|
|
|
4083
4087
|
declare interface GiftCertificate {
|
|
@@ -4944,11 +4948,43 @@ declare interface OptionsResponse {
|
|
|
4944
4948
|
paymentMethodConfiguration?: BaseElementOptions;
|
|
4945
4949
|
}
|
|
4946
4950
|
|
|
4951
|
+
/**
|
|
4952
|
+
* A set of options that are required to initialize the payment step of
|
|
4953
|
+
* checkout in order to support Opy.
|
|
4954
|
+
*
|
|
4955
|
+
* When Opy is initialized, a widget will be inserted into the DOM. The
|
|
4956
|
+
* widget will open a modal that will show more information about Opy when
|
|
4957
|
+
* clicking it.
|
|
4958
|
+
*
|
|
4959
|
+
* @example
|
|
4960
|
+
*
|
|
4961
|
+
* ```html
|
|
4962
|
+
* <!-- This is where the Opy widget will be inserted -->
|
|
4963
|
+
* <div id="opy-widget"></div>
|
|
4964
|
+
* ```
|
|
4965
|
+
*
|
|
4966
|
+
* ```js
|
|
4967
|
+
* service.initializePayment({
|
|
4968
|
+
* methodId: 'opy',
|
|
4969
|
+
* opy: {
|
|
4970
|
+
* containerId: 'opy-widget',
|
|
4971
|
+
* },
|
|
4972
|
+
* });
|
|
4973
|
+
* ```
|
|
4974
|
+
*/
|
|
4975
|
+
declare interface OpyPaymentInitializeOptions {
|
|
4976
|
+
/**
|
|
4977
|
+
* The ID of a container which the payment widget should insert into.
|
|
4978
|
+
*/
|
|
4979
|
+
containerId: string;
|
|
4980
|
+
}
|
|
4981
|
+
|
|
4947
4982
|
declare interface Order {
|
|
4948
4983
|
baseAmount: number;
|
|
4949
4984
|
billingAddress: BillingAddress;
|
|
4950
4985
|
cartId: string;
|
|
4951
4986
|
coupons: Coupon[];
|
|
4987
|
+
consignments: OrderConsignment[];
|
|
4952
4988
|
currency: Currency;
|
|
4953
4989
|
customerCanBeCreated: boolean;
|
|
4954
4990
|
customerId: number;
|
|
@@ -4970,12 +5006,16 @@ declare interface Order {
|
|
|
4970
5006
|
status: string;
|
|
4971
5007
|
taxes: Tax[];
|
|
4972
5008
|
taxTotal: number;
|
|
4973
|
-
|
|
5009
|
+
}
|
|
5010
|
+
|
|
5011
|
+
declare interface OrderConsignment {
|
|
5012
|
+
shipping: OrderShippingConsignment[];
|
|
4974
5013
|
}
|
|
4975
5014
|
|
|
4976
5015
|
declare interface OrderPayment {
|
|
4977
5016
|
providerId: string;
|
|
4978
5017
|
gatewayId?: string;
|
|
5018
|
+
methodId?: string;
|
|
4979
5019
|
paymentId?: string;
|
|
4980
5020
|
description: string;
|
|
4981
5021
|
amount: number;
|
|
@@ -5022,6 +5062,44 @@ declare interface OrderRequestBody {
|
|
|
5022
5062
|
useStoreCredit?: boolean;
|
|
5023
5063
|
}
|
|
5024
5064
|
|
|
5065
|
+
declare interface OrderShippingConsignment {
|
|
5066
|
+
lineItems: Array<{
|
|
5067
|
+
id: number;
|
|
5068
|
+
}>;
|
|
5069
|
+
shippingAddressId: number;
|
|
5070
|
+
firstName: string;
|
|
5071
|
+
lastName: string;
|
|
5072
|
+
company: string;
|
|
5073
|
+
address1: string;
|
|
5074
|
+
address2: string;
|
|
5075
|
+
city: string;
|
|
5076
|
+
stateOrProvince: string;
|
|
5077
|
+
postalCode: string;
|
|
5078
|
+
country: string;
|
|
5079
|
+
countryCode: string;
|
|
5080
|
+
email: string;
|
|
5081
|
+
phone: string;
|
|
5082
|
+
itemsTotal: number;
|
|
5083
|
+
itemsShipped: number;
|
|
5084
|
+
shippingMethod: string;
|
|
5085
|
+
baseCost: number;
|
|
5086
|
+
costExTax: number;
|
|
5087
|
+
costIncTax: number;
|
|
5088
|
+
costTax: number;
|
|
5089
|
+
costTaxClassId: number;
|
|
5090
|
+
baseHandlingCost: number;
|
|
5091
|
+
handlingCostExTax: number;
|
|
5092
|
+
handlingCostIncTax: number;
|
|
5093
|
+
handlingCostTax: number;
|
|
5094
|
+
handlingCostTaxClassId: number;
|
|
5095
|
+
shippingZoneId: number;
|
|
5096
|
+
shippingZoneName: string;
|
|
5097
|
+
customFields: Array<{
|
|
5098
|
+
name: string;
|
|
5099
|
+
value: string | null;
|
|
5100
|
+
}>;
|
|
5101
|
+
}
|
|
5102
|
+
|
|
5025
5103
|
declare interface PasswordRequirements {
|
|
5026
5104
|
alpha: string;
|
|
5027
5105
|
numeric: string;
|
|
@@ -5111,6 +5189,11 @@ declare interface PaymentInitializeOptions extends PaymentRequestOptions {
|
|
|
5111
5189
|
* They can be omitted unless you need to support Moneris.
|
|
5112
5190
|
*/
|
|
5113
5191
|
moneris?: MonerisPaymentInitializeOptions;
|
|
5192
|
+
/**
|
|
5193
|
+
* The options that are required to initialize the Opy payment
|
|
5194
|
+
* method. They can be omitted unless you need to support Opy.
|
|
5195
|
+
*/
|
|
5196
|
+
opy?: OpyPaymentInitializeOptions;
|
|
5114
5197
|
/**
|
|
5115
5198
|
* The options that are required to initialize the PayPal Express payment method.
|
|
5116
5199
|
* They can be omitted unless you need to support PayPal Express.
|
|
@@ -5868,45 +5951,6 @@ declare interface SquareFormElement {
|
|
|
5868
5951
|
* },
|
|
5869
5952
|
* });
|
|
5870
5953
|
* ```
|
|
5871
|
-
*
|
|
5872
|
-
* Additional options can be passed in to enable Masterpass (if configured for
|
|
5873
|
-
* the account) and customize the fields.
|
|
5874
|
-
*
|
|
5875
|
-
* ```html
|
|
5876
|
-
* <!-- This container is where Masterpass button will be inserted -->
|
|
5877
|
-
* <div id="masterpass"></div>
|
|
5878
|
-
* ```
|
|
5879
|
-
*
|
|
5880
|
-
* ```js
|
|
5881
|
-
* service.initializePayment({
|
|
5882
|
-
* methodId: 'squarev2',
|
|
5883
|
-
* square: {
|
|
5884
|
-
* cardNumber: {
|
|
5885
|
-
* elementId: 'card-number',
|
|
5886
|
-
* },
|
|
5887
|
-
* cvv: {
|
|
5888
|
-
* elementId: 'card-code',
|
|
5889
|
-
* },
|
|
5890
|
-
* expirationDate: {
|
|
5891
|
-
* elementId: 'card-expiry',
|
|
5892
|
-
* },
|
|
5893
|
-
* postalCode: {
|
|
5894
|
-
* elementId: 'card-code',
|
|
5895
|
-
* },
|
|
5896
|
-
* inputClass: 'form-input',
|
|
5897
|
-
* inputStyles: [
|
|
5898
|
-
* {
|
|
5899
|
-
* color: '#333',
|
|
5900
|
-
* fontSize: '13px',
|
|
5901
|
-
* lineHeight: '20px',
|
|
5902
|
-
* },
|
|
5903
|
-
* ],
|
|
5904
|
-
* masterpass: {
|
|
5905
|
-
* elementId: 'masterpass',
|
|
5906
|
-
* },
|
|
5907
|
-
* },
|
|
5908
|
-
* });
|
|
5909
|
-
* ```
|
|
5910
5954
|
*/
|
|
5911
5955
|
declare interface SquarePaymentInitializeOptions {
|
|
5912
5956
|
/**
|
|
@@ -5935,10 +5979,6 @@ declare interface SquarePaymentInitializeOptions {
|
|
|
5935
5979
|
inputStyles?: Array<{
|
|
5936
5980
|
[key: string]: string;
|
|
5937
5981
|
}>;
|
|
5938
|
-
/**
|
|
5939
|
-
* Initialize Masterpass placeholder ID
|
|
5940
|
-
*/
|
|
5941
|
-
masterpass?: SquareFormElement;
|
|
5942
5982
|
/**
|
|
5943
5983
|
* A callback that gets called when the customer selects a payment option.
|
|
5944
5984
|
*/
|