13
13
*/
14
14
class Response extends \Omnipay \Common \Message \AbstractResponse
15
15
{
16
-
17
16
protected $ liveEndpoint = 'https://direct.ukash.com/ ' ;
18
17
protected $ testEndpoint = 'https://direct.staging.ukash.com/ ' ;
19
18
20
19
/**
21
20
* Constructor
22
21
*
23
- * @param object $request request
24
- * @param string $data data
22
+ * @param object $request request
23
+ * @param string $data data
25
24
*/
26
25
public function __construct ($ request , $ data )
27
26
{
@@ -75,6 +74,10 @@ public function getMessage()
75
74
return 'SecurityToken does not match. Please verify your settings ' ;
76
75
}
77
76
77
+ if (isset ($ this ->data ->TransactionDesc )) {
78
+ return (string ) $ this ->data ->TransactionDesc ;
79
+ }
80
+
78
81
return '' ;
79
82
}
80
83
@@ -105,7 +108,8 @@ public function getCurrency()
105
108
* Transaction status/return code.
106
109
* It determines whether the voucher was successfully redeemed or not.
107
110
* A “0” means that the voucher was successfully redeemed.
108
- * Any other code will reflect an unsuccessful redemption due to an invalid voucher or an error.
111
+ * Any other code will reflect an unsuccessful redemption due to an
112
+ * invalid voucher or an error.
109
113
*
110
114
* 0 => Accepted
111
115
* Redemption successful
@@ -114,7 +118,8 @@ public function getCurrency()
114
118
* Redemption unsuccessful
115
119
*
116
120
* 99 => Failed
117
- * An error occurred during the processing of the transaction hence the system could not successfully complete the redemption of the voucher.
121
+ * An error occurred during the processing of the transaction hence the system
122
+ * could not successfully complete the redemption of the voucher.
118
123
* Will also be returned if an invalid voucher number was supplied.
119
124
*
120
125
* @return string transaction code
@@ -168,5 +173,4 @@ protected function getEndpoint()
168
173
{
169
174
return $ this ->getRequest ()->getTestMode () ? $ this ->testEndpoint : $ this ->liveEndpoint ;
170
175
}
171
-
172
176
}
0 commit comments