@tonder.io/ionic-lite-sdk 0.0.21-beta → 0.0.22-beta
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/README.md +4 -1
- package/dist/types/requests.d.ts +2 -1
- package/package.json +1 -1
- package/src/types/requests.ts +2 -1
- package/tests/utils/mockClasses.ts +4 -2
package/README.md
CHANGED
|
@@ -210,11 +210,14 @@ const jsonResponseOrder = await liteCheckout.createOrder(
|
|
|
210
210
|
const now = new Date();
|
|
211
211
|
const dateString = now.toISOString();
|
|
212
212
|
|
|
213
|
+
const { id: customerId } = await liteCheckout.customerRegister(customerEmail);
|
|
214
|
+
|
|
213
215
|
const paymentData = {
|
|
214
216
|
business_pk: business.pk,
|
|
215
217
|
amount: total,
|
|
216
218
|
date: dateString,
|
|
217
|
-
|
|
219
|
+
order_id: jsonResponseOrder.id,
|
|
220
|
+
client_id: customerId,
|
|
218
221
|
};
|
|
219
222
|
|
|
220
223
|
const jsonResponsePayment = await liteCheckout.createPayment(
|
package/dist/types/requests.d.ts
CHANGED
|
@@ -15,7 +15,8 @@ export type CreatePaymentRequest = {
|
|
|
15
15
|
business_pk?: string | number;
|
|
16
16
|
amount: number;
|
|
17
17
|
date?: string;
|
|
18
|
-
|
|
18
|
+
order_id?: string | number;
|
|
19
|
+
client_id?: string | number;
|
|
19
20
|
};
|
|
20
21
|
export type StartCheckoutRequest = {
|
|
21
22
|
card: any;
|
package/package.json
CHANGED
package/src/types/requests.ts
CHANGED
|
@@ -235,7 +235,8 @@ export class CreatePaymentRequestClass implements CreatePaymentRequest {
|
|
|
235
235
|
business_pk!: string;
|
|
236
236
|
amount!: number;
|
|
237
237
|
date!: string;
|
|
238
|
-
|
|
238
|
+
order_id!: string;
|
|
239
|
+
client_id!: number;
|
|
239
240
|
|
|
240
241
|
get mockObject(): CreatePaymentRequest {
|
|
241
242
|
const now = new Date();
|
|
@@ -244,7 +245,8 @@ export class CreatePaymentRequestClass implements CreatePaymentRequest {
|
|
|
244
245
|
business_pk: "NNNNNNNNNN",
|
|
245
246
|
amount: 25,
|
|
246
247
|
date: dateString,
|
|
247
|
-
|
|
248
|
+
order_id: "XXXXX",
|
|
249
|
+
client_id: 1
|
|
248
250
|
};
|
|
249
251
|
}
|
|
250
252
|
}
|