@@ 75-90 (lines=16) @@ | ||
72 | return $this->transactions; |
|
73 | } |
|
74 | ||
75 | protected function init() |
|
76 | { |
|
77 | $this->transactions = []; |
|
78 | $this->captureAmount = (float)$this->xmlDoc->Body->CaptureAmount; |
|
79 | $this->captureCurrency = (int)$this->xmlDoc->Body->CaptureCurrency; |
|
80 | $this->result = (string)$this->xmlDoc->Body->Result; |
|
81 | $this->captureResult = (string)$this->xmlDoc->Body->CaptureResult; |
|
82 | ||
83 | if (isset($this->xmlDoc->Body->Transactions) && |
|
84 | isset($this->xmlDoc->Body->Transactions->Transaction) && |
|
85 | !empty($this->xmlDoc->Body->Transactions->Transaction)) { |
|
86 | foreach ($this->xmlDoc->Body->Transactions->Transaction as $transactionXml) { |
|
87 | $this->transactions[] = new Transaction($this->getResponse(), $transactionXml); |
|
88 | } |
|
89 | } |
|
90 | } |
|
91 | } |
|
92 |
@@ 136-151 (lines=16) @@ | ||
133 | return $this; |
|
134 | } |
|
135 | ||
136 | protected function init() |
|
137 | { |
|
138 | $this->transactions = []; |
|
139 | $this->refundAmount = (float)$this->xmlDoc->Body->RefundAmount; |
|
140 | $this->refundCurrency = (int)$this->xmlDoc->Body->RefundCurrency; |
|
141 | $this->result = (string)$this->xmlDoc->Body->Result; |
|
142 | $this->refundResult = (string)$this->xmlDoc->Body->RefundResult; |
|
143 | ||
144 | if (isset($this->xmlDoc->Body->Transactions) && |
|
145 | isset($this->xmlDoc->Body->Transactions->Transaction) && |
|
146 | !empty($this->xmlDoc->Body->Transactions->Transaction)) { |
|
147 | foreach ($this->xmlDoc->Body->Transactions->Transaction as $transactionXml) { |
|
148 | $this->transactions[] = new Transaction($this->getResponse(), $transactionXml); |
|
149 | } |
|
150 | } |
|
151 | } |
|
152 | } |
|
153 |