1 | <?php |
||
17 | class OldPurchaseRequest extends AbstractRequest |
||
18 | { |
||
19 | /** |
||
20 | * @return string |
||
21 | */ |
||
22 | public function getBaggageFields() |
||
23 | { |
||
24 | return $this->getCurrency(); |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * {@inheritdoc} |
||
29 | */ |
||
30 | 3 | public function getData() |
|
31 | { |
||
32 | 3 | $this->validate('checkoutId', 'amount', 'currency', 'description', 'transactionId'); |
|
33 | |||
34 | $return = [ |
||
35 | 3 | 'ik_shop_id' => $this->getCheckoutId(), |
|
36 | 3 | 'ik_payment_amount' => $this->getAmount(), |
|
37 | 3 | 'ik_payment_id' => $this->getTransactionId(), |
|
38 | 3 | 'ik_payment_desc' => $this->getDescription(), |
|
39 | ]; |
||
40 | |||
41 | 3 | if ($ik_success_url = $this->getReturnUrl()) { |
|
42 | 3 | $return['ik_success_url'] = $ik_success_url; |
|
43 | 3 | $return['ik_success_method'] = $this->getReturnMethod(); |
|
44 | } |
||
45 | |||
46 | 3 | if ($ik_fail_method = $this->getCancelUrl()) { |
|
47 | 3 | $return['ik_fail_url'] = $ik_fail_method; |
|
48 | 3 | $return['ik_fail_method'] = $this->getCancelMethod(); |
|
49 | } |
||
50 | |||
51 | 3 | if ($ik_status_url = $this->getNotifyUrl()) { |
|
52 | 3 | $return['ik_status_url'] = $ik_status_url; |
|
53 | 3 | $return['ik_status_method'] = $this->getNotifyMethod(); |
|
54 | } |
||
55 | |||
56 | 3 | return $return; |
|
57 | } |
||
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | * @param mixed $data |
||
62 | * @return PurchaseResponse |
||
63 | */ |
||
64 | 2 | public function sendData($data) |
|
68 | } |
||
69 |