@bigcommerce/checkout-sdk 1.431.0 → 1.432.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 +85 -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 +13 -1
- package/docs/enums/GooglePayKey.md +87 -0
- package/docs/interfaces/GooglePayPaymentInitializeOptions_2.md +93 -0
- package/package.json +1 -1
package/docs/README.md
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
- [EmbeddedCheckoutEventType](enums/EmbeddedCheckoutEventType.md)
|
|
23
23
|
- [ExtensionCommandType](enums/ExtensionCommandType.md)
|
|
24
24
|
- [ExtensionRegion](enums/ExtensionRegion.md)
|
|
25
|
+
- [GooglePayKey](enums/GooglePayKey.md)
|
|
25
26
|
- [HostedFieldType](enums/HostedFieldType.md)
|
|
26
27
|
- [HostedInputEventType](enums/HostedInputEventType.md)
|
|
27
28
|
- [IconStyle](enums/IconStyle.md)
|
|
@@ -240,6 +241,7 @@
|
|
|
240
241
|
- [GooglePayBuyNowInitializeOptions](interfaces/GooglePayBuyNowInitializeOptions.md)
|
|
241
242
|
- [GooglePayCustomerInitializeOptions](interfaces/GooglePayCustomerInitializeOptions.md)
|
|
242
243
|
- [GooglePayPaymentInitializeOptions](interfaces/GooglePayPaymentInitializeOptions.md)
|
|
244
|
+
- [GooglePayPaymentInitializeOptions_2](interfaces/GooglePayPaymentInitializeOptions_2.md)
|
|
243
245
|
- [HostedCardFieldOptions](interfaces/HostedCardFieldOptions.md)
|
|
244
246
|
- [HostedCardFieldOptionsMap](interfaces/HostedCardFieldOptionsMap.md)
|
|
245
247
|
- [HostedFieldStylesMap](interfaces/HostedFieldStylesMap.md)
|
|
@@ -469,6 +471,7 @@
|
|
|
469
471
|
- [PaymentProviderCustomer](README.md#paymentprovidercustomer)
|
|
470
472
|
- [StripeElementOptions](README.md#stripeelementoptions)
|
|
471
473
|
- [StripeEventType](README.md#stripeeventtype)
|
|
474
|
+
- [WithGooglePayPaymentInitializeOptions](README.md#withgooglepaypaymentinitializeoptions)
|
|
472
475
|
|
|
473
476
|
### Functions
|
|
474
477
|
|
|
@@ -740,7 +743,7 @@ ___
|
|
|
740
743
|
|
|
741
744
|
### PaymentInitializeOptions
|
|
742
745
|
|
|
743
|
-
Ƭ **PaymentInitializeOptions**: [`BasePaymentInitializeOptions`](interfaces/BasePaymentInitializeOptions.md) & [`WithAdyenV2PaymentInitializeOptions`](interfaces/WithAdyenV2PaymentInitializeOptions.md) & [`WithAdyenV3PaymentInitializeOptions`](interfaces/WithAdyenV3PaymentInitializeOptions.md) & [`WithApplePayPaymentInitializeOptions`](interfaces/WithApplePayPaymentInitializeOptions.md) & [`WithBlueSnapDirectAPMPaymentInitializeOptions`](interfaces/WithBlueSnapDirectAPMPaymentInitializeOptions.md) & [`WithBoltPaymentInitializeOptions`](interfaces/WithBoltPaymentInitializeOptions.md) & [`WithBraintreePaypalAchPaymentInitializeOptions`](interfaces/WithBraintreePaypalAchPaymentInitializeOptions.md) & [`WithBraintreeLocalMethodsPaymentInitializeOptions`](interfaces/WithBraintreeLocalMethodsPaymentInitializeOptions.md) & [`WithBraintreeAcceleratedCheckoutPaymentInitializeOptions`](interfaces/WithBraintreeAcceleratedCheckoutPaymentInitializeOptions.md) & [`WithCreditCardPaymentInitializeOptions`](interfaces/WithCreditCardPaymentInitializeOptions.md) & [`WithPayPalCommercePaymentInitializeOptions`](interfaces/WithPayPalCommercePaymentInitializeOptions.md) & [`WithPayPalCommerceCreditPaymentInitializeOptions`](interfaces/WithPayPalCommerceCreditPaymentInitializeOptions.md) & [`WithPayPalCommerceVenmoPaymentInitializeOptions`](interfaces/WithPayPalCommerceVenmoPaymentInitializeOptions.md) & [`WithPayPalCommerceAlternativeMethodsPaymentInitializeOptions`](interfaces/WithPayPalCommerceAlternativeMethodsPaymentInitializeOptions.md) & [`WithPayPalCommerceCreditCardsPaymentInitializeOptions`](interfaces/WithPayPalCommerceCreditCardsPaymentInitializeOptions.md) & [`WithSquareV2PaymentInitializeOptions`](interfaces/WithSquareV2PaymentInitializeOptions.md)
|
|
746
|
+
Ƭ **PaymentInitializeOptions**: [`BasePaymentInitializeOptions`](interfaces/BasePaymentInitializeOptions.md) & [`WithAdyenV2PaymentInitializeOptions`](interfaces/WithAdyenV2PaymentInitializeOptions.md) & [`WithAdyenV3PaymentInitializeOptions`](interfaces/WithAdyenV3PaymentInitializeOptions.md) & [`WithApplePayPaymentInitializeOptions`](interfaces/WithApplePayPaymentInitializeOptions.md) & [`WithBlueSnapDirectAPMPaymentInitializeOptions`](interfaces/WithBlueSnapDirectAPMPaymentInitializeOptions.md) & [`WithBoltPaymentInitializeOptions`](interfaces/WithBoltPaymentInitializeOptions.md) & [`WithBraintreePaypalAchPaymentInitializeOptions`](interfaces/WithBraintreePaypalAchPaymentInitializeOptions.md) & [`WithBraintreeLocalMethodsPaymentInitializeOptions`](interfaces/WithBraintreeLocalMethodsPaymentInitializeOptions.md) & [`WithBraintreeAcceleratedCheckoutPaymentInitializeOptions`](interfaces/WithBraintreeAcceleratedCheckoutPaymentInitializeOptions.md) & [`WithCreditCardPaymentInitializeOptions`](interfaces/WithCreditCardPaymentInitializeOptions.md) & [`WithGooglePayPaymentInitializeOptions`](README.md#withgooglepaypaymentinitializeoptions) & [`WithPayPalCommercePaymentInitializeOptions`](interfaces/WithPayPalCommercePaymentInitializeOptions.md) & [`WithPayPalCommerceCreditPaymentInitializeOptions`](interfaces/WithPayPalCommerceCreditPaymentInitializeOptions.md) & [`WithPayPalCommerceVenmoPaymentInitializeOptions`](interfaces/WithPayPalCommerceVenmoPaymentInitializeOptions.md) & [`WithPayPalCommerceAlternativeMethodsPaymentInitializeOptions`](interfaces/WithPayPalCommerceAlternativeMethodsPaymentInitializeOptions.md) & [`WithPayPalCommerceCreditCardsPaymentInitializeOptions`](interfaces/WithPayPalCommerceCreditCardsPaymentInitializeOptions.md) & [`WithSquareV2PaymentInitializeOptions`](interfaces/WithSquareV2PaymentInitializeOptions.md)
|
|
744
747
|
|
|
745
748
|
___
|
|
746
749
|
|
|
@@ -766,6 +769,15 @@ ___
|
|
|
766
769
|
|
|
767
770
|
Ƭ **StripeEventType**: [`StripeShippingEvent`](interfaces/StripeShippingEvent.md) \| [`StripeCustomerEvent`](interfaces/StripeCustomerEvent.md)
|
|
768
771
|
|
|
772
|
+
___
|
|
773
|
+
|
|
774
|
+
### WithGooglePayPaymentInitializeOptions
|
|
775
|
+
|
|
776
|
+
Ƭ **WithGooglePayPaymentInitializeOptions**: { [k in GooglePayKey]?: GooglePayPaymentInitializeOptions\_2 }
|
|
777
|
+
|
|
778
|
+
The options that are required to initialize the GooglePay payment method.
|
|
779
|
+
They can be omitted unless you need to support GooglePay.
|
|
780
|
+
|
|
769
781
|
## Functions
|
|
770
782
|
|
|
771
783
|
### createBodlService
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
[@bigcommerce/checkout-sdk](../README.md) / GooglePayKey
|
|
2
|
+
|
|
3
|
+
# Enumeration: GooglePayKey
|
|
4
|
+
|
|
5
|
+
The recognized keys to pass the initialization options for Google Pay.
|
|
6
|
+
|
|
7
|
+
## Table of contents
|
|
8
|
+
|
|
9
|
+
### Enumeration Members
|
|
10
|
+
|
|
11
|
+
- [ADYEN_V2](GooglePayKey.md#adyen_v2)
|
|
12
|
+
- [ADYEN_V3](GooglePayKey.md#adyen_v3)
|
|
13
|
+
- [AUTHORIZE_NET](GooglePayKey.md#authorize_net)
|
|
14
|
+
- [BNZ](GooglePayKey.md#bnz)
|
|
15
|
+
- [BRAINTREE](GooglePayKey.md#braintree)
|
|
16
|
+
- [CHECKOUT_COM](GooglePayKey.md#checkout_com)
|
|
17
|
+
- [CYBERSOURCE_V2](GooglePayKey.md#cybersource_v2)
|
|
18
|
+
- [ORBITAL](GooglePayKey.md#orbital)
|
|
19
|
+
- [STRIPE](GooglePayKey.md#stripe)
|
|
20
|
+
- [STRIPE_UPE](GooglePayKey.md#stripe_upe)
|
|
21
|
+
- [WORLDPAY_ACCESS](GooglePayKey.md#worldpay_access)
|
|
22
|
+
|
|
23
|
+
## Enumeration Members
|
|
24
|
+
|
|
25
|
+
### ADYEN\_V2
|
|
26
|
+
|
|
27
|
+
• **ADYEN\_V2**
|
|
28
|
+
|
|
29
|
+
___
|
|
30
|
+
|
|
31
|
+
### ADYEN\_V3
|
|
32
|
+
|
|
33
|
+
• **ADYEN\_V3**
|
|
34
|
+
|
|
35
|
+
___
|
|
36
|
+
|
|
37
|
+
### AUTHORIZE\_NET
|
|
38
|
+
|
|
39
|
+
• **AUTHORIZE\_NET**
|
|
40
|
+
|
|
41
|
+
___
|
|
42
|
+
|
|
43
|
+
### BNZ
|
|
44
|
+
|
|
45
|
+
• **BNZ**
|
|
46
|
+
|
|
47
|
+
___
|
|
48
|
+
|
|
49
|
+
### BRAINTREE
|
|
50
|
+
|
|
51
|
+
• **BRAINTREE**
|
|
52
|
+
|
|
53
|
+
___
|
|
54
|
+
|
|
55
|
+
### CHECKOUT\_COM
|
|
56
|
+
|
|
57
|
+
• **CHECKOUT\_COM**
|
|
58
|
+
|
|
59
|
+
___
|
|
60
|
+
|
|
61
|
+
### CYBERSOURCE\_V2
|
|
62
|
+
|
|
63
|
+
• **CYBERSOURCE\_V2**
|
|
64
|
+
|
|
65
|
+
___
|
|
66
|
+
|
|
67
|
+
### ORBITAL
|
|
68
|
+
|
|
69
|
+
• **ORBITAL**
|
|
70
|
+
|
|
71
|
+
___
|
|
72
|
+
|
|
73
|
+
### STRIPE
|
|
74
|
+
|
|
75
|
+
• **STRIPE**
|
|
76
|
+
|
|
77
|
+
___
|
|
78
|
+
|
|
79
|
+
### STRIPE\_UPE
|
|
80
|
+
|
|
81
|
+
• **STRIPE\_UPE**
|
|
82
|
+
|
|
83
|
+
___
|
|
84
|
+
|
|
85
|
+
### WORLDPAY\_ACCESS
|
|
86
|
+
|
|
87
|
+
• **WORLDPAY\_ACCESS**
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
[@bigcommerce/checkout-sdk](../README.md) / GooglePayPaymentInitializeOptions_2
|
|
2
|
+
|
|
3
|
+
# Interface: GooglePayPaymentInitializeOptions\_2
|
|
4
|
+
|
|
5
|
+
A set of options that are required to initialize the GooglePay payment method
|
|
6
|
+
|
|
7
|
+
If the customer chooses to pay with GooglePay, they will be asked to
|
|
8
|
+
enter their payment details via a modal. You can hook into events emitted by
|
|
9
|
+
the modal by providing the callbacks listed below.
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<!-- This is where the GooglePay button will be inserted -->
|
|
13
|
+
<div id="wallet-button"></div>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
```js
|
|
17
|
+
service.initializePayment({
|
|
18
|
+
// Using GooglePay provided by Braintree as an example
|
|
19
|
+
methodId: 'googlepaybraintree',
|
|
20
|
+
googlepaybraintree: {
|
|
21
|
+
walletButton: 'wallet-button'
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Additional event callbacks can be registered.
|
|
27
|
+
|
|
28
|
+
```js
|
|
29
|
+
service.initializePayment({
|
|
30
|
+
methodId: 'googlepaybraintree',
|
|
31
|
+
googlepaybraintree: {
|
|
32
|
+
walletButton: 'wallet-button',
|
|
33
|
+
onError(error) {
|
|
34
|
+
console.log(error);
|
|
35
|
+
},
|
|
36
|
+
onPaymentSelect() {
|
|
37
|
+
console.log('Selected');
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Table of contents
|
|
44
|
+
|
|
45
|
+
### Properties
|
|
46
|
+
|
|
47
|
+
- [walletButton](GooglePayPaymentInitializeOptions_2.md#walletbutton)
|
|
48
|
+
|
|
49
|
+
### Methods
|
|
50
|
+
|
|
51
|
+
- [onError](GooglePayPaymentInitializeOptions_2.md#onerror)
|
|
52
|
+
- [onPaymentSelect](GooglePayPaymentInitializeOptions_2.md#onpaymentselect)
|
|
53
|
+
|
|
54
|
+
## Properties
|
|
55
|
+
|
|
56
|
+
### walletButton
|
|
57
|
+
|
|
58
|
+
• `Optional` **walletButton**: `string`
|
|
59
|
+
|
|
60
|
+
This walletButton is used to set an event listener, provide an element ID if you want
|
|
61
|
+
users to be able to launch the GooglePay wallet modal by clicking on a button.
|
|
62
|
+
It should be an HTML element.
|
|
63
|
+
|
|
64
|
+
## Methods
|
|
65
|
+
|
|
66
|
+
### onError
|
|
67
|
+
|
|
68
|
+
▸ `Optional` **onError**(`error`): `void`
|
|
69
|
+
|
|
70
|
+
A callback that gets called when GooglePay fails to initialize or
|
|
71
|
+
selects a payment option.
|
|
72
|
+
|
|
73
|
+
#### Parameters
|
|
74
|
+
|
|
75
|
+
| Name | Type | Description |
|
|
76
|
+
| :------ | :------ | :------ |
|
|
77
|
+
| `error` | `Error` | The error object describing the failure. |
|
|
78
|
+
|
|
79
|
+
#### Returns
|
|
80
|
+
|
|
81
|
+
`void`
|
|
82
|
+
|
|
83
|
+
___
|
|
84
|
+
|
|
85
|
+
### onPaymentSelect
|
|
86
|
+
|
|
87
|
+
▸ `Optional` **onPaymentSelect**(): `void`
|
|
88
|
+
|
|
89
|
+
A callback that gets called when the customer selects a payment option.
|
|
90
|
+
|
|
91
|
+
#### Returns
|
|
92
|
+
|
|
93
|
+
`void`
|