From 32a66d4e9932dd66553b356929a8e8e91e61a7d6 Mon Sep 17 00:00:00 2001 From: Afiq Hamzah Date: Sun, 16 Feb 2025 14:43:04 +0800 Subject: [PATCH] Fix billplz transaction review not working contd --- app/Services/BillplzService.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/Services/BillplzService.php b/app/Services/BillplzService.php index 0c22e9b..ae2ed79 100644 --- a/app/Services/BillplzService.php +++ b/app/Services/BillplzService.php @@ -211,6 +211,15 @@ class BillplzService return $data; }); + + $summarizedBillplzTransactions = $summarizedBillplzTransactions + ->filter(function($x){ + return $x['billplz_latest_transaction'] !== null; + }) + ->filter(function($x){ + return array_key_exists('completed_at', $x['billplz_latest_transaction']); + }); + return $summarizedBillplzTransactions; }