| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | public function getData() |
||
| 11 | { |
||
| 12 | // Validate required parameters |
||
| 13 | $this->validate('apiUsername', 'apiKey', 'amount', 'currency', 'transactionReference'); |
||
| 14 | |||
| 15 | $data = []; |
||
| 16 | $data['type'] = 'refund'; |
||
| 17 | $data['amount'] = $this->getAmount(); |
||
| 18 | $data['currency'] = $this->getCurrency(); |
||
| 19 | $data['transactionId'] = $this->getTransactionReference(); |
||
| 20 | |||
| 21 | if ($this->getMerchantReference()) { |
||
| 22 | $data['merchantReference'] = $this->getMerchantReference(); |
||
| 23 | } |
||
| 24 | |||
| 25 | return $data; |
||
| 26 | } |
||
| 46 | } |