@bigcommerce/checkout-sdk 1.374.7 → 1.375.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.
@@ -1187,11 +1187,6 @@ declare interface BasePaymentInitializeOptions extends PaymentRequestOptions {
1187
1187
  * They can be omitted unless you need to support PayPal Express.
1188
1188
  */
1189
1189
  paypalexpress?: PaypalExpressPaymentInitializeOptions;
1190
- /**
1191
- * The options that are required to initialize the PayPal Commerce payment method.
1192
- * They can be omitted unless you need to support PayPal Commerce.
1193
- */
1194
- paypalcommerce?: PaypalCommercePaymentInitializeOptions;
1195
1190
  /**
1196
1191
  * The options that are required to initialize the Square payment method.
1197
1192
  * They can be omitted unless you need to support Square.
@@ -6554,119 +6549,6 @@ declare enum PaypalButtonStyleSizeOption {
6554
6549
  RESPONSIVE = "responsive"
6555
6550
  }
6556
6551
 
6557
- /**
6558
- * A set of options that are required to initialize the PayPal Commerce payment
6559
- * method for presenting its PayPal button.
6560
- *
6561
- * Please note that the minimum version of checkout-sdk is 1.100
6562
- *
6563
- * Also, PayPal (also known as PayPal Commerce Platform) requires specific options to initialize the PayPal Smart Payment Button on checkout page that substitutes a standard submit button
6564
- * ```html
6565
- * <!-- This is where the PayPal button will be inserted -->
6566
- * <div id="container"></div>
6567
- * <!-- This is where the PayPal alternative payment methods fields will be inserted. -->
6568
- * <div id="apm-fields-container"></div>
6569
- * ```
6570
- *
6571
- * ```js
6572
- * service.initializePayment({
6573
- * methodId: 'paypalcommerce',
6574
- * paypalcommerce: {
6575
- * container: '#container',
6576
- * apmFieldsContainer: '#apm-fields-container',
6577
- * apmFieldsStyles: {
6578
- * base: {
6579
- * backgroundColor: 'transparent',
6580
- * },
6581
- * input: {
6582
- * backgroundColor: 'white',
6583
- * fontSize: '1rem',
6584
- * color: '#333',
6585
- * borderColor: '#d9d9d9',
6586
- * borderRadius: '4px',
6587
- * borderWidth: '1px',
6588
- * padding: '1rem',
6589
- * },
6590
- * invalid: {
6591
- * color: '#ed6a6a',
6592
- * },
6593
- * active: {
6594
- * color: '#4496f6',
6595
- * },
6596
- * },
6597
- * clientId: 'YOUR_CLIENT_ID',
6598
- * // Callback for submitting payment form that gets called when a buyer approves PayPal payment
6599
- * submitForm: () => {
6600
- * // Example function
6601
- * this.submitOrder(
6602
- * {
6603
- * payment: { methodId: 'paypalcommerce', }
6604
- * }
6605
- * );
6606
- * },
6607
- * // Callback is used to define the state of the payment form, validate if it is applicable for submit.
6608
- * onValidate: (resolve, reject) => {
6609
- * // Example function
6610
- * const isValid = this.validatePaymentForm();
6611
- * if (isValid) {
6612
- * return resolve();
6613
- * }
6614
- * return reject();
6615
- * },
6616
- * // Callback that is called right before render of a Smart Payment Button. It gets called when a buyer is eligible for use of the particular PayPal method. This callback can be used to hide the standard submit button.
6617
- * onRenderButton: () => {
6618
- * // Example function
6619
- * this.hidePaymentSubmitButton();
6620
- * }
6621
- * },
6622
- * });
6623
- * ```
6624
- */
6625
- declare interface PaypalCommercePaymentInitializeOptions {
6626
- /**
6627
- * The CSS selector of a container where the payment widget should be inserted into.
6628
- */
6629
- container: string;
6630
- /**
6631
- * The Client ID of the Paypal App
6632
- */
6633
- clientId: string;
6634
- /**
6635
- * The CSS selector of a container where the alternative payment methods fields widget should be inserted into.
6636
- * It's necessary to specify this parameter when using Alternative Payment Methods.
6637
- * Without it alternative payment methods will not work.
6638
- */
6639
- apmFieldsContainer?: string;
6640
- /**
6641
- * Object with styles to customize alternative payment methods fields.
6642
- */
6643
- apmFieldsStyles?: PaypalFieldsStyleOptions;
6644
- /**
6645
- * A callback that gets called when a buyer click on Smart Payment Button
6646
- * and should validate payment form.
6647
- *
6648
- * @param resolve - A function, that gets called if form is valid.
6649
- * @param reject - A function, that gets called if form is not valid.
6650
- *
6651
- * @returns reject() or resolve()
6652
- */
6653
- onValidate(resolve: () => void, reject: () => void): Promise<void>;
6654
- /**
6655
- * A callback for submitting payment form that gets called
6656
- * when buyer approved PayPal account.
6657
- */
6658
- submitForm(): void;
6659
- /**
6660
- * A callback right before render Smart Payment Button that gets called when
6661
- * Smart Payment Button is eligible. This callback can be used to hide the standard submit button.
6662
- */
6663
- onRenderButton?(): void;
6664
- /**
6665
- * A callback for displaying error popup. This callback requires error object as parameter.
6666
- */
6667
- onError?(error: Error): void;
6668
- }
6669
-
6670
6552
  /**
6671
6553
  * A set of options that are required to initialize the PayPal Express payment
6672
6554
  * method.
@@ -6693,29 +6575,6 @@ declare interface PaypalExpressPaymentInitializeOptions {
6693
6575
  useRedirectFlow?: boolean;
6694
6576
  }
6695
6577
 
6696
- declare interface PaypalFieldsStyleOptions {
6697
- variables?: {
6698
- fontFamily?: string;
6699
- fontSizeBase?: string;
6700
- fontSizeSm?: string;
6701
- fontSizeM?: string;
6702
- fontSizeLg?: string;
6703
- textColor?: string;
6704
- colorTextPlaceholder?: string;
6705
- colorBackground?: string;
6706
- colorInfo?: string;
6707
- colorDanger?: string;
6708
- borderRadius?: string;
6709
- borderColor?: string;
6710
- borderWidth?: string;
6711
- borderFocusColor?: string;
6712
- spacingUnit?: string;
6713
- };
6714
- rules?: {
6715
- [key: string]: any;
6716
- };
6717
- }
6718
-
6719
6578
  declare interface PaypalStyleOptions {
6720
6579
  layout?: PaypalButtonStyleLayoutOption;
6721
6580
  size?: PaypalButtonStyleSizeOption;