diff --git a/app/Http/Controllers/OnlinePaymentController.php b/app/Http/Controllers/OnlinePaymentController.php index 2afc5e4..9c5079f 100644 --- a/app/Http/Controllers/OnlinePaymentController.php +++ b/app/Http/Controllers/OnlinePaymentController.php @@ -5,7 +5,6 @@ namespace App\Http\Controllers; use App\Http\Requests\OnlinePaymentStoreRequest; use App\Models\Payment\OnlinePaymentHistory; use App\Repos\Payment\OnlinePaymentRepo; -use GuzzleHttp\Psr7\Request; use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Log; diff --git a/app/Nova/Lenses/VisaMasterMonthlyPaid.php b/app/Nova/Lenses/VisaMasterMonthlyPaid.php index 77f34b6..7ac5aa4 100644 --- a/app/Nova/Lenses/VisaMasterMonthlyPaid.php +++ b/app/Nova/Lenses/VisaMasterMonthlyPaid.php @@ -32,7 +32,7 @@ class VisaMasterMonthlyPaid extends Lens */ public function name(): string { - return Carbon::create(date('Y').'-'.$this->month.'-01')->monthName ?? 'Ýanwar'; + return Carbon::parse(date('Y').'-'.$this->month.'-01')->monthName ?? 'Ýanwar'; } /** diff --git a/app/Repos/Payment/Billing/HandlesBillingSyncing.php b/app/Repos/Payment/Billing/HandlesBillingSyncing.php index 24a0e86..305a722 100644 --- a/app/Repos/Payment/Billing/HandlesBillingSyncing.php +++ b/app/Repos/Payment/Billing/HandlesBillingSyncing.php @@ -8,16 +8,16 @@ trait HandlesBillingSyncing { $curl = curl_init(); -curl_setopt_array($curl, array( - CURLOPT_URL => 'http://10.3.158.102:8888/api/paytrn/new', - CURLOPT_RETURNTRANSFER => true, - CURLOPT_ENCODING => '', - CURLOPT_MAXREDIRS => 10, - CURLOPT_TIMEOUT => 0, - CURLOPT_FOLLOWLOCATION => true, - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, - CURLOPT_CUSTOMREQUEST => 'POST', - CURLOPT_POSTFIELDS =>'{ + curl_setopt_array($curl, [ + CURLOPT_URL => 'http://10.3.158.102:8888/api/paytrn/new', + CURLOPT_RETURNTRANSFER => true, + CURLOPT_ENCODING => '', + CURLOPT_MAXREDIRS => 10, + CURLOPT_TIMEOUT => 0, + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, + CURLOPT_CUSTOMREQUEST => 'POST', + CURLOPT_POSTFIELDS => '{ "ecomId" : "12345-12345-12345-12345", "agentId" : "1304", "eposId" : "30401238", @@ -26,15 +26,16 @@ curl_setopt_array($curl, array( "amount" : 895.46, "payPurpose" : "Mart 2025" }', - CURLOPT_HTTPHEADER => array( - 'Authorization: Basic YWRtaW46UUFad3N4MTIz', - 'Content-Type: application/json' - ), -)); + CURLOPT_HTTPHEADER => [ + 'Authorization: Basic YWRtaW46UUFad3N4MTIz', + 'Content-Type: application/json', + ], + ]); -$response = curl_exec($curl); + $response = curl_exec($curl); -curl_close($curl); -return $response; + curl_close($curl); + + return $response; } } diff --git a/app/Repos/Payment/OnlinePaymentRepo.php b/app/Repos/Payment/OnlinePaymentRepo.php index d0d04cc..440d9e4 100644 --- a/app/Repos/Payment/OnlinePaymentRepo.php +++ b/app/Repos/Payment/OnlinePaymentRepo.php @@ -13,9 +13,9 @@ use Laravel\Nova\Makeable; class OnlinePaymentRepo { + use HandlesBillingSyncing; use HandlesSberPeyments; use HandlesVisaMasterPayments; - use HandlesBillingSyncing; use Makeable; /** diff --git a/routes/web.php b/routes/web.php index e291488..34f4663 100644 --- a/routes/web.php +++ b/routes/web.php @@ -8,7 +8,6 @@ use App\Http\Controllers\OnlinePaymentController; use App\Http\Controllers\PasswordChangeController; use Illuminate\Support\Facades\Route; - Route::middleware(['guest', 'setLocale'])->group(function () { Route::get('locale/{locale}', LocaleController::class)->name('locale.set');