@bigcommerce/checkout-sdk 1.274.0 → 1.275.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/CHANGELOG.md +7 -0
- package/dist/checkout-button.d.ts +54 -10
- 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 +54 -10
- 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 +12 -1
- package/docs/enums/AmazonPayV2ButtonColor.md +29 -0
- package/docs/interfaces/AmazonPayV2ButtonConfig.md +80 -0
- package/docs/interfaces/AmazonPayV2ButtonParams.md +45 -1
- package/docs/interfaces/AmazonPayV2CheckoutSessionConfig.md +36 -0
- package/docs/interfaces/AmazonPayV2NewButtonParams.md +125 -0
- package/docs/interfaces/BaseCheckoutButtonInitializeOptions.md +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [1.275.0](https://github.com/bigcommerce/checkout-sdk-js/compare/v1.274.0...v1.275.0) (2022-08-09)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **payment:** INT-6128 AmazonPayV2: Introduce the new API V2 config ([#1502](https://github.com/bigcommerce/checkout-sdk-js/issues/1502)) ([11bbe8b](https://github.com/bigcommerce/checkout-sdk-js/commit/11bbe8b4ec82d063cc13d9fdf3d8f59c282b7109))
|
|
11
|
+
|
|
5
12
|
## [1.274.0](https://github.com/bigcommerce/checkout-sdk-js/compare/v1.273.0...v1.274.0) (2022-08-08)
|
|
6
13
|
|
|
7
14
|
|
|
@@ -24,20 +24,17 @@ declare interface AddressRequestBody {
|
|
|
24
24
|
}>;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
declare enum AmazonPayV2ButtonColor {
|
|
28
|
+
Gold = "Gold",
|
|
29
|
+
LightGray = "LightGray",
|
|
30
|
+
DarkGray = "DarkGray"
|
|
31
|
+
}
|
|
31
32
|
|
|
32
|
-
declare interface
|
|
33
|
+
declare interface AmazonPayV2ButtonConfig {
|
|
33
34
|
/**
|
|
34
35
|
* Amazon Pay merchant account identifier.
|
|
35
36
|
*/
|
|
36
37
|
merchantId: string;
|
|
37
|
-
/**
|
|
38
|
-
* Configuration for calling the endpoint to Create Checkout Session.
|
|
39
|
-
*/
|
|
40
|
-
createCheckoutSession: AmazonPayV2CheckoutSession;
|
|
41
38
|
/**
|
|
42
39
|
* Placement of the Amazon Pay button on your website.
|
|
43
40
|
*/
|
|
@@ -50,16 +47,35 @@ declare interface AmazonPayV2ButtonParams {
|
|
|
50
47
|
* Product type selected for checkout. Default is 'PayAndShip'.
|
|
51
48
|
*/
|
|
52
49
|
productType?: AmazonPayV2PayOptions;
|
|
50
|
+
/**
|
|
51
|
+
* Color of the Amazon Pay button.
|
|
52
|
+
*/
|
|
53
|
+
buttonColor?: AmazonPayV2ButtonColor;
|
|
53
54
|
/**
|
|
54
55
|
* Language used to render the button and text on Amazon Pay hosted pages.
|
|
55
56
|
*/
|
|
56
57
|
checkoutLanguage?: AmazonPayV2CheckoutLanguage;
|
|
57
58
|
/**
|
|
58
|
-
* Sets button to Sandbox environment.
|
|
59
|
+
* Sets button to Sandbox environment. You do not have to set this parameter
|
|
60
|
+
* if your `publicKeyId` has an environment prefix. Default is false.
|
|
59
61
|
*/
|
|
60
62
|
sandbox?: boolean;
|
|
61
63
|
}
|
|
62
64
|
|
|
65
|
+
/**
|
|
66
|
+
* The required config to render the AmazonPayV2 buttton.
|
|
67
|
+
*/
|
|
68
|
+
declare type AmazonPayV2ButtonInitializeOptions = AmazonPayV2ButtonParameters;
|
|
69
|
+
|
|
70
|
+
declare type AmazonPayV2ButtonParameters = AmazonPayV2ButtonParams | AmazonPayV2NewButtonParams;
|
|
71
|
+
|
|
72
|
+
declare interface AmazonPayV2ButtonParams extends AmazonPayV2ButtonConfig {
|
|
73
|
+
/**
|
|
74
|
+
* Configuration for calling the endpoint to Create Checkout Session.
|
|
75
|
+
*/
|
|
76
|
+
createCheckoutSession: AmazonPayV2CheckoutSession;
|
|
77
|
+
}
|
|
78
|
+
|
|
63
79
|
declare enum AmazonPayV2CheckoutLanguage {
|
|
64
80
|
en_US = "en_US",
|
|
65
81
|
en_GB = "en_GB",
|
|
@@ -85,6 +101,22 @@ declare interface AmazonPayV2CheckoutSession {
|
|
|
85
101
|
extractAmazonCheckoutSessionId?: string;
|
|
86
102
|
}
|
|
87
103
|
|
|
104
|
+
declare interface AmazonPayV2CheckoutSessionConfig {
|
|
105
|
+
/**
|
|
106
|
+
* A payload that Amazon Pay will use to create a Checkout Session object.
|
|
107
|
+
*/
|
|
108
|
+
payloadJSON: string;
|
|
109
|
+
/**
|
|
110
|
+
* Payload's signature.
|
|
111
|
+
*/
|
|
112
|
+
signature: string;
|
|
113
|
+
/**
|
|
114
|
+
* Credential provided by Amazon Pay. You do not have to set this parameter
|
|
115
|
+
* if your `publicKeyId` has an environment prefix.
|
|
116
|
+
*/
|
|
117
|
+
publicKeyId?: string;
|
|
118
|
+
}
|
|
119
|
+
|
|
88
120
|
declare enum AmazonPayV2LedgerCurrency {
|
|
89
121
|
USD = "USD",
|
|
90
122
|
EUR = "EUR",
|
|
@@ -92,6 +124,18 @@ declare enum AmazonPayV2LedgerCurrency {
|
|
|
92
124
|
JPY = "JPY"
|
|
93
125
|
}
|
|
94
126
|
|
|
127
|
+
declare interface AmazonPayV2NewButtonParams extends AmazonPayV2ButtonConfig {
|
|
128
|
+
/**
|
|
129
|
+
* Credential provided by Amazon Pay. You must also set the `sandbox`
|
|
130
|
+
* parameter if your `publicKeyId` does not have an environment prefix.
|
|
131
|
+
*/
|
|
132
|
+
publicKeyId?: string;
|
|
133
|
+
/**
|
|
134
|
+
* Create Checkout Session configuration.
|
|
135
|
+
*/
|
|
136
|
+
createCheckoutSessionConfig: AmazonPayV2CheckoutSessionConfig;
|
|
137
|
+
}
|
|
138
|
+
|
|
95
139
|
declare enum AmazonPayV2PayOptions {
|
|
96
140
|
/** Select this product type if you need the buyer's shipping details. */
|
|
97
141
|
PayAndShip = "PayAndShip",
|