add callback pembayaran

parent 7934d8fe
...@@ -228,4 +228,25 @@ public function addFormKegiatan(Request $request) ...@@ -228,4 +228,25 @@ public function addFormKegiatan(Request $request)
return view('form_kegiatan', $data); return view('form_kegiatan', $data);
} }
public function updatePembayaran(Request $request, $va)
{
if($request->bearerToken() != 'zGKEX7CDNLOvVtetz6lqFZzhZv11Gr9Y2MKVIQmqusAyD5STPPEt7ZC1gl8P'){
return response([
'status' => 403,
'message' => 'unauthorized access'
], 200);
}
$registrasi = Registrasi::query()
->where('kode_registrasi', $va)
->update([
'tanggal_bayar' => Carbon::now()
]);
return response([
'status' => 200,
'message' => 'success'
], 200);
}
} }
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
use App\Http\Controllers\Admin\AdminController; use App\Http\Controllers\Admin\AdminController;
use App\Http\Controllers\RegistrasiController; use App\Http\Controllers\RegistrasiController;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Route;
/* /*
...@@ -41,3 +42,6 @@ ...@@ -41,3 +42,6 @@
Route::get('/delete_peserta/{id}', [AdminController::class, 'delete_peserta'])->name('admin.delete_peserta'); Route::get('/delete_peserta/{id}', [AdminController::class, 'delete_peserta'])->name('admin.delete_peserta');
Route::post('/add-kegiatan', [RegistrasiController::class, 'addFormKegiatan'])->name('registrasi.form-kegiatan.add'); Route::post('/add-kegiatan', [RegistrasiController::class, 'addFormKegiatan'])->name('registrasi.form-kegiatan.add');
Route::get('check-invoice', function(Request $request){
return view('email.invoice');
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment