diff --git a/app/Http/Controllers/BillplzTransactionReviewController.php b/app/Http/Controllers/BillplzTransactionReviewController.php index a0e866f..3aafd26 100644 --- a/app/Http/Controllers/BillplzTransactionReviewController.php +++ b/app/Http/Controllers/BillplzTransactionReviewController.php @@ -20,7 +20,7 @@ class BillplzTransactionReviewController extends Controller $billplzTransactionReview = array_map(function($company_code) use($date){ $billplzService = new BillplzService($company_code); - return $billplzService->getBillplzTransactionReview($date); + return $billplzService->getBillplzTransactionReview($date)->toArray(); }, $companyMapping); return response()->json(array_merge(...$billplzTransactionReview), 200); @@ -35,7 +35,7 @@ class BillplzTransactionReviewController extends Controller $billplzTransactionReview = array_map(function($company_code) use($request){ $billplzService = new BillplzService($company_code); - return $billplzService->getBillplzTransactionReviewByBillId($request->bill_id); + return $billplzService->getBillplzTransactionReviewByBillId($request->bill_id)->toArray(); }, $companyMapping); return response()->json($billplzTransactionReview, 200);