Skip to content

feat(payment): init smogate gateway #1292

feat(payment): init smogate gateway

feat(payment): init smogate gateway #1292

Triggered via push September 28, 2024 08:42
Status Failure
Total duration 1m 35s
Artifacts

lint.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

9 errors
lint: src/Services/Gateway/Smogate.php#L141
* [End file newline] Expected 1 newline at end of file; 0 found
lint: src/Services/Gateway/Smogate.php#L93
* [Space after cast] Expected 1 space after cast statement; 0 found
lint: src/Services/Gateway/Smogate.php#L130
* [Space after not] Expected 1 space after NOT operator; 0 found
lint: src/Services/Gateway/Smogate.php#L94
* [Trailing array comma] Multi-line arrays must have a trailing comma after the last element.
lint: src/Services/Gateway/Smogate.php#L8
* [Alphabetically sorted uses] Use statements should be sorted alphabetically. The first wrong one is App\Models\Config.
lint: src/Services/Gateway/Smogate.php#L11
* [Unused uses] Type Exception is not used in this file.
lint: src/Services/Gateway/Smogate.php#L72
* [Superfluous whitespace] Whitespace found at end of line
lint: src/Services/Gateway/Smogate.php#L1
* [Single blank line at eof] @@ -140,2 +140,2 @@ } -} \ No newline at end of file +} * [Cast spaces] @@ -92,3 +92,3 @@ 'out_trade_no' => $pl->tradeno, - 'total_amount' => (int)($pl->total * 100), + 'total_amount' => (int) ($pl->total * 100), 'notify_url' => self::getCallbackUrl() * [No extra blank lines] @@ -121,3 +121,2 @@ - private function isMobile() * [No whitespace in blank line] @@ -71,3 +71,3 @@ $invoice_id = $this->antiXss->xss_clean($request->getParam('invoice_id')); - + $user = Auth::getUser(); * [Single quote] @@ -35,3 +35,3 @@ $curl = curl_init(); - curl_setopt($curl, CURLOPT_URL, "https://" . Config::obtain('smogate_app_id') . ".vless.org/v1/gateway/pay"); + curl_setopt($curl, CURLOPT_URL, 'https://' . Config::obtain('smogate_app_id') . '.vless.org/v1/gateway/pay'); curl_setopt($curl, CURLOPT_HEADER, 0); * [Ordered class elements] @@ -121,8 +121,2 @@ - - private function isMobile() - { - return strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'mobile') !== false; - } - public function notify($request, $response, $args): ResponseInterface @@ -139,2 +133,8 @@ return View::getSmarty()->fetch('gateway/smogate.tpl'); + } + + + private function isMobile() + { + return strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'mobile') !== false; }
lint
Process completed with exit code 1.