Total Complexity | 5 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class RefundRequest extends PurchaseRequest |
||
11 | { |
||
12 | protected $requestMethod = 'POST'; |
||
13 | |||
14 | public function getPaymentId() |
||
17 | } |
||
18 | |||
19 | public function setPaymentId($value) |
||
20 | { |
||
21 | return $this->setParameter('paymentId', $value); |
||
22 | } |
||
23 | |||
24 | public function getData() |
||
25 | { |
||
26 | $this->validate('merchantId', 'amount', 'currency', 'paymentId'); |
||
27 | |||
28 | $data = [ |
||
29 | 'amountOfMoney' => [ |
||
30 | 'amount' => $this->getAmountInteger(), |
||
31 | 'currencyCode' => $this->getCurrency(), |
||
32 | ], |
||
33 | 'operationReferences' => [ |
||
34 | 'merchantReference' => $this->getTransactionId(), |
||
35 | ], |
||
36 | ]; |
||
37 | |||
38 | return $data; |
||
39 | } |
||
40 | |||
41 | protected function createResponse($data) |
||
44 | } |
||
45 | |||
46 | protected function getAction() |
||
49 | } |
||
50 | } |
||
51 |