@bigcommerce/checkout-sdk 1.514.3 → 1.516.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/dist/checkout-button.js +1 -1
- package/dist/checkout-button.umd.js +1 -1
- package/dist/checkout-sdk.d.ts +74 -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/PayPalCommerceAcceleratedCheckoutPaymentInitializeOptions.md +109 -0
- package/docs/interfaces/WithPayPalCommerceAcceleratedCheckoutPaymentInitializeOptions.md +15 -0
- package/package.json +1 -1
package/dist/checkout-sdk.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { BraintreeConnectStylesOption } from '@bigcommerce/checkout-sdk/braintre
|
|
|
3
3
|
import { BraintreeError as BraintreeError_2 } from '@bigcommerce/checkout-sdk/braintree-utils';
|
|
4
4
|
import { BuyNowCartRequestBody as BuyNowCartRequestBody_2 } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
5
5
|
import { CardClassSelectors } from '@square/web-payments-sdk-types';
|
|
6
|
+
import { CardInstrument as CardInstrument_2 } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
6
7
|
import { CartSource } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
7
8
|
import { CreditCardPaymentInitializeOptions } from '@bigcommerce/checkout-sdk/credit-card-integration';
|
|
8
9
|
import { HostedFormOptions as HostedFormOptions_2 } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
@@ -6556,6 +6557,74 @@ declare interface PayPalCommerceAcceleratedCheckoutCustomerInitializeOptions {
|
|
|
6556
6557
|
styles?: PayPalCommerceConnectStylesOption;
|
|
6557
6558
|
}
|
|
6558
6559
|
|
|
6560
|
+
/**
|
|
6561
|
+
* A set of options that are required to initialize the PayPalCommerce Accelerated Checkout payment
|
|
6562
|
+
* method for presenting on the page.
|
|
6563
|
+
*
|
|
6564
|
+
*
|
|
6565
|
+
* Also, PayPalCommerce requires specific options to initialize PayPalCommerce Accelerated Checkout Credit Card Component
|
|
6566
|
+
* ```html
|
|
6567
|
+
* <!-- This is where the PayPalCommerce Credit Card Component will be inserted -->
|
|
6568
|
+
* <div id="container"></div>
|
|
6569
|
+
* ```
|
|
6570
|
+
* ```js
|
|
6571
|
+
* service.initializePayment({
|
|
6572
|
+
* methodId: 'paypalcommerceacceleratedcheckout',
|
|
6573
|
+
* paypalcommerceacceleratedcheckout: {
|
|
6574
|
+
* onInit: (renderPayPalComponentMethod) => renderPayPalComponentMethod('#container-id'),
|
|
6575
|
+
* onChange: (showPayPalConnectCardSelector) => showPayPalConnectCardSelector(),
|
|
6576
|
+
* styles: {
|
|
6577
|
+
* root: {
|
|
6578
|
+
* backgroundColorPrimary: 'transparent',
|
|
6579
|
+
* errorColor: '#C40B0B',
|
|
6580
|
+
* fontFamily: 'Montserrat, Helvetica, Arial, sans-serif',
|
|
6581
|
+
* },
|
|
6582
|
+
* input: {
|
|
6583
|
+
* borderRadius: '0.25rem',
|
|
6584
|
+
* borderColor: '#9E9E9E',
|
|
6585
|
+
* focusBorderColor: '#4496F6',
|
|
6586
|
+
* },
|
|
6587
|
+
* toggle: {
|
|
6588
|
+
* colorPrimary: '#0F005E',
|
|
6589
|
+
* colorSecondary: '#ffffff',
|
|
6590
|
+
* },
|
|
6591
|
+
* text: {
|
|
6592
|
+
* body: {
|
|
6593
|
+
* color: '#222222',
|
|
6594
|
+
* fontSize: '1rem',
|
|
6595
|
+
* },
|
|
6596
|
+
* caption: {
|
|
6597
|
+
* color: '#515151',
|
|
6598
|
+
* fontSize: '0.875rem',
|
|
6599
|
+
* },
|
|
6600
|
+
* },
|
|
6601
|
+
* branding: 'light',
|
|
6602
|
+
* },
|
|
6603
|
+
* },
|
|
6604
|
+
* });
|
|
6605
|
+
* ```
|
|
6606
|
+
*/
|
|
6607
|
+
declare interface PayPalCommerceAcceleratedCheckoutPaymentInitializeOptions {
|
|
6608
|
+
/**
|
|
6609
|
+
* Is a callback that takes the CSS selector of a container
|
|
6610
|
+
* where the PayPal Connect form should be inserted into.
|
|
6611
|
+
*/
|
|
6612
|
+
onInit?: (renderPayPalConnectCardComponent: (container: string) => void) => void;
|
|
6613
|
+
/**
|
|
6614
|
+
* Is a callback that shows PayPal stored instruments
|
|
6615
|
+
* when get triggered
|
|
6616
|
+
*/
|
|
6617
|
+
onChange?: (showPayPalConnectCardSelector: () => Promise<CardInstrument_2 | undefined>) => void;
|
|
6618
|
+
/**
|
|
6619
|
+
* Is a stylisation options for customizing PayPal Connect components
|
|
6620
|
+
*
|
|
6621
|
+
* Note: the styles for all PayPalCommerce Accelerated Checkout strategies should be the same,
|
|
6622
|
+
* because they will be provided to PayPal library only for the first strategy initialization
|
|
6623
|
+
* no matter what strategy was initialised first
|
|
6624
|
+
*/
|
|
6625
|
+
styles?: PayPalCommerceConnectStylesOption;
|
|
6626
|
+
}
|
|
6627
|
+
|
|
6559
6628
|
declare interface PayPalCommerceAlternativeMethodsButtonOptions {
|
|
6560
6629
|
/**
|
|
6561
6630
|
* Alternative payment method id what used for initialization PayPal button as funding source.
|
|
@@ -7153,7 +7222,7 @@ declare interface PayPalInstrument extends BaseAccountInstrument {
|
|
|
7153
7222
|
method: 'paypal';
|
|
7154
7223
|
}
|
|
7155
7224
|
|
|
7156
|
-
declare type PaymentInitializeOptions = BasePaymentInitializeOptions & WithAdyenV2PaymentInitializeOptions & WithAdyenV3PaymentInitializeOptions & WithApplePayPaymentInitializeOptions & WithBlueSnapDirectAPMPaymentInitializeOptions & WithBoltPaymentInitializeOptions & WithBraintreePaypalAchPaymentInitializeOptions & WithBraintreeLocalMethodsPaymentInitializeOptions & WithBraintreeAcceleratedCheckoutPaymentInitializeOptions & WithCreditCardPaymentInitializeOptions & WithGooglePayPaymentInitializeOptions & WithMolliePaymentInitializeOptions & WithPayPalCommercePaymentInitializeOptions & WithPayPalCommerceCreditPaymentInitializeOptions & WithPayPalCommerceVenmoPaymentInitializeOptions & WithPayPalCommerceAlternativeMethodsPaymentInitializeOptions & WithPayPalCommerceCreditCardsPaymentInitializeOptions & WithPayPalCommerceRatePayPaymentInitializeOptions & WithSquareV2PaymentInitializeOptions & WithStripeV3PaymentInitializeOptions;
|
|
7225
|
+
declare type PaymentInitializeOptions = BasePaymentInitializeOptions & WithAdyenV2PaymentInitializeOptions & WithAdyenV3PaymentInitializeOptions & WithApplePayPaymentInitializeOptions & WithBlueSnapDirectAPMPaymentInitializeOptions & WithBoltPaymentInitializeOptions & WithBraintreePaypalAchPaymentInitializeOptions & WithBraintreeLocalMethodsPaymentInitializeOptions & WithBraintreeAcceleratedCheckoutPaymentInitializeOptions & WithCreditCardPaymentInitializeOptions & WithGooglePayPaymentInitializeOptions & WithMolliePaymentInitializeOptions & WithPayPalCommercePaymentInitializeOptions & WithPayPalCommerceCreditPaymentInitializeOptions & WithPayPalCommerceVenmoPaymentInitializeOptions & WithPayPalCommerceAlternativeMethodsPaymentInitializeOptions & WithPayPalCommerceCreditCardsPaymentInitializeOptions & WithPayPalCommerceRatePayPaymentInitializeOptions & WithPayPalCommerceAcceleratedCheckoutPaymentInitializeOptions & WithSquareV2PaymentInitializeOptions & WithStripeV3PaymentInitializeOptions;
|
|
7157
7226
|
|
|
7158
7227
|
declare type PaymentInstrument = CardInstrument | AccountInstrument;
|
|
7159
7228
|
|
|
@@ -8482,6 +8551,10 @@ declare interface WithPayPalCommerceAcceleratedCheckoutCustomerInitializeOptions
|
|
|
8482
8551
|
paypalcommerceacceleratedcheckout?: PayPalCommerceAcceleratedCheckoutCustomerInitializeOptions;
|
|
8483
8552
|
}
|
|
8484
8553
|
|
|
8554
|
+
declare interface WithPayPalCommerceAcceleratedCheckoutPaymentInitializeOptions {
|
|
8555
|
+
paypalcommerceacceleratedcheckout?: PayPalCommerceAcceleratedCheckoutPaymentInitializeOptions;
|
|
8556
|
+
}
|
|
8557
|
+
|
|
8485
8558
|
declare interface WithPayPalCommerceAlternativeMethodsButtonInitializeOptions {
|
|
8486
8559
|
paypalcommercealternativemethods?: PayPalCommerceAlternativeMethodsButtonOptions;
|
|
8487
8560
|
}
|