@tonder.io/ionic-lite-sdk 0.0.21-beta → 0.0.23-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 +5 -1
- package/package.json +1 -1
- package/src/types/requests.ts +5 -1
- package/tests/utils/mockClasses.ts +8 -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;
|
|
@@ -37,6 +38,9 @@ export type StartCheckoutRequest = {
|
|
|
37
38
|
business_id: any;
|
|
38
39
|
payment_id: any;
|
|
39
40
|
source: string;
|
|
41
|
+
browser_info?: any;
|
|
42
|
+
metadata: any;
|
|
43
|
+
currency: string;
|
|
40
44
|
};
|
|
41
45
|
export interface VaultRequest extends SkyflowRecord {
|
|
42
46
|
records: SkyflowRecord[];
|
package/package.json
CHANGED
package/src/types/requests.ts
CHANGED
|
@@ -17,7 +17,8 @@ export type CreatePaymentRequest = {
|
|
|
17
17
|
business_pk?: string | number,
|
|
18
18
|
amount: number,
|
|
19
19
|
date?: string,
|
|
20
|
-
|
|
20
|
+
order_id?: string | number
|
|
21
|
+
client_id?: string | number
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
export type StartCheckoutRequest = {
|
|
@@ -40,6 +41,9 @@ export type StartCheckoutRequest = {
|
|
|
40
41
|
business_id: any,
|
|
41
42
|
payment_id: any,
|
|
42
43
|
source: string,
|
|
44
|
+
browser_info?: any,
|
|
45
|
+
metadata: any,
|
|
46
|
+
currency: string
|
|
43
47
|
}
|
|
44
48
|
|
|
45
49
|
export interface VaultRequest extends SkyflowRecord {
|
|
@@ -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
|
}
|
|
@@ -329,6 +331,8 @@ export class StartCheckoutRequestClass implements StartCheckoutRequest {
|
|
|
329
331
|
business_id: any;
|
|
330
332
|
payment_id: any;
|
|
331
333
|
source!: string;
|
|
334
|
+
currency!: string;
|
|
335
|
+
metadata!: string;
|
|
332
336
|
|
|
333
337
|
get mockObject(): StartCheckoutRequest {
|
|
334
338
|
return {
|
|
@@ -351,6 +355,8 @@ export class StartCheckoutRequestClass implements StartCheckoutRequest {
|
|
|
351
355
|
business_id: " any",
|
|
352
356
|
payment_id: " any",
|
|
353
357
|
source: " string",
|
|
358
|
+
currency: "string",
|
|
359
|
+
metadata: "string"
|
|
354
360
|
};
|
|
355
361
|
}
|
|
356
362
|
}
|