@@ 136-142 (lines=7) @@ | ||
133 | $transaction['custom_id'] = $transactionExportArray[1]; |
|
134 | } |
|
135 | ||
136 | if ($transactionExportArray[5] == 'VALID') { |
|
137 | $transaction['status'] = \Oara\Utilities::STATUS_CONFIRMED; |
|
138 | } else if ($transactionExportArray[5] == 'INVALID' || $transactionExportArray[5] == 'REFUNDED') { |
|
139 | $transaction['status'] = \Oara\Utilities::STATUS_DECLINED; |
|
140 | } else { |
|
141 | throw new \Exception("Status {$transactionExportArray[5]} unknown"); |
|
142 | } |
|
143 | ||
144 | $transaction['amount'] = \Oara\Utilities::parseDouble((double)$transactionExportArray[8]); |
|
145 | $transaction['commission'] = \Oara\Utilities::parseDouble((double)$transactionExportArray[12]); |
@@ 194-202 (lines=9) @@ | ||
191 | } |
|
192 | ||
193 | $transaction['status'] = \Oara\Utilities::STATUS_PENDING; |
|
194 | if ($transactionExportArray[12] == 'A') { |
|
195 | $transaction['status'] = \Oara\Utilities::STATUS_CONFIRMED; |
|
196 | } else |
|
197 | if ($transactionExportArray[12] == 'P') { |
|
198 | $transaction['status'] = \Oara\Utilities::STATUS_PENDING; |
|
199 | } else |
|
200 | if ($transactionExportArray[12] == 'D') { |
|
201 | $transaction['status'] = \Oara\Utilities::STATUS_DECLINED; |
|
202 | } |
|
203 | ||
204 | if ($transactionExportArray[20] != '') { |
|
205 | $transaction['amount'] = \Oara\Utilities::parseDouble($transactionExportArray[20]); |