|
1
|
|
|
package stubs |
|
2
|
|
|
|
|
3
|
|
|
// MerchantPaymentInitResponse is the response when initializing a merchant payment transaction |
|
4
|
|
|
func MerchantPaymentInitResponse() []byte { |
|
5
|
|
|
return []byte(` |
|
6
|
|
|
{ |
|
7
|
|
|
"message":"Payment request successfully initiated", |
|
8
|
|
|
"data":{ |
|
9
|
|
|
"payToken":"MP22120771FEB7B21FD2381C3786" |
|
10
|
|
|
} |
|
11
|
|
|
} |
|
12
|
|
|
`) |
|
13
|
|
|
} |
|
14
|
|
|
|
|
15
|
|
|
// MerchantPaymentPayResponseWithInsufficientFunds is the response when the user has insufficient funds |
|
16
|
|
|
func MerchantPaymentPayResponseWithInsufficientFunds() []byte { |
|
17
|
|
|
return []byte(` |
|
18
|
|
|
{ |
|
19
|
|
|
"message":"60019 :: Le solde du compte du payeur est insuffisant", |
|
20
|
|
|
"data":{ |
|
21
|
|
|
"id":48462449, |
|
22
|
|
|
"createtime":"1670442106", |
|
23
|
|
|
"subscriberMsisdn":"69XXXXXXX", |
|
24
|
|
|
"amount":100, |
|
25
|
|
|
"payToken":"MP22120771FEB7B21FD2381C3786", |
|
26
|
|
|
"txnid":null, |
|
27
|
|
|
"txnmode":"12345", |
|
28
|
|
|
"inittxnmessage":"Le solde du compte du payeur est insuffisant", |
|
29
|
|
|
"inittxnstatus":"60019", |
|
30
|
|
|
"confirmtxnstatus":null, |
|
31
|
|
|
"confirmtxnmessage":null, |
|
32
|
|
|
"status":"FAILED", |
|
33
|
|
|
"notifUrl":"https://example.com/payment-notification", |
|
34
|
|
|
"description":"Payment Description", |
|
35
|
|
|
"channelUserMsisdn":"69XXXXXXX" |
|
36
|
|
|
} |
|
37
|
|
|
} |
|
38
|
|
|
`) |
|
39
|
|
|
} |
|
40
|
|
|
|
|
41
|
|
|
// MerchantPaymentPayResponse is the response after executing a payment |
|
42
|
|
|
func MerchantPaymentPayResponse() []byte { |
|
43
|
|
|
return []byte(` |
|
44
|
|
|
{ |
|
45
|
|
|
"message":"Merchant payment successfully initiated", |
|
46
|
|
|
"data":{ |
|
47
|
|
|
"id":48463325, |
|
48
|
|
|
"createtime":"1670442691", |
|
49
|
|
|
"subscriberMsisdn":"69XXXXXXX", |
|
50
|
|
|
"amount":100, |
|
51
|
|
|
"payToken":"MP22120771FEB7B21FD2381C3786", |
|
52
|
|
|
"txnid":"MP221207.2051.B56929", |
|
53
|
|
|
"txnmode":"12345", |
|
54
|
|
|
"inittxnmessage":"Paiement e la clientele done.The devrez confirmer le paiement en saisissant son code PIN et vous recevrez alors un SMS. Merci dutiliser des services Orange Money.", |
|
55
|
|
|
"inittxnstatus":"200", |
|
56
|
|
|
"confirmtxnstatus":null, |
|
57
|
|
|
"confirmtxnmessage":null, |
|
58
|
|
|
"status":"PENDING", |
|
59
|
|
|
"notifUrl":"https://example.com/payment-notification", |
|
60
|
|
|
"description":"Payment Description", |
|
61
|
|
|
"channelUserMsisdn":"69XXXXXXX" |
|
62
|
|
|
} |
|
63
|
|
|
} |
|
64
|
|
|
`) |
|
65
|
|
|
} |
|
66
|
|
|
|
|
67
|
|
|
// MerchantPaymentPushResponse is the response after sending a push notification |
|
68
|
|
|
func MerchantPaymentPushResponse() []byte { |
|
69
|
|
|
return []byte(` |
|
70
|
|
|
{ |
|
71
|
|
|
"message":"Push sent to customer", |
|
72
|
|
|
"data":{ |
|
73
|
|
|
"id":48463325, |
|
74
|
|
|
"createtime":"1670442691", |
|
75
|
|
|
"subscriberMsisdn":"69XXXXXXX", |
|
76
|
|
|
"amount":100, |
|
77
|
|
|
"payToken":"MP22120771FEB7B21FD2381C3786", |
|
78
|
|
|
"txnid":"MP221207.2051.B56929", |
|
79
|
|
|
"txnmode":"12345", |
|
80
|
|
|
"inittxnmessage":"Paiement e la clientele done.The devrez confirmer le paiement en saisissant son code PIN et vous recevrez alors un SMS. Merci dutiliser des services Orange Money.", |
|
81
|
|
|
"inittxnstatus":"200", |
|
82
|
|
|
"confirmtxnstatus":null, |
|
83
|
|
|
"confirmtxnmessage":null, |
|
84
|
|
|
"status":"PENDING", |
|
85
|
|
|
"notifUrl":"https://example.com/payment-notification", |
|
86
|
|
|
"description":"Payment Description", |
|
87
|
|
|
"channelUserMsisdn":"69XXXXXXX" |
|
88
|
|
|
} |
|
89
|
|
|
} |
|
90
|
|
|
`) |
|
91
|
|
|
} |
|
92
|
|
|
|
|
93
|
|
|
// MerchantPaymentTransactionStatusResponse is the transaction status response for a confirmed payment |
|
94
|
|
|
func MerchantPaymentTransactionStatusResponse() []byte { |
|
95
|
|
|
return []byte(` |
|
96
|
|
|
{ |
|
97
|
|
|
"message":"Transaction retrieved successfully", |
|
98
|
|
|
"data":{ |
|
99
|
|
|
"id":48463325, |
|
100
|
|
|
"createtime":"1670442691", |
|
101
|
|
|
"subscriberMsisdn":"69XXXXXXX", |
|
102
|
|
|
"amount":100, |
|
103
|
|
|
"payToken":"MP22120771FEB7B21FD2381C3786", |
|
104
|
|
|
"txnid":"MP221207.2051.B56929", |
|
105
|
|
|
"txnmode":"12345", |
|
106
|
|
|
"inittxnmessage":"Paiement e la clientele done.The devrez confirmer le paiement en saisissant son code PIN et vous recevrez alors un SMS. Merci dutiliser des services Orange Money.", |
|
107
|
|
|
"inittxnstatus":"200", |
|
108
|
|
|
"confirmtxnstatus":"200", |
|
109
|
|
|
"confirmtxnmessage":"Successful Payment of COMPANY_NAME from 69XXXXXXX CUSTOMER_NAME. Transaction ID:MP221207.2051.B56929, Amount:100, New balance:1103.5.", |
|
110
|
|
|
"status":"SUCCESSFULL", |
|
111
|
|
|
"notifUrl":"https://example.com/payment-notification", |
|
112
|
|
|
"description":"Payment Description", |
|
113
|
|
|
"channelUserMsisdn":"69XXXXXXX" |
|
114
|
|
|
} |
|
115
|
|
|
} |
|
116
|
|
|
`) |
|
117
|
|
|
} |
|
118
|
|
|
|
|
119
|
|
|
// MerchantPaymentTransactionStatusResponseWithExpired is the transaction status response for an expired payment |
|
120
|
|
|
func MerchantPaymentTransactionStatusResponseWithExpired() []byte { |
|
121
|
|
|
return []byte(` |
|
122
|
|
|
{ |
|
123
|
|
|
"message":"Transaction retrieved successfully", |
|
124
|
|
|
"data":{ |
|
125
|
|
|
"id":48445436, |
|
126
|
|
|
"createtime":"1670436067", |
|
127
|
|
|
"subscriberMsisdn":null, |
|
128
|
|
|
"amount":null, |
|
129
|
|
|
"payToken":"MP22120771FEB7B21FD2381C3786", |
|
130
|
|
|
"txnid":null, |
|
131
|
|
|
"txnmode":null, |
|
132
|
|
|
"inittxnmessage":null, |
|
133
|
|
|
"inittxnstatus":null, |
|
134
|
|
|
"confirmtxnstatus":null, |
|
135
|
|
|
"confirmtxnmessage":null, |
|
136
|
|
|
"status":"EXPIRED", |
|
137
|
|
|
"notifUrl":null, |
|
138
|
|
|
"description":null, |
|
139
|
|
|
"channelUserMsisdn":null |
|
140
|
|
|
} |
|
141
|
|
|
} |
|
142
|
|
|
`) |
|
143
|
|
|
} |
|
144
|
|
|
|