@bigcommerce/checkout-sdk 1.369.0 → 1.369.1
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.js.map +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 +94 -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 +4 -1
- package/docs/interfaces/DeprecatedPayPalCommerceCreditCardsPaymentInitializeOptions.md +17 -0
- package/docs/interfaces/PayPalCommerceCreditCardsPaymentInitializeOptions.md +90 -0
- package/docs/interfaces/WithPayPalCommerceCreditCardsPaymentInitializeOptions.md +22 -0
- package/package.json +1 -1
package/dist/checkout-sdk.d.ts
CHANGED
|
@@ -4522,6 +4522,13 @@ declare interface CustomerRequestOptions extends RequestOptions {
|
|
|
4522
4522
|
methodId?: string;
|
|
4523
4523
|
}
|
|
4524
4524
|
|
|
4525
|
+
declare interface DeprecatedPayPalCommerceCreditCardsPaymentInitializeOptions {
|
|
4526
|
+
/**
|
|
4527
|
+
* The form is data for Credit Card Form
|
|
4528
|
+
*/
|
|
4529
|
+
form?: HostedFormOptions_2;
|
|
4530
|
+
}
|
|
4531
|
+
|
|
4525
4532
|
declare interface DigitalItem extends LineItem {
|
|
4526
4533
|
downloadFileUrls: string[];
|
|
4527
4534
|
downloadPageUrl: string;
|
|
@@ -6043,6 +6050,87 @@ declare interface PayPalCommerceCreditButtonInitializeOptions {
|
|
|
6043
6050
|
onComplete?(): void;
|
|
6044
6051
|
}
|
|
6045
6052
|
|
|
6053
|
+
/**
|
|
6054
|
+
* A set of options that are required to initialize the PayPal Commerce payment
|
|
6055
|
+
* method for presenting its credit card form.
|
|
6056
|
+
*
|
|
6057
|
+
* ```html
|
|
6058
|
+
* <!-- These containers are where the hosted (iframed) credit card fields will be inserted -->
|
|
6059
|
+
* <div id="card-number"></div>
|
|
6060
|
+
* <div id="card-name"></div>
|
|
6061
|
+
* <div id="card-expiry"></div>
|
|
6062
|
+
* <div id="card-code"></div>
|
|
6063
|
+
* ```
|
|
6064
|
+
*
|
|
6065
|
+
* ```js
|
|
6066
|
+
* service.initializePayment({
|
|
6067
|
+
* methodId: 'paypalcommercecreditcard',
|
|
6068
|
+
* paypalcommercecreditcard: {
|
|
6069
|
+
* form: {
|
|
6070
|
+
* fields: {
|
|
6071
|
+
* cardNumber: { containerId: 'card-number' },
|
|
6072
|
+
* cardName: { containerId: 'card-name' },
|
|
6073
|
+
* cardExpiry: { containerId: 'card-expiry' },
|
|
6074
|
+
* cardCode: { containerId: 'card-code' },
|
|
6075
|
+
* },
|
|
6076
|
+
* },
|
|
6077
|
+
* },
|
|
6078
|
+
* });
|
|
6079
|
+
* ```
|
|
6080
|
+
*
|
|
6081
|
+
* Additional options can be passed in to customize the fields and register
|
|
6082
|
+
* event callbacks.
|
|
6083
|
+
*
|
|
6084
|
+
* ```js
|
|
6085
|
+
* service.initializePayment({
|
|
6086
|
+
* methodId: 'paypalcommercecreditcard',
|
|
6087
|
+
* paypalcommercecreditcard: {
|
|
6088
|
+
* form: {
|
|
6089
|
+
* fields: {
|
|
6090
|
+
* cardNumber: { containerId: 'card-number', placeholder: 'Number of card' },
|
|
6091
|
+
* cardName: { containerId: 'card-name', placeholder: 'Name of card' },
|
|
6092
|
+
* cardExpiry: { containerId: 'card-expiry', placeholder: 'Expiry of card' },
|
|
6093
|
+
* cardCode: { containerId: 'card-code', placeholder: 'Code of card' },
|
|
6094
|
+
* },
|
|
6095
|
+
* styles: {
|
|
6096
|
+
* default: {
|
|
6097
|
+
* color: '#000',
|
|
6098
|
+
* },
|
|
6099
|
+
* error: {
|
|
6100
|
+
* color: '#f00',
|
|
6101
|
+
* },
|
|
6102
|
+
* focus: {
|
|
6103
|
+
* color: '#0f0',
|
|
6104
|
+
* },
|
|
6105
|
+
* },
|
|
6106
|
+
* onBlur({ fieldType }) {
|
|
6107
|
+
* console.log(fieldType);
|
|
6108
|
+
* },
|
|
6109
|
+
* onFocus({ fieldType }) {
|
|
6110
|
+
* console.log(fieldType);
|
|
6111
|
+
* },
|
|
6112
|
+
* onEnter({ fieldType }) {
|
|
6113
|
+
* console.log(fieldType);
|
|
6114
|
+
* },
|
|
6115
|
+
* onCardTypeChange({ cardType }) {
|
|
6116
|
+
* console.log(cardType);
|
|
6117
|
+
* },
|
|
6118
|
+
* onValidate({ errors, isValid }) {
|
|
6119
|
+
* console.log(errors);
|
|
6120
|
+
* console.log(isValid);
|
|
6121
|
+
* },
|
|
6122
|
+
* },
|
|
6123
|
+
* },
|
|
6124
|
+
* });
|
|
6125
|
+
* ```
|
|
6126
|
+
*/
|
|
6127
|
+
declare interface PayPalCommerceCreditCardsPaymentInitializeOptions {
|
|
6128
|
+
/**
|
|
6129
|
+
* The form is data for Credit Card Form
|
|
6130
|
+
*/
|
|
6131
|
+
form: HostedFormOptions_2;
|
|
6132
|
+
}
|
|
6133
|
+
|
|
6046
6134
|
declare interface PayPalCommerceCreditCustomerInitializeOptions {
|
|
6047
6135
|
/**
|
|
6048
6136
|
* The ID of a container which the checkout button should be inserted into.
|
|
@@ -6142,7 +6230,7 @@ declare interface PayPalInstrument extends BaseAccountInstrument {
|
|
|
6142
6230
|
method: 'paypal';
|
|
6143
6231
|
}
|
|
6144
6232
|
|
|
6145
|
-
declare type PaymentInitializeOptions = BasePaymentInitializeOptions & WithAdyenV2PaymentInitializeOptions & WithAdyenV3PaymentInitializeOptions & WithApplePayPaymentInitializeOptions & WithBoltPaymentInitializeOptions & WithCreditCardPaymentInitializeOptions & WithSquareV2PaymentInitializeOptions;
|
|
6233
|
+
declare type PaymentInitializeOptions = BasePaymentInitializeOptions & WithAdyenV2PaymentInitializeOptions & WithAdyenV3PaymentInitializeOptions & WithApplePayPaymentInitializeOptions & WithBoltPaymentInitializeOptions & WithCreditCardPaymentInitializeOptions & WithPayPalCommerceCreditCardsPaymentInitializeOptions & WithSquareV2PaymentInitializeOptions;
|
|
6146
6234
|
|
|
6147
6235
|
declare type PaymentInstrument = CardInstrument | AccountInstrument;
|
|
6148
6236
|
|
|
@@ -7691,6 +7779,11 @@ declare interface WithPayPalCommerceCreditButtonInitializeOptions {
|
|
|
7691
7779
|
paypalcommercecredit?: PayPalCommerceCreditButtonInitializeOptions;
|
|
7692
7780
|
}
|
|
7693
7781
|
|
|
7782
|
+
declare interface WithPayPalCommerceCreditCardsPaymentInitializeOptions {
|
|
7783
|
+
paypalcommercecreditcards?: PayPalCommerceCreditCardsPaymentInitializeOptions;
|
|
7784
|
+
paypalcommerce?: DeprecatedPayPalCommerceCreditCardsPaymentInitializeOptions;
|
|
7785
|
+
}
|
|
7786
|
+
|
|
7694
7787
|
declare interface WithPayPalCommerceCreditCustomerInitializeOptions {
|
|
7695
7788
|
paypalcommercecredit?: PayPalCommerceCreditCustomerInitializeOptions;
|
|
7696
7789
|
}
|