Fix billplz transaction summary not working
This commit is contained in:
@@ -12,14 +12,17 @@ class BillplzController extends Controller
|
||||
public function __invoke(Request $request)
|
||||
{
|
||||
$companyMapping = [
|
||||
CompanyStatus::COM_PKB,
|
||||
// CompanyStatus::COM_KOOPPKB,
|
||||
'PKB',
|
||||
'KOPKB',
|
||||
];
|
||||
|
||||
$bills = array_map(function($company_code) use($request){
|
||||
$billplzService = new BillplzService($company_code);
|
||||
$billIdArray = json_decode($request->bill_ids);
|
||||
return $billplzService->getBills($billIdArray);
|
||||
$billIdArray = $billplzService->getBills($billIdArray);
|
||||
return array_filter($billIdArray, function($bill) {
|
||||
return $bill !== [];
|
||||
});
|
||||
}, $companyMapping);
|
||||
|
||||
return array_merge(...$bills);
|
||||
|
||||
Reference in New Issue
Block a user