diff --git a/routes/web.php b/routes/web.php index 68b9a9fe..88bab558 100644 --- a/routes/web.php +++ b/routes/web.php @@ -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"); - } - } - - 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 '