@bigcommerce/checkout-sdk 1.941.0 → 1.942.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/cjs/checkout-button.js +1 -1
- package/dist/cjs/checkout-sdk-essential.js +1 -1
- package/dist/cjs/checkout-sdk.js +1 -1
- package/dist/cjs/hosted-form-v2-iframe-host.js +1 -1
- package/dist/cjs/integrations/amazon-pay.js +1 -1
- package/dist/cjs/integrations/bigcommerce-payments.js +1 -1
- package/dist/cjs/integrations/braintree.js +1 -1
- package/dist/cjs/integrations/google-pay.js +1 -1
- package/dist/cjs/integrations/klarna.js +1 -1
- package/dist/cjs/integrations/paypal-commerce.js +1 -1
- package/dist/cjs/integrations/paypal-commerce.js.map +1 -1
- package/dist/cjs/integrations/paypal-express.js +1 -1
- package/dist/cjs/integrations/zip.js +1 -1
- package/dist/cjs/wallet-button.js +1 -1
- package/dist/cjs/wallet-button.js.map +1 -1
- package/dist/esm/checkout-button.js +1 -1
- package/dist/esm/checkout-sdk-essential.js +1 -1
- package/dist/esm/checkout-sdk.js +1 -1
- package/dist/esm/hosted-form-v2-iframe-host.js +1 -1
- package/dist/esm/integrations/amazon-pay.js +1 -1
- package/dist/esm/integrations/bigcommerce-payments.js +1 -1
- package/dist/esm/integrations/braintree.js +1 -1
- package/dist/esm/integrations/google-pay.js +1 -1
- package/dist/esm/integrations/klarna.js +1 -1
- package/dist/esm/integrations/paypal-commerce.js +1 -1
- package/dist/esm/integrations/paypal-commerce.js.map +1 -1
- package/dist/esm/integrations/paypal-express.js +1 -1
- package/dist/esm/integrations/zip.js +1 -1
- package/dist/esm/wallet-button.js +1 -1
- package/dist/esm/wallet-button.js.map +1 -1
- package/dist/types/integrations/paypal-commerce.d.ts +54 -15
- package/package.json +1 -1
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { AddressRequestBody } from '@bigcommerce/checkout-sdk/wallet-button-integration';
|
|
1
2
|
import { BillingAddressRequestBody } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
3
|
+
import { BillingAddressResponse } from '@bigcommerce/checkout-sdk/wallet-button-integration';
|
|
2
4
|
import { BuyNowCartRequestBody } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
3
5
|
import { CardInstrument } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
4
6
|
import { Cart } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
@@ -11,6 +13,7 @@ import { CustomerStrategy } from '@bigcommerce/checkout-sdk/payment-integration-
|
|
|
11
13
|
import { CustomerStrategyFactory } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
12
14
|
import { ExecutePaymentMethodCheckoutOptions } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
13
15
|
import { FormPoster } from '@bigcommerce/form-poster';
|
|
16
|
+
import { GraphQLRequestOptions } from '@bigcommerce/checkout-sdk/wallet-button-integration';
|
|
14
17
|
import { HostedFormOptions } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
15
18
|
import { HostedInstrument } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
16
19
|
import { LoadingIndicator } from '@bigcommerce/checkout-sdk/ui';
|
|
@@ -28,6 +31,7 @@ import { PaymentStrategyFactory } from '@bigcommerce/checkout-sdk/payment-integr
|
|
|
28
31
|
import { PaypalButtonCreationService } from '@bigcommerce/checkout-sdk/paypal-utils';
|
|
29
32
|
import { RequestOptions } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
30
33
|
import { RequestSender } from '@bigcommerce/request-sender';
|
|
34
|
+
import { Response } from '@bigcommerce/request-sender';
|
|
31
35
|
import { ScriptLoader } from '@bigcommerce/script-loader';
|
|
32
36
|
import { ShippingOption } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
33
37
|
import { VaultedInstrument } from '@bigcommerce/checkout-sdk/payment-integration-api';
|
|
@@ -1672,21 +1676,12 @@ declare class PayPalCommerceVenmoPaymentStrategy implements PaymentStrategy {
|
|
|
1672
1676
|
}
|
|
1673
1677
|
|
|
1674
1678
|
declare interface PayPalCommerceWalletInitializeOptions {
|
|
1679
|
+
cartId: string;
|
|
1680
|
+
currency: {
|
|
1681
|
+
code: string;
|
|
1682
|
+
};
|
|
1675
1683
|
initializationData: string;
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
/**
|
|
1679
|
-
* PayPal Commerce Wallet Button Strategy stub for headless wallet button integration.
|
|
1680
|
-
*
|
|
1681
|
-
* This is an empty stub class at this stage. Concrete implementation will be
|
|
1682
|
-
* added in follow-up tickets.
|
|
1683
|
-
*/
|
|
1684
|
-
declare class PayPalCommerceWalletStrategy implements CheckoutButtonStrategy {
|
|
1685
|
-
private walletButtonIntegrationService;
|
|
1686
|
-
constructor(walletButtonIntegrationService: WalletButtonIntegrationService);
|
|
1687
|
-
getWalletButtonIntegrationService(): WalletButtonIntegrationService;
|
|
1688
|
-
initialize(_options: CheckoutButtonInitializeOptions & WithPayPalCommerceWalletInitializeOptions): Promise<void>;
|
|
1689
|
-
deinitialize(): Promise<void>;
|
|
1684
|
+
clientToken: string;
|
|
1690
1685
|
}
|
|
1691
1686
|
|
|
1692
1687
|
declare interface PayPalCreateOrderCardFieldsResponse {
|
|
@@ -1935,6 +1930,50 @@ declare class PaypalCommerceRatepayPaymentStrategy implements PaymentStrategy {
|
|
|
1935
1930
|
private toggleLoadingIndicator;
|
|
1936
1931
|
}
|
|
1937
1932
|
|
|
1933
|
+
declare class PaypalCommerceWalletService {
|
|
1934
|
+
private walletButtonIntegrationService;
|
|
1935
|
+
private paypalCommerceScriptLoader;
|
|
1936
|
+
private paypalSdk?;
|
|
1937
|
+
constructor(walletButtonIntegrationService: WalletButtonIntegrationService, paypalCommerceScriptLoader: PayPalCommerceScriptLoader);
|
|
1938
|
+
/**
|
|
1939
|
+
*
|
|
1940
|
+
* PayPalSDK methods
|
|
1941
|
+
*
|
|
1942
|
+
*/
|
|
1943
|
+
loadPayPalSdk(paymentMethod: PaymentMethod<PayPalCommerceInitializationData>, providedCurrencyCode: string, initializesOnCheckoutPage?: boolean, forceLoad?: boolean): Promise<PayPalSDK | undefined>;
|
|
1944
|
+
getPayPalSdkOrThrow(): PayPalSDK;
|
|
1945
|
+
/**
|
|
1946
|
+
*
|
|
1947
|
+
* Payment submitting and tokenizing methods
|
|
1948
|
+
*
|
|
1949
|
+
*/
|
|
1950
|
+
proxyTokenizationPayment(cartId: string, orderId?: string): Promise<void>;
|
|
1951
|
+
createPaymentOrderIntent(providerId: string, cartId: string, options?: GraphQLRequestOptions): Promise<string>;
|
|
1952
|
+
addBillingAddress(cartId: string, address: AddressRequestBody, options?: GraphQLRequestOptions): Promise<Response<BillingAddressResponse>>;
|
|
1953
|
+
/**
|
|
1954
|
+
*
|
|
1955
|
+
* Buttons style methods
|
|
1956
|
+
*
|
|
1957
|
+
*/
|
|
1958
|
+
getValidButtonStyle(style?: PayPalButtonStyleOptions): PayPalButtonStyleOptions;
|
|
1959
|
+
getValidHeight(height?: number): number;
|
|
1960
|
+
/**
|
|
1961
|
+
*
|
|
1962
|
+
* Utils methods
|
|
1963
|
+
*
|
|
1964
|
+
*/
|
|
1965
|
+
removeElement(elementId?: string): void;
|
|
1966
|
+
}
|
|
1967
|
+
|
|
1968
|
+
declare class PaypalCommerceWalletStrategy implements CheckoutButtonStrategy {
|
|
1969
|
+
private paypalCommerceHeadlessWalletButtonService;
|
|
1970
|
+
constructor(paypalCommerceHeadlessWalletButtonService: PaypalCommerceWalletService);
|
|
1971
|
+
initialize(options: CheckoutButtonInitializeOptions & WithPayPalCommerceWalletInitializeOptions): Promise<void>;
|
|
1972
|
+
deinitialize(): Promise<void>;
|
|
1973
|
+
private renderButton;
|
|
1974
|
+
private mapOrderDetailsToBillingAddress;
|
|
1975
|
+
}
|
|
1976
|
+
|
|
1938
1977
|
declare interface ShippingAddressChangeCallbackPayload {
|
|
1939
1978
|
orderId: string;
|
|
1940
1979
|
shippingAddress: PayPalAddress;
|
|
@@ -2091,6 +2130,6 @@ export declare const createPayPalCommerceVenmoPaymentStrategy: import("@bigcomme
|
|
|
2091
2130
|
id: string;
|
|
2092
2131
|
}>;
|
|
2093
2132
|
|
|
2094
|
-
export declare const createPayPalCommerceWalletStrategy: import("@bigcommerce/checkout-sdk/payment-integration-api").ResolvableModule<WalletPaymentButtonStrategyFactory<
|
|
2133
|
+
export declare const createPayPalCommerceWalletStrategy: import("@bigcommerce/checkout-sdk/payment-integration-api").ResolvableModule<WalletPaymentButtonStrategyFactory<PaypalCommerceWalletStrategy>, {
|
|
2095
2134
|
id: string;
|
|
2096
2135
|
}>;
|