fix api payment
This commit is contained in:
@@ -28,6 +28,7 @@ use App\Models\LelongBid;
|
||||
use App\Models\LelongBidMarhun;
|
||||
use App\Models\LelKarat;
|
||||
use App\Models\LelKarat_temp;
|
||||
use App\Models\LelongBidder;
|
||||
use App\Models\Resit;
|
||||
use App\Models\Payment;
|
||||
|
||||
@@ -409,7 +410,6 @@ class ApiController extends Controller
|
||||
$selectedSag = $request->sag;
|
||||
// dd($selectedSag);
|
||||
foreach ($selectedSag as $index) {
|
||||
// dd($index['kodcaw']);
|
||||
$payment = new Payment;
|
||||
$payment->user_id = $request->user_id;
|
||||
$payment->lelong_id = $request->lelong_id;
|
||||
@@ -482,6 +482,11 @@ class ApiController extends Controller
|
||||
$index->status = 2; //0-unpaid //1-fee //2-bid
|
||||
$index->remark = "BERJAYA BAYARAN ONLINE";
|
||||
$index->update();
|
||||
|
||||
$updateTag = LelongBid::join('lelongbidder', 'lelongbid.id', '=', 'lelongbidder.lelongbid_id')
|
||||
->where('lelongbid.norujukan', $index->norujukan)->first();
|
||||
$updateTag->status_payment = 1;
|
||||
$updateTag->update();
|
||||
}
|
||||
|
||||
event(new PaymentNotify('PAID', $resit->user_id, $payment));
|
||||
@@ -566,6 +571,11 @@ class ApiController extends Controller
|
||||
$index->status = 2; //0-unpaid //1-fee //2-bid
|
||||
$index->remark = "BERJAYA BAYARAN ONLINE";
|
||||
$index->update();
|
||||
|
||||
$updateTag = LelongBid::join('lelongbidder', 'lelongbid.id', '=', 'lelongbidder.lelongbid_id')
|
||||
->where('lelongbid.norujukan', $index->norujukan)->first();
|
||||
$updateTag->status_payment = 1;
|
||||
$updateTag->update();
|
||||
}
|
||||
|
||||
event(new PaymentNotify('PAID', $resit->user_id, $payment));
|
||||
|
||||
Reference in New Issue
Block a user