| @@ 69-83 (lines=15) @@ | ||
| 66 | return $this->transactions; |
|
| 67 | } |
|
| 68 | ||
| 69 | protected function init() |
|
| 70 | { |
|
| 71 | /** @var \SimpleXMLElement $body */ |
|
| 72 | $body = $this->xmlDoc->Body; |
|
| 73 | ||
| 74 | $currency = (int)$body->CaptureCurrency; |
|
| 75 | $alphaCurrency = AltaPay\alphaCurrencyFromNumeric($currency); |
|
| 76 | ||
| 77 | $this->transactions = []; |
|
| 78 | $this->captureAmount = AltaPay\createMoneyFromFloat($alphaCurrency, (float)$body->CaptureAmount); |
|
| 79 | $this->captureCurrency = $currency; |
|
| 80 | $this->captureResult = (string)$body->CaptureResult; |
|
| 81 | $this->hydrateResult($body); |
|
| 82 | $this->hydrateTransactions($body); |
|
| 83 | } |
|
| 84 | } |
|
| 85 | ||
| @@ 55-67 (lines=13) @@ | ||
| 52 | return $this->refundResult; |
|
| 53 | } |
|
| 54 | ||
| 55 | protected function init() |
|
| 56 | { |
|
| 57 | /** @var \SimpleXMLElement $body */ |
|
| 58 | $body = $this->xmlDoc->Body; |
|
| 59 | ||
| 60 | $currency = (int)$body->RefundCurrency; |
|
| 61 | $alphaCurrency = AltaPay\alphaCurrencyFromNumeric($currency); |
|
| 62 | ||
| 63 | $this->refundAmount = AltaPay\createMoneyFromFloat($alphaCurrency, (float)$body->RefundAmount); |
|
| 64 | $this->refundCurrency = $currency; |
|
| 65 | $this->refundResult = (string)$body->RefundResult; |
|
| 66 | $this->hydrateTransactions($body); |
|
| 67 | } |
|
| 68 | } |
|
| 69 | ||