@@ 55-61 (lines=7) @@ | ||
52 | * |
|
53 | * @throws InvalidRequestException |
|
54 | */ |
|
55 | protected function appendCancel(SimpleXMLElement $data) |
|
56 | { |
|
57 | $data->addChild('cancel_params'); |
|
58 | $data->cancel_params[0]['carttotalgross'] = round(bcmul($this->getAmount(), 100, 8)); |
|
59 | $data->cancel_params[0]['currency'] = $this->getCurrency(); |
|
60 | $data->cancel_params[0]['reference'] = $this->getTransactionId(); |
|
61 | } |
|
62 | } |
|
63 |
@@ 101-111 (lines=11) @@ | ||
98 | * |
|
99 | * @throws InvalidRequestException |
|
100 | */ |
|
101 | protected function appendRate(SimpleXMLElement $data) |
|
102 | { |
|
103 | if ($this->getPaymentMethod() !== 'pay_later') { |
|
104 | return; |
|
105 | } |
|
106 | ||
107 | $data->addChild('rate_request'); |
|
108 | $data->rate_request[0]['term'] = $this->getRateTerm(); |
|
109 | $data->rate_request[0]['ratecount'] = $this->getRateCount(); |
|
110 | $data->rate_request[0]['totalamount'] = round(bcmul($this->getRateTotalAmount(), 100, 8)); |
|
111 | } |
|
112 | ||
113 | /** |
|
114 | * Get a single parameter. |