Payment typing models
Sample code uses ES6 language features such as arrow functions and promises. For compatibility with IE11, code written with these features must be either transpiled using tools like Babel or refactored accordingly using callbacks.

Introduction

This page describes all generic payment models used.

Models

1
export class PaymentModuleDescriptionResponse extends DataObjectResponse {
2
constructor(public data: PaymentModuleDescription, public success: boolean) {
3
super(data, success);
4
}
5
}
6
7
export class PaymentModuleDescription {
8
constructor(
9
public desc: string
10
) {}
11
}
12
13
14
export class PaymentVerifyPinResponse extends DataObjectResponse {
15
constructor(public data: PaymentVerifyPinResponseData, public success: boolean) {
16
super(data, success);
17
}
18
}
19
20
export class PaymentVerifyPinResponseData {
21
constructor(
22
public verified: boolean
23
) {}
24
}
25
26
export class PaymentReadData {
27
constructor(
28
public applications: Array<PaymentApplication>,
29
) {}
30
}
31
32
export class PaymentApplication {
33
constructor(
34
public aid?: string,
35
public name?: string,
36
public priority?: number,
37
) {}
38
}
39
40
41
export class PaymentReadDataResponse extends DataObjectResponse {
42
constructor(public data: PaymentReadData, public success: boolean) {
43
super(data, success);
44
}
45
}
46
47
export class PaymentReadApplicationData {
48
constructor(
49
public country?: string,
50
public countryCode?: string,
51
public effectiveDate?: string,
52
public expirationDate?: string,
53
public language?: string,
54
public name?: string,
55
public pan?: string,
56
) {}
57
}
58
59
export class PaymentReadApplicationDataResponse extends DataObjectResponse {
60
constructor(public data: PaymentReadApplicationData, public success: boolean) {
61
super(data, success);
62
}
63
}
64
65
export class PaymentSignResponseData {
66
constructor(public success: boolean, public data?: string, public cardSignature?: string, public readerSignature?: string) {
67
}
68
}
69
70
export class PaymentSignResponse {
71
constructor(public data: PaymentSignResponseData, public success: boolean) {}
72
}
Copied!
Last modified 1yr ago
Copy link