mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
update web route for active wallet
This commit is contained in:
+1
-18
@@ -1209,23 +1209,6 @@ Route::get('/404', function () {
|
||||
|
||||
Route::get('transaction/{id}/credit_note/download', 'Transactions\GenerateCreditNotePdfController@download')->name('transaction.credit_note.download');
|
||||
|
||||
Route::get('/check-successful-payment-or-topup', function () {
|
||||
$sum = 0 ;
|
||||
$transactions = Transaction::whereIn('type', [TransactionType::PAYMENT, TransactionType::TOP_UP, TransactionType::GROUP_PAYMENT])->where('payment_method', PaymentMethodType::PAYMENT_GATEWAY)->whereNotIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED])->get();
|
||||
foreach ($transactions as $transaction){
|
||||
$response = Http::withBasicAuth(config('billplz.api_key').':', '')->get(config('billplz.base_url').'/api/v3/bills/'.$transaction->payment_reference);
|
||||
|
||||
if($response->successful()){
|
||||
$sum += $transaction->amount;
|
||||
dump($transaction->payment_reference . 'Amount : ' . $transaction->amount);
|
||||
}else{
|
||||
dump("billplz error</br>");
|
||||
}
|
||||
}
|
||||
|
||||
dump("Sum is : " . $sum);
|
||||
});
|
||||
|
||||
Route::get('/wallets/active', function(){
|
||||
$wallets = Wallet::all();
|
||||
|
||||
@@ -1233,7 +1216,7 @@ Route::get('/wallets/active', function(){
|
||||
foreach ($wallets as $wallet){
|
||||
$companyMarking = $wallet->owner->getMarking();
|
||||
echo '<tr>';
|
||||
echo '<td><a href="'.route('wallet.details', $companyMarking).'" target="_blank">'.$companyMarking.'</a></td>';
|
||||
echo '<td><a href="'.route('wallet.details', $companyMarking).'" target="_blank">'.$companyMarking.'</a>'."(".$wallet->id.")".'</td>';
|
||||
echo '<td>'.$wallet->amount.'</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user