stubs.VerifyInProcess   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nop 0
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
package stubs
2
3
// PingOk returns the api response to the `/ping` endpoint
4
func PingOk() []byte {
5
	return []byte(`
6
{
7
    "time": "2022-10-08T14:31:10+00:00",
8
    "version": "2.2.0",
9
    "nonce": "95cdf110-4614-4d95-b6c2-f14fe01c4995",
10
    "key": "6B352110-4716-11ED-963F-0800200C9A66"
11
}
12
`)
13
}
14
15
// PingError returns an error api response to the `/ping` endpoint
16
func PingError() []byte {
17
	return []byte(`
18
{
19
    "devMsg": "Access token invalid",
20
    "usrMsg": "Authentication error when connecting to service",
21
    "respCode": 4009,
22
    "link": "http:\\/\\/support.maviance.com\\/"
23
}
24
`)
25
}
26
27
// CollectOk returns the api response to the `/collectstd` endpoint
28
func CollectOk() []byte {
29
	return []byte(`
30
{
31
   "ptn":"99999166542651400095315364801168",
32
   "timestamp":"2022-10-10T18:28:34+00:00",
33
   "agentBalance":"247000.00",
34
   "receiptNumber":"999992624813740205",
35
   "veriCode":"f20873",
36
   "priceLocalCur":"1000.00",
37
   "priceSystemCur":"1000.00",
38
   "localCur":"XAF",
39
   "systemCur":"XAF",
40
   "trid": "999992624813740205",
41
   "pin":null,
42
   "status":"SUCCESS",
43
   "payItemDescr":null,
44
   "payItemId":"S-112-951-CMORANGE-20062-CM_ORANGE_VTU_CUSTOM-1"
45
}
46
`)
47
}
48
49
// CollectPending returns the api response to the `/collectstd` endpoint for a pending transaction
50
func CollectPending() []byte {
51
	return []byte(`
52
{
53
   "ptn":"99999166542651400095315364801168",
54
   "timestamp":"2022-10-10T18:28:34+00:00",
55
   "agentBalance":"247000.00",
56
   "receiptNumber":"999992624813740205",
57
   "veriCode":"f20873",
58
   "priceLocalCur":"1000.00",
59
   "priceSystemCur":"1000.00",
60
   "localCur":"XAF",
61
   "systemCur":"XAF",
62
   "trid": "999992624813740205",
63
   "pin":null,
64
   "status":"PENDING",
65
   "payItemDescr":null,
66
   "payItemId":"S-112-951-CMORANGE-20062-CM_ORANGE_VTU_CUSTOM-1"
67
}
68
`)
69
}
70
71
// VerifyOk returns the api response to the `/verifytx` endpoint
72
func VerifyOk() []byte {
73
	return []byte(`
74
[
75
	{
76
	   "ptn":"99999166542651400095315364801168",
77
	   "timestamp":"2022-10-10T18:28:34+00:00",
78
	   "agentBalance":"247000.00",
79
	   "receiptNumber":"999992624813740205",
80
	   "veriCode":"f20873",
81
	   "priceLocalCur":"1000.00",
82
	   "priceSystemCur":"1000.00",
83
	   "localCur":"XAF",
84
	   "systemCur":"XAF",
85
	   "trid": "999992624813740205",
86
	   "pin":null,
87
	   "status":"SUCCESS",
88
	   "payItemDescr":null,
89
	   "payItemId":"S-112-951-CMORANGE-20062-CM_ORANGE_VTU_CUSTOM-1"
90
	}
91
]
92
`)
93
}
94
95
// VerifyInProcess returns the api response to the `/verifytx` endpoint for an in process transaction
96
func VerifyInProcess() []byte {
97
	return []byte(`
98
[
99
	{
100
	   "ptn":"99999166542651400095315364801168",
101
	   "timestamp":"2022-10-10T18:28:34+00:00",
102
	   "agentBalance":"247000.00",
103
	   "receiptNumber":"999992624813740205",
104
	   "veriCode":"f20873",
105
	   "priceLocalCur":"1000.00",
106
	   "priceSystemCur":"1000.00",
107
	   "localCur":"XAF",
108
	   "systemCur":"XAF",
109
	   "trid": "999992624813740205",
110
	   "pin":null,
111
	   "status":"INPROCESS",
112
	   "payItemDescr":null,
113
	   "payItemId":"S-112-951-CMORANGE-20062-CM_ORANGE_VTU_CUSTOM-1"
114
	}
115
]
116
`)
117
}
118
119
// QuoteOk returns the api response to the `/quotestd` endpoint
120
func QuoteOk() []byte {
121
	return []byte(`
122
{
123
   "quoteId":"15380e55-6227-4a25-8e1f-23c8735ce242",
124
   "expiresAt":"2022-10-15T13:32:53+00:00",
125
   "payItemId":"S-112-951-CMORANGE-20062-CM_ORANGE_VTU_CUSTOM-1",
126
   "amountLocalCur":"100.00",
127
   "priceLocalCur":"100",
128
   "priceSystemCur":"100",
129
   "localCur":"XAF",
130
   "systemCur":"XAF",
131
   "promotion":null
132
}
133
`)
134
}
135
136
// VerifyEmpty returns the api response to the `/verifytx` of an empty transaction
137
func VerifyEmpty() []byte {
138
	return []byte(`[]`)
139
}
140