Files
erahn-click/app/Http/Controllers/BillplzTransactionReviewController.php
T

29 lines
828 B
PHP

<?php
namespace App\Http\Controllers;
use App\Services\BillplzService;
use Carbon\Carbon;
use Illuminate\Http\Request;
class BillplzTransactionReviewController extends Controller
{
public function index(Request $request, BillplzService $billplzService)
{
$date = $request->date ?? Carbon::now()->toDateString();
$billplzTransactionReview = $billplzService->getBillplzTransactionReview($date);
return response()->json($billplzTransactionReview, 200);
}
public function show(Request $request, BillplzService $billplzService)
{
$date = $request->date ?? Carbon::now()->toDateString();
$billplzTransactionReview = $billplzService->getBillplzTransactionReviewByBillId($request->bill_id);
return response()->json($billplzTransactionReview, 200);
}
}