Fixes for Rotessa checks

This commit is contained in:
David Bomba 2025-03-20 12:08:02 +11:00
parent 18642cd6f3
commit e8e30c778c
1 changed files with 12 additions and 8 deletions

View File

@ -72,14 +72,18 @@ class TransactionReport implements ShouldQueue
$payment->status_id = Payment::STATUS_COMPLETED;
$payment->save();
SystemLogger::dispatch(
['response' => collect($transactions)->where('id', $payment->transaction_reference)->first()->toArray(), 'data' => []],
SystemLog::CATEGORY_GATEWAY_RESPONSE,
SystemLog::EVENT_GATEWAY_SUCCESS,
SystemLog::TYPE_ROTESSA,
$payment->client,
$payment->company,
);
$references =collect($transactions)->where('id', $payment->transaction_reference)->first();
if($references) {
SystemLogger::dispatch(
['response' => $references->toArray(), 'data' => []],
SystemLog::CATEGORY_GATEWAY_RESPONSE,
SystemLog::EVENT_GATEWAY_SUCCESS,
SystemLog::TYPE_ROTESSA,
$payment->client,
$payment->company,
);
}
});