@betterstore/sdk 0.3.38 → 0.3.40
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 +12 -0
- package/dist/index.d.mts +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +11 -8
- package/dist/index.mjs +11 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -178,7 +178,10 @@ declare class Checkout {
|
|
|
178
178
|
/**
|
|
179
179
|
* Generate payment secret for a checkout session
|
|
180
180
|
*/
|
|
181
|
-
generatePaymentSecret(checkoutId: string): Promise<
|
|
181
|
+
generatePaymentSecret(checkoutId: string): Promise<{
|
|
182
|
+
paymentSecret: string;
|
|
183
|
+
publicKey: string;
|
|
184
|
+
}>;
|
|
182
185
|
}
|
|
183
186
|
|
|
184
187
|
declare class Client {
|
|
@@ -199,7 +202,10 @@ declare class Client {
|
|
|
199
202
|
/**
|
|
200
203
|
* Generate payment secret for a checkout session
|
|
201
204
|
*/
|
|
202
|
-
generateCheckoutsPaymentSecret(clientSecret: string, checkoutId: string): Promise<
|
|
205
|
+
generateCheckoutsPaymentSecret(clientSecret: string, checkoutId: string): Promise<{
|
|
206
|
+
paymentSecret: string;
|
|
207
|
+
publicKey: string;
|
|
208
|
+
}>;
|
|
203
209
|
/**
|
|
204
210
|
* Create a new customer
|
|
205
211
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -178,7 +178,10 @@ declare class Checkout {
|
|
|
178
178
|
/**
|
|
179
179
|
* Generate payment secret for a checkout session
|
|
180
180
|
*/
|
|
181
|
-
generatePaymentSecret(checkoutId: string): Promise<
|
|
181
|
+
generatePaymentSecret(checkoutId: string): Promise<{
|
|
182
|
+
paymentSecret: string;
|
|
183
|
+
publicKey: string;
|
|
184
|
+
}>;
|
|
182
185
|
}
|
|
183
186
|
|
|
184
187
|
declare class Client {
|
|
@@ -199,7 +202,10 @@ declare class Client {
|
|
|
199
202
|
/**
|
|
200
203
|
* Generate payment secret for a checkout session
|
|
201
204
|
*/
|
|
202
|
-
generateCheckoutsPaymentSecret(clientSecret: string, checkoutId: string): Promise<
|
|
205
|
+
generateCheckoutsPaymentSecret(clientSecret: string, checkoutId: string): Promise<{
|
|
206
|
+
paymentSecret: string;
|
|
207
|
+
publicKey: string;
|
|
208
|
+
}>;
|
|
203
209
|
/**
|
|
204
210
|
* Create a new customer
|
|
205
211
|
*/
|
package/dist/index.js
CHANGED
|
@@ -179,10 +179,12 @@ var Checkout = class {
|
|
|
179
179
|
*/
|
|
180
180
|
generatePaymentSecret(checkoutId) {
|
|
181
181
|
return __async(this, null, function* () {
|
|
182
|
-
const data = yield this.apiClient.post(
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
182
|
+
const data = yield this.apiClient.post(`
|
|
183
|
+
/checkout/payment/${checkoutId}`);
|
|
184
|
+
return {
|
|
185
|
+
paymentSecret: data.paymentSecret,
|
|
186
|
+
publicKey: data.publicKey
|
|
187
|
+
};
|
|
186
188
|
});
|
|
187
189
|
}
|
|
188
190
|
};
|
|
@@ -236,10 +238,11 @@ var Client = class {
|
|
|
236
238
|
generateCheckoutsPaymentSecret(clientSecret, checkoutId) {
|
|
237
239
|
return __async(this, null, function* () {
|
|
238
240
|
const apiClient = createApiClient(clientSecret, this.proxy);
|
|
239
|
-
const data = yield apiClient.post(
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
241
|
+
const data = yield apiClient.post(`/checkout/payment/${checkoutId}`);
|
|
242
|
+
return {
|
|
243
|
+
paymentSecret: data.paymentSecret,
|
|
244
|
+
publicKey: data.publicKey
|
|
245
|
+
};
|
|
243
246
|
});
|
|
244
247
|
}
|
|
245
248
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -143,10 +143,12 @@ var Checkout = class {
|
|
|
143
143
|
*/
|
|
144
144
|
generatePaymentSecret(checkoutId) {
|
|
145
145
|
return __async(this, null, function* () {
|
|
146
|
-
const data = yield this.apiClient.post(
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
146
|
+
const data = yield this.apiClient.post(`
|
|
147
|
+
/checkout/payment/${checkoutId}`);
|
|
148
|
+
return {
|
|
149
|
+
paymentSecret: data.paymentSecret,
|
|
150
|
+
publicKey: data.publicKey
|
|
151
|
+
};
|
|
150
152
|
});
|
|
151
153
|
}
|
|
152
154
|
};
|
|
@@ -200,10 +202,11 @@ var Client = class {
|
|
|
200
202
|
generateCheckoutsPaymentSecret(clientSecret, checkoutId) {
|
|
201
203
|
return __async(this, null, function* () {
|
|
202
204
|
const apiClient = createApiClient(clientSecret, this.proxy);
|
|
203
|
-
const data = yield apiClient.post(
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
205
|
+
const data = yield apiClient.post(`/checkout/payment/${checkoutId}`);
|
|
206
|
+
return {
|
|
207
|
+
paymentSecret: data.paymentSecret,
|
|
208
|
+
publicKey: data.publicKey
|
|
209
|
+
};
|
|
207
210
|
});
|
|
208
211
|
}
|
|
209
212
|
/**
|