Skip to content

Commit 233bddb

Browse files
committed
Add "TransactionDesc"
1 parent a921395 commit 233bddb

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/Omnipay/Ukash/Message/Response.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,14 @@
1313
*/
1414
class Response extends \Omnipay\Common\Message\AbstractResponse
1515
{
16-
1716
protected $liveEndpoint = 'https://direct.ukash.com/';
1817
protected $testEndpoint = 'https://direct.staging.ukash.com/';
1918

2019
/**
2120
* Constructor
2221
*
23-
* @param object $request request
24-
* @param string $data data
22+
* @param object $request request
23+
* @param string $data data
2524
*/
2625
public function __construct($request, $data)
2726
{
@@ -75,6 +74,10 @@ public function getMessage()
7574
return 'SecurityToken does not match. Please verify your settings';
7675
}
7776

77+
if (isset($this->data->TransactionDesc)) {
78+
return (string) $this->data->TransactionDesc;
79+
}
80+
7881
return '';
7982
}
8083

@@ -105,7 +108,8 @@ public function getCurrency()
105108
* Transaction status/return code.
106109
* It determines whether the voucher was successfully redeemed or not.
107110
* 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.
109113
*
110114
* 0 => Accepted
111115
* Redemption successful
@@ -114,7 +118,8 @@ public function getCurrency()
114118
* Redemption unsuccessful
115119
*
116120
* 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.
118123
* Will also be returned if an invalid voucher number was supplied.
119124
*
120125
* @return string transaction code
@@ -168,5 +173,4 @@ protected function getEndpoint()
168173
{
169174
return $this->getRequest()->getTestMode() ? $this->testEndpoint : $this->liveEndpoint;
170175
}
171-
172176
}

0 commit comments

Comments
 (0)