update
This commit is contained in:
@@ -189,30 +189,6 @@ class ApiController extends Controller
|
||||
$resit->total_payment = 10;
|
||||
$resit->save();
|
||||
|
||||
// foreach($array_payment as $index1=>$arraypay)
|
||||
// {
|
||||
// $previous_siri = Http::get(config('api.url') . '/api/online/transaction')->json();
|
||||
// if($previous_siri){
|
||||
// $nosiri = $previous_siri['nosiri'] + 1;
|
||||
// }else{
|
||||
// $nosiri = 1;
|
||||
// }
|
||||
|
||||
// $reference_no = 'LPKB' . $day . $month . $year . sprintf("%08d", $nosiri);
|
||||
|
||||
// $new_transaction = Http::post(config('api.url') . '/api/online/transaction',[
|
||||
// 'nokp'=> Auth::user()->icno,
|
||||
// 'reference_no'=> $reference_no,
|
||||
// 'nosiri'=> $nosiri,
|
||||
// 'billplz_id' => $billcode['id'],
|
||||
// 'norujukan' => $arraypay['norujukan'],
|
||||
// 'kodcaw' => $arraypay['kodcaw'],
|
||||
// 'total_payment'=> $arraypay['bayaran'],
|
||||
// 'customer_name' => Auth::user()->name,
|
||||
// ])->json();
|
||||
|
||||
// }
|
||||
|
||||
|
||||
return redirect($billcode['url'] . '?auto_submit=true');
|
||||
|
||||
@@ -242,10 +218,17 @@ class ApiController extends Controller
|
||||
$resit->paid_at = $data['billplz']['paid_at'];
|
||||
$resit->save();
|
||||
|
||||
$payment = new Payment;
|
||||
$payment->user_id = $resit->user_id;
|
||||
$payment->total_payment = $resit->total_payment;
|
||||
$payment->resit_id = $resit->id;
|
||||
$payment->status_payment_opt = 2; //bayar secara online 2
|
||||
$payment->status = 1; //fee rm10 - 1
|
||||
$payment->remark = 'Bayaran Online';
|
||||
$payment->save();
|
||||
|
||||
event(new PaymentNotify('PAID',$resit->user_id));
|
||||
// $transactionOnline = Http::get(config('api.url') . '/api/transaction/online/express',[
|
||||
// 'billplz_id' => $data['billplz']['id']
|
||||
// ])->json();
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'resit' => $resit
|
||||
@@ -289,10 +272,17 @@ class ApiController extends Controller
|
||||
$resit->paid_at = $data['paid_at'];
|
||||
$resit->save();
|
||||
|
||||
// $transactionOnline = Http::get(config('api.url') . '/api/transaction/online/express',[
|
||||
// 'billplz_id' => $data['billplz']['id']
|
||||
// ])->json();
|
||||
$payment = new Payment;
|
||||
$payment->user_id = $resit->user_id;
|
||||
$payment->total_payment = $resit->total_payment;
|
||||
$payment->resit_id = $resit->id;
|
||||
$payment->status_payment_opt = 2; //bayar secara online 2
|
||||
$payment->status = 1; //fee rm10 - 1
|
||||
$payment->remark = 'Bayaran Online';
|
||||
$payment->save();
|
||||
|
||||
event(new PaymentNotify('PAID',$resit->user_id));
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'resit' => $resit
|
||||
|
||||
Reference in New Issue
Block a user