@betterstore/sdk 0.3.37 → 0.3.39
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 +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +6 -4
- package/dist/index.mjs +6 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -153,7 +153,7 @@ interface CheckoutSession {
|
|
|
153
153
|
};
|
|
154
154
|
}
|
|
155
155
|
type RecursiveRecord = {
|
|
156
|
-
[key: string]:
|
|
156
|
+
[key: string]: any;
|
|
157
157
|
};
|
|
158
158
|
|
|
159
159
|
declare class Checkout {
|
|
@@ -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 {
|
package/dist/index.d.ts
CHANGED
|
@@ -153,7 +153,7 @@ interface CheckoutSession {
|
|
|
153
153
|
};
|
|
154
154
|
}
|
|
155
155
|
type RecursiveRecord = {
|
|
156
|
-
[key: string]:
|
|
156
|
+
[key: string]: any;
|
|
157
157
|
};
|
|
158
158
|
|
|
159
159
|
declare class Checkout {
|
|
@@ -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 {
|
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
|
};
|
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
|
};
|