Skip to content

Commit abbc004

Browse files
committed
Method adaptation
1 parent 3680dbc commit abbc004

File tree

2 files changed

+2
-70
lines changed

2 files changed

+2
-70
lines changed

src/Omnipay/Ukash/Message/FetchTransactionResponse.php

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function getCurrency()
5656
*/
5757
public function getTransactionCode()
5858
{
59-
return (int) $this->data->TransactionCode;
59+
return isset($this->data->TransactionCode) ? (int) $this->data->TransactionCode : null;
6060
}
6161

6262
/**
@@ -66,16 +66,6 @@ public function getTransactionCode()
6666
*/
6767
public function getTransactionDesc()
6868
{
69-
return (string) $this->data->TransactionDesc;
70-
}
71-
72-
/**
73-
* Get the unique ID that identifies the transaction in the Ukash system.
74-
*
75-
* @return string transaction reference
76-
*/
77-
public function getTransactionReference()
78-
{
79-
return (string) $this->data->UTID;
69+
return isset($this->data->TransactionDesc) ? (string) $this->data->TransactionDesc : null;
8070
}
8171
}

src/Omnipay/Ukash/Message/Response.php

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -81,64 +81,6 @@ public function getMessage()
8181
return '';
8282
}
8383

84-
/**
85-
* Get the total amount of the transfer as it was requested.
86-
*
87-
* The amount will be greater than 0.01 units of currency in the supported currency
88-
* and may have decimal places, but no currency symbols.
89-
*
90-
* @return string amount
91-
*/
92-
public function getAmount()
93-
{
94-
return (string) $this->data->SettleAmount;
95-
}
96-
97-
/**
98-
* Get the currency of the transfer as it was requested.
99-
*
100-
* @return string amount
101-
*/
102-
public function getCurrency()
103-
{
104-
return (string) $this->data->MerchantCurrency;
105-
}
106-
107-
/**
108-
* Transaction status/return code.
109-
* It determines whether the voucher was successfully redeemed or not.
110-
* A “0” means that the voucher was successfully redeemed.
111-
* Any other code will reflect an unsuccessful redemption due to an
112-
* invalid voucher or an error.
113-
*
114-
* 0 => Accepted
115-
* Redemption successful
116-
*
117-
* 1 => Declined
118-
* Redemption unsuccessful
119-
*
120-
* 99 => Failed
121-
* An error occurred during the processing of the transaction hence the system
122-
* could not successfully complete the redemption of the voucher.
123-
* Will also be returned if an invalid voucher number was supplied.
124-
*
125-
* @return string transaction code
126-
*/
127-
public function getTransactionCode()
128-
{
129-
return isset($this->data->TransactionCode) ? (int) $this->data->TransactionCode : null;
130-
}
131-
132-
/**
133-
* Short text description of the transaction status/return code.
134-
*
135-
* @return string transaction desc
136-
*/
137-
public function getTransactionDesc()
138-
{
139-
return isset($this->data->TransactionDesc) ? (string) $this->data->TransactionDesc : null;
140-
}
141-
14284
/**
14385
* Get the unique ID that identifies the transaction in the Ukash system.
14486
*

0 commit comments

Comments
 (0)