@bigcommerce/checkout-sdk 1.215.1 → 1.219.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 +28 -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 +56 -62
- 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 +5 -1
- package/docs/README.md +1 -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 +0 -7
- package/docs/interfaces/orderpayment.md +7 -0
- package/docs/interfaces/paymentinitializeoptions.md +10 -0
- package/docs/interfaces/paypalfieldsstyleoptions.md +6 -20
- 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,6 +4948,37 @@ 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;
|
|
@@ -4971,7 +5006,6 @@ declare interface Order {
|
|
|
4971
5006
|
status: string;
|
|
4972
5007
|
taxes: Tax[];
|
|
4973
5008
|
taxTotal: number;
|
|
4974
|
-
mandateUrl?: string;
|
|
4975
5009
|
}
|
|
4976
5010
|
|
|
4977
5011
|
declare interface OrderConsignment {
|
|
@@ -4981,6 +5015,7 @@ declare interface OrderConsignment {
|
|
|
4981
5015
|
declare interface OrderPayment {
|
|
4982
5016
|
providerId: string;
|
|
4983
5017
|
gatewayId?: string;
|
|
5018
|
+
methodId?: string;
|
|
4984
5019
|
paymentId?: string;
|
|
4985
5020
|
description: string;
|
|
4986
5021
|
amount: number;
|
|
@@ -5154,6 +5189,11 @@ declare interface PaymentInitializeOptions extends PaymentRequestOptions {
|
|
|
5154
5189
|
* They can be omitted unless you need to support Moneris.
|
|
5155
5190
|
*/
|
|
5156
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;
|
|
5157
5197
|
/**
|
|
5158
5198
|
* The options that are required to initialize the PayPal Express payment method.
|
|
5159
5199
|
* They can be omitted unless you need to support PayPal Express.
|
|
@@ -5694,28 +5734,25 @@ declare interface PaypalExpressPaymentInitializeOptions {
|
|
|
5694
5734
|
}
|
|
5695
5735
|
|
|
5696
5736
|
declare interface PaypalFieldsStyleOptions {
|
|
5697
|
-
|
|
5698
|
-
backgroundColor?: string;
|
|
5699
|
-
color?: string;
|
|
5700
|
-
fontSize?: string;
|
|
5737
|
+
variables?: {
|
|
5701
5738
|
fontFamily?: string;
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
|
|
5709
|
-
|
|
5739
|
+
fontSizeBase?: string;
|
|
5740
|
+
fontSizeSm?: string;
|
|
5741
|
+
fontSizeM?: string;
|
|
5742
|
+
fontSizeLg?: string;
|
|
5743
|
+
textColor?: string;
|
|
5744
|
+
colorTextPlaceholder?: string;
|
|
5745
|
+
colorBackground?: string;
|
|
5746
|
+
colorInfo?: string;
|
|
5747
|
+
colorDanger?: string;
|
|
5710
5748
|
borderRadius?: string;
|
|
5749
|
+
borderColor?: string;
|
|
5711
5750
|
borderWidth?: string;
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
invalid?: {
|
|
5715
|
-
color?: string;
|
|
5751
|
+
borderFocusColor?: string;
|
|
5752
|
+
spacingUnit?: string;
|
|
5716
5753
|
};
|
|
5717
|
-
|
|
5718
|
-
|
|
5754
|
+
rules?: {
|
|
5755
|
+
[key: string]: any;
|
|
5719
5756
|
};
|
|
5720
5757
|
}
|
|
5721
5758
|
|
|
@@ -5911,45 +5948,6 @@ declare interface SquareFormElement {
|
|
|
5911
5948
|
* },
|
|
5912
5949
|
* });
|
|
5913
5950
|
* ```
|
|
5914
|
-
*
|
|
5915
|
-
* Additional options can be passed in to enable Masterpass (if configured for
|
|
5916
|
-
* the account) and customize the fields.
|
|
5917
|
-
*
|
|
5918
|
-
* ```html
|
|
5919
|
-
* <!-- This container is where Masterpass button will be inserted -->
|
|
5920
|
-
* <div id="masterpass"></div>
|
|
5921
|
-
* ```
|
|
5922
|
-
*
|
|
5923
|
-
* ```js
|
|
5924
|
-
* service.initializePayment({
|
|
5925
|
-
* methodId: 'squarev2',
|
|
5926
|
-
* square: {
|
|
5927
|
-
* cardNumber: {
|
|
5928
|
-
* elementId: 'card-number',
|
|
5929
|
-
* },
|
|
5930
|
-
* cvv: {
|
|
5931
|
-
* elementId: 'card-code',
|
|
5932
|
-
* },
|
|
5933
|
-
* expirationDate: {
|
|
5934
|
-
* elementId: 'card-expiry',
|
|
5935
|
-
* },
|
|
5936
|
-
* postalCode: {
|
|
5937
|
-
* elementId: 'card-code',
|
|
5938
|
-
* },
|
|
5939
|
-
* inputClass: 'form-input',
|
|
5940
|
-
* inputStyles: [
|
|
5941
|
-
* {
|
|
5942
|
-
* color: '#333',
|
|
5943
|
-
* fontSize: '13px',
|
|
5944
|
-
* lineHeight: '20px',
|
|
5945
|
-
* },
|
|
5946
|
-
* ],
|
|
5947
|
-
* masterpass: {
|
|
5948
|
-
* elementId: 'masterpass',
|
|
5949
|
-
* },
|
|
5950
|
-
* },
|
|
5951
|
-
* });
|
|
5952
|
-
* ```
|
|
5953
5951
|
*/
|
|
5954
5952
|
declare interface SquarePaymentInitializeOptions {
|
|
5955
5953
|
/**
|
|
@@ -5978,10 +5976,6 @@ declare interface SquarePaymentInitializeOptions {
|
|
|
5978
5976
|
inputStyles?: Array<{
|
|
5979
5977
|
[key: string]: string;
|
|
5980
5978
|
}>;
|
|
5981
|
-
/**
|
|
5982
|
-
* Initialize Masterpass placeholder ID
|
|
5983
|
-
*/
|
|
5984
|
-
masterpass?: SquareFormElement;
|
|
5985
5979
|
/**
|
|
5986
5980
|
* A callback that gets called when the customer selects a payment option.
|
|
5987
5981
|
*/
|