Add source to invoice criteria. Modify invoice rules to get service fees from... #1701

Merged
arcticzero merged 217 commits from 746-resq-2-0-final into master 2023-11-22 08:54:48 +00:00
2 changed files with 7 additions and 5 deletions
Showing only changes of commit a002da6aad - Show all commits

View file

@ -63,9 +63,11 @@ class PayMongoController extends Controller
$metadata = $event['attributes']['metadata'];
$obj = $this->getTransaction($metadata['transaction_id']);
// mark as paid
$obj->setStatus(TransactionStatus::PAID);
$this->em->flush();
if (!empty($obj)) {
// mark as paid
$obj->setStatus(TransactionStatus::PAID);
$this->em->flush();
}
return $this->json([
'success' => true,

View file

@ -58,7 +58,7 @@ class GatewayTransactionListener
'gateway_transaction' => $gt_obj,
]);
if ($obj) {
if (!empty($obj)) {
// mark as paid
$obj->setDatePay(new DateTime());
$obj->setStatus(InsuranceApplicationStatus::PAID);
@ -67,7 +67,7 @@ class GatewayTransactionListener
// flag on api as paid
$result = $this->ic->tagApplicationPaid($obj->getID());
if (!$result['success']) {
if (!$result['success'] || $result['response']['transaction_code'] !== 'GR004') {
error_log("INSURANCE MARK AS PAID FAILED FOR " . $obj->getID() . ": " . $result['error']['message']);
}
}