From 6c9cbca6e3afccfba5ede23191fbea50af9aa0b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=94=E5=A7=AC=E6=A1=91?= Date: Sat, 25 Apr 2020 12:49:27 +0800 Subject: [PATCH] fix f2fpay --- app/Http/Controllers/Gateway/AopF2F.php | 86 -- app/Http/Controllers/Gateway/F2Fpay.php | 127 +++ app/Http/Controllers/PaymentController.php | 8 +- composer.json | 3 +- composer.lock | 882 ++------------------- routes/web.php | 2 +- update.sh | 4 +- 7 files changed, 207 insertions(+), 905 deletions(-) delete mode 100644 app/Http/Controllers/Gateway/AopF2F.php create mode 100644 app/Http/Controllers/Gateway/F2Fpay.php diff --git a/app/Http/Controllers/Gateway/AopF2F.php b/app/Http/Controllers/Gateway/AopF2F.php deleted file mode 100644 index 4c3ccdd7..00000000 --- a/app/Http/Controllers/Gateway/AopF2F.php +++ /dev/null @@ -1,86 +0,0 @@ -sn = self::generateGuid(); - $payment->user_id = Auth::user()->id; - $payment->oid = $request->input('oid'); - $payment->amount = $request->input('amount'); - $payment->save(); - - $gateway = $this->createGateway(); - - $request = $gateway->purchase(); - $request->setBizContent([ - 'subject' => parent::$systemConfig['subject_name']? : parent::$systemConfig['website_name'], - 'out_trade_no' => $payment->sn, - 'total_amount' => $payment->amount - ]); - - /** @var AopTradePreCreateResponse $response */ - $aliResponse = $request->send(); - - $payment->qr_code = 'http://qr.topscan.com/api.php?text='.$aliResponse->getQrCode().'&bg=ffffff&fg=000000&pt=1c73bd&m=10&w=400&el=1&inpt=1eabfc&logo=https://t.alipayobjects.com/tfscom/T1Z5XfXdxmXXXXXXXX.png'; - //后备:https://cli.im/api/qrcode/code?text=".$aliResponse->getQrCode()."&mhid=5EfGCwztyckhMHcmI9ZcOKs - $payment->save(); - - return Response::json(['status' => 'success', 'data' => $payment->sn, 'message' => '创建订单成功!']); - } - - private function createGateway() - { - $gateway = Omnipay::create('Alipay_AopF2F'); - $gateway->setSignType('RSA2'); //RSA/RSA2 - $gateway->setAppId(parent::$systemConfig['f2fpay_app_id']); - $gateway->setPrivateKey(parent::$systemConfig['f2fpay_private_key']); - $gateway->setAlipayPublicKey(parent::$systemConfig['f2fpay_public_key']); - $gateway->setNotifyUrl((parent::$systemConfig['website_callback_url']? : parent::$systemConfig['website_url']).'/callback/notify?method=f2fpay'); - - return $gateway; - } - - public function notify($request) - { - $gateway = self::createGateway(); - $request = $gateway->completePurchase(); - $request->setParams($_POST); - - try{ - /** @var AopCompletePurchaseResponse $response */ - $response = $request->send(); - if($response->isPaid()){ - self::postPayment($response->data('out_trade_no'), '支付宝当面付'); - exit('success'); - }else{ - exit('fail'); - } - }catch(Exception $e){ - Log::error('支付宝当面付 '.$e); - exit('fail'); - } - } - - public function getReturnHTML($request) - { - // TODO: Implement getReturnHTML() method. - } - - public function getPurchaseHTML() - { - // TODO: Implement getReturnHTML() method. - } -} \ No newline at end of file diff --git a/app/Http/Controllers/Gateway/F2Fpay.php b/app/Http/Controllers/Gateway/F2Fpay.php new file mode 100644 index 00000000..e2942746 --- /dev/null +++ b/app/Http/Controllers/Gateway/F2Fpay.php @@ -0,0 +1,127 @@ + FALSE, + 'app_id' => self::$systemConfig['f2fpay_app_id'], + 'sign_type' => 'RSA2', + 'ali_public_key' => self::$systemConfig['f2fpay_public_key'], + 'rsa_private_key' => self::$systemConfig['f2fpay_private_key'], + 'limit_pay' => [], + 'notify_url' => (self::$systemConfig['website_callback_url']? : self::$systemConfig['website_url']).'/callback/notify?method=f2fpay', + 'return_url' => self::$systemConfig['website_url'].'/invoices', + 'fee_type' => 'CNY', + ]; + } + + public function purchase($request) + { + $payment = new Payment(); + $payment->sn = self::generateGuid(); + $payment->user_id = Auth::user()->id; + $payment->oid = $request->input('oid'); + $payment->amount = $request->input('amount'); + $payment->save(); + + $data = [ + 'body' => '', + 'subject' => self::$systemConfig['subject_name']? : self::$systemConfig['website_name'], + 'trade_no' => $payment->sn, + 'time_expire' => time()+900, // 必须 15分钟 内付款 + 'amount' => $payment->amount, + ]; + + try{ + $client = new Client(Client::ALIPAY, self::$aliConfig); + $result = $client->pay(Client::ALI_CHANNEL_QR, $data); + }catch(InvalidArgumentException $e){ + Log::error("【支付宝当面付】输入信息错误: ".$e->getMessage()); + exit; + }catch(GatewayException $e){ + Log::error("【支付宝当面付】建立支付错误: ".$e->getMessage()." | ".var_dump($e->getRaw())); + var_dump($e->getRaw()); + exit; + }catch(ClassNotFoundException $e){ + Log::error("【支付宝当面付】未知类型: ".$e->getMessage()); + exit; + }catch(Exception $e){ + Log::error("【支付宝当面付】错误: ".$e->getMessage()); + exit; + } + + $payment->qr_code = 'http://qr.topscan.com/api.php?text='.$result['qr_code'].'&bg=ffffff&fg=000000&pt=1c73bd&m=10&w=400&el=1&inpt=1eabfc&logo=https://t.alipayobjects.com/tfscom/T1Z5XfXdxmXXXXXXXX.png'; + //后备:https://cli.im/api/qrcode/code?text=".$result['qr_code']."&mhid=5EfGCwztyckhMHcmI9ZcOKs + $payment->save(); + + return Response::json(['status' => 'success', 'data' => $payment->sn, 'message' => '创建订单成功!']); + } + + public function notify($request) + { + $data = [ + 'trade_no' => $request->input('out_trade_no'), + 'transaction_id' => $request->input('trade_no'), + ]; + + try{ + $client = new Client(Client::ALIPAY, self::$aliConfig); + $result = $client->tradeQuery($data); + Log::info("【支付宝当面付】回调验证查询:".var_export($result, TRUE)); + }catch(InvalidArgumentException $e){ + Log::error("【支付宝当面付】回调信息错误: ".$e->getMessage()); + exit; + }catch(GatewayException $e){ + Log::error("【支付宝当面付】建立支付错误: ".$e->getMessage()); + exit; + }catch(ClassNotFoundException $e){ + Log::error("【支付宝当面付】未知类型: ".$e->getMessage()); + exit; + }catch(Exception $e){ + Log::error("【支付宝当面付】错误: ".$e->getMessage()); + exit; + } + + $ret = "fail"; + if($result['code'] == 10000 && $result['msg'] == "Success"){ + $ret = "success"; + if($_POST['trade_status'] == 'TRADE_FINISHED' || $_POST['trade_status'] == 'TRADE_SUCCESS'){ + self::postPayment($request->input('out_trade_no'), '支付宝当面付'); + }else{ + Log::info('支付宝当面付-POST:交易失败['.getClientIp().']'); + } + }else{ + Log::info('支付宝当面付-POST:验证失败['.getClientIp().']'); + } + + // 返回验证结果 + exit($ret); + } + + public function getReturnHTML($request) + { + // TODO: Implement getReturnHTML() method. + } + + public function getPurchaseHTML() + { + // TODO: Implement getReturnHTML() method. + } +} \ No newline at end of file diff --git a/app/Http/Controllers/PaymentController.php b/app/Http/Controllers/PaymentController.php index 7e72f3e8..0d3fadff 100644 --- a/app/Http/Controllers/PaymentController.php +++ b/app/Http/Controllers/PaymentController.php @@ -3,7 +3,7 @@ namespace App\Http\Controllers; use App\Components\Helpers; -use App\Http\Controllers\Gateway\AopF2F; +use App\Http\Controllers\Gateway\F2Fpay; use App\Http\Controllers\Gateway\BitpayX; use App\Http\Controllers\Gateway\CodePay; use App\Http\Controllers\Gateway\Local; @@ -34,7 +34,7 @@ class PaymentController extends Controller self::$method = $request->input('method'); Log::info(self::$method."回调接口[POST]:".self::$method.var_export($request->all(), TRUE)); - $result = self::getClient()->notify($request); + self::getClient()->notify($request); return 0; } @@ -45,7 +45,7 @@ class PaymentController extends Controller case 'balance': return new Local(); case 'f2fpay': - return new AopF2F(); + return new F2Fpay(); case 'codepay': return new Codepay(); case 'payjs': @@ -53,6 +53,8 @@ class PaymentController extends Controller case 'bitpayx': return new BitpayX(); default: + Log::error("未知支付:".self::$method); + return NULL; } } diff --git a/composer.json b/composer.json index 7b95884c..c9a15f3d 100644 --- a/composer.json +++ b/composer.json @@ -22,8 +22,6 @@ "jenssegers/agent": "^2.6", "laravel/framework": "5.8.*", "laravel/tinker": "~1.0", - "league/omnipay": "^3", - "lokielse/omnipay-alipay": "*", "mews/captcha": "^3.1", "mews/purifier": "^3.2", "misechow/geetest": "^1.0", @@ -33,6 +31,7 @@ "phpoffice/phpspreadsheet": "^1.11", "predis/predis": "^1.1", "rap2hpoutre/laravel-log-viewer": "^1.5", + "riverslei/payment": "*", "scyllaly/hcaptcha": "^4.1", "spatie/laravel-permission": "^3.11", "xhat/payjs": "^1.4" diff --git a/composer.lock b/composer.lock index 71c10b70..08fd5ecc 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0b550602bf4341c4d624f01f9422ea61", + "content-hash": "68f2779fa41d9186d580acfd60389815", "packages": [ { "name": "barryvdh/laravel-debugbar", @@ -261,64 +261,6 @@ ], "time": "2020-03-17T15:24:26+00:00" }, - { - "name": "clue/stream-filter", - "version": "v1.4.1", - "source": { - "type": "git", - "url": "https://github.com/clue/php-stream-filter.git", - "reference": "5a58cc30a8bd6a4eb8f856adf61dd3e013f53f71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/clue/php-stream-filter/zipball/5a58cc30a8bd6a4eb8f856adf61dd3e013f53f71", - "reference": "5a58cc30a8bd6a4eb8f856adf61dd3e013f53f71", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": ">=5.3" - }, - "require-dev": { - "phpunit/phpunit": "^5.0 || ^4.8" - }, - "type": "library", - "autoload": { - "psr-4": { - "Clue\\StreamFilter\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@lueck.tv" - } - ], - "description": "A simple and modern approach to stream filtering in PHP", - "homepage": "https://github.com/clue/php-stream-filter", - "keywords": [ - "bucket brigade", - "callback", - "filter", - "php_user_filter", - "stream", - "stream_filter_append", - "stream_filter_register" - ], - "time": "2019-04-09T12:31:48+00:00" - }, { "name": "composer/ca-bundle", "version": "1.2.7", @@ -2399,128 +2341,6 @@ ], "time": "2020-04-16T13:21:26+00:00" }, - { - "name": "league/omnipay", - "version": "v3.0.2", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/omnipay.git", - "reference": "9e10d91cbf84744207e13d4483e79de39b133368" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/omnipay/zipball/9e10d91cbf84744207e13d4483e79de39b133368", - "reference": "9e10d91cbf84744207e13d4483e79de39b133368", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "omnipay/common": "^3", - "php": "^5.6|^7", - "php-http/guzzle6-adapter": "^1.1|^2" - }, - "require-dev": { - "omnipay/tests": "^3" - }, - "type": "metapackage", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adrian Macneil", - "email": "adrian@adrianmacneil.com" - }, - { - "name": "Barry vd. Heuvel", - "email": "barryvdh@gmail.com" - } - ], - "description": "Omnipay payment processing library", - "homepage": "https://omnipay.thephpleague.com/", - "keywords": [ - "checkout", - "creditcard", - "omnipay", - "payment" - ], - "time": "2019-03-20T14:28:28+00:00" - }, - { - "name": "lokielse/omnipay-alipay", - "version": "v3.1", - "source": { - "type": "git", - "url": "https://github.com/lokielse/omnipay-alipay.git", - "reference": "ba6aac2c7d880c5e4ca53840aedfc7e81b8f6977" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/lokielse/omnipay-alipay/zipball/ba6aac2c7d880c5e4ca53840aedfc7e81b8f6977", - "reference": "ba6aac2c7d880c5e4ca53840aedfc7e81b8f6977", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "ext-bcmath": "*", - "ext-json": "*", - "ext-openssl": "*", - "omnipay/common": "^3.0", - "php-http/guzzle6-adapter": "^2.0" - }, - "require-dev": { - "omnipay/tests": "^3.0", - "squizlabs/php_codesniffer": "^3.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Omnipay\\Alipay\\": "src/", - "Omnipay\\Alipay\\Tests\\": "tests/" - }, - "files": [ - "src/Common/helpers.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Loki Else", - "email": "lokielse@gmail.com" - } - ], - "description": "Alipay gateway for Omnipay payment processing library", - "homepage": "https://github.com/lokielse/omnipay-alipay", - "keywords": [ - "alipay", - "gateway", - "merchant", - "omnipay", - "pay", - "payment", - "purchase" - ], - "time": "2020-03-09T12:35:16+00:00" - }, { "name": "markbaker/complex", "version": "1.4.8", @@ -3093,94 +2913,6 @@ ], "time": "2019-09-18T18:44:20+00:00" }, - { - "name": "moneyphp/money", - "version": "v3.3.1", - "source": { - "type": "git", - "url": "https://github.com/moneyphp/money.git", - "reference": "122664c2621a95180a13c1ac81fea1d2ef20781e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/moneyphp/money/zipball/122664c2621a95180a13c1ac81fea1d2ef20781e", - "reference": "122664c2621a95180a13c1ac81fea1d2ef20781e", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "ext-json": "*", - "php": ">=5.6" - }, - "require-dev": { - "cache/taggable-cache": "^0.4.0", - "doctrine/instantiator": "^1.0.5", - "ext-bcmath": "*", - "ext-gmp": "*", - "ext-intl": "*", - "florianv/exchanger": "^1.0", - "florianv/swap": "^3.0", - "friends-of-phpspec/phpspec-code-coverage": "^3.1.1 || ^4.3", - "moneyphp/iso-currencies": "^3.2.1", - "php-http/message": "^1.4", - "php-http/mock-client": "^1.0.0", - "phpspec/phpspec": "^3.4.3", - "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.18 || ^8.5", - "psr/cache": "^1.0", - "symfony/phpunit-bridge": "^4" - }, - "suggest": { - "ext-bcmath": "Calculate without integer limits", - "ext-gmp": "Calculate without integer limits", - "ext-intl": "Format Money objects with intl", - "florianv/exchanger": "Exchange rates library for PHP", - "florianv/swap": "Exchange rates library for PHP", - "psr/cache-implementation": "Used for Currency caching" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Money\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mathias Verraes", - "email": "mathias@verraes.net", - "homepage": "http://verraes.net" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - }, - { - "name": "Frederik Bosch", - "email": "f.bosch@genkgo.nl" - } - ], - "description": "PHP implementation of Fowler's Money pattern", - "homepage": "http://moneyphp.org", - "keywords": [ - "Value Object", - "money", - "vo" - ], - "time": "2020-03-18T17:49:59+00:00" - }, { "name": "monolog/monolog", "version": "1.25.3", @@ -3400,94 +3132,6 @@ ], "time": "2020-04-10T16:34:50+00:00" }, - { - "name": "omnipay/common", - "version": "v3.0.3", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/omnipay-common.git", - "reference": "24ea70aa6e0f76d8b85d7a35d8a6560c746f566f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/omnipay-common/zipball/24ea70aa6e0f76d8b85d7a35d8a6560c746f566f", - "reference": "24ea70aa6e0f76d8b85d7a35d8a6560c746f566f", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "moneyphp/money": "^3.1", - "php": "^5.6|^7", - "php-http/client-implementation": "^1", - "php-http/discovery": "^1.2.1", - "php-http/message": "^1.5", - "symfony/http-foundation": "^2.1|^3|^4|^5" - }, - "require-dev": { - "omnipay/tests": "^3", - "php-http/mock-client": "^1", - "phpro/grumphp": "^0.14", - "squizlabs/php_codesniffer": "^3.5" - }, - "suggest": { - "league/omnipay": "The default Omnipay package provides a default HTTP Adapter." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Omnipay\\Common\\": "src/Common" - }, - "classmap": [ - "src/Omnipay.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adrian Macneil", - "email": "adrian@adrianmacneil.com" - }, - { - "name": "Barry vd. Heuvel", - "email": "barryvdh@gmail.com" - }, - { - "name": "Jason Judge", - "email": "jason.judge@consil.co.uk" - }, - { - "name": "Del" - }, - { - "name": "Omnipay Contributors", - "homepage": "https://github.com/thephpleague/omnipay-common/contributors" - } - ], - "description": "Common components for Omnipay payment processing library", - "homepage": "https://github.com/thephpleague/omnipay-common", - "keywords": [ - "gateway", - "merchant", - "omnipay", - "pay", - "payment", - "purchase" - ], - "time": "2020-02-12T12:28:23+00:00" - }, { "name": "openlss/lib-array2xml", "version": "1.0.0", @@ -3712,399 +3356,6 @@ ], "time": "2018-07-02T15:55:56+00:00" }, - { - "name": "php-http/discovery", - "version": "1.7.4", - "source": { - "type": "git", - "url": "https://github.com/php-http/discovery.git", - "reference": "82dbef649ccffd8e4f22e1953c3a5265992b83c0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/discovery/zipball/82dbef649ccffd8e4f22e1953c3a5265992b83c0", - "reference": "82dbef649ccffd8e4f22e1953c3a5265992b83c0", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": "^7.1" - }, - "conflict": { - "nyholm/psr7": "<1.0" - }, - "require-dev": { - "akeneo/phpspec-skip-example-extension": "^4.0", - "php-http/httplug": "^1.0 || ^2.0", - "php-http/message-factory": "^1.0", - "phpspec/phpspec": "^5.1", - "puli/composer-plugin": "1.0.0-beta10" - }, - "suggest": { - "php-http/message": "Allow to use Guzzle, Diactoros or Slim Framework factories", - "puli/composer-plugin": "Sets up Puli which is recommended for Discovery to work. Check http://docs.php-http.org/en/latest/discovery.html for more details." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.7-dev" - } - }, - "autoload": { - "psr-4": { - "Http\\Discovery\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "description": "Finds installed HTTPlug implementations and PSR-7 message factories", - "homepage": "http://php-http.org", - "keywords": [ - "adapter", - "client", - "discovery", - "factory", - "http", - "message", - "psr7" - ], - "time": "2020-01-03T11:25:47+00:00" - }, - { - "name": "php-http/guzzle6-adapter", - "version": "v2.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-http/guzzle6-adapter.git", - "reference": "6074a4b1f4d5c21061b70bab3b8ad484282fe31f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/guzzle6-adapter/zipball/6074a4b1f4d5c21061b70bab3b8ad484282fe31f", - "reference": "6074a4b1f4d5c21061b70bab3b8ad484282fe31f", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "guzzlehttp/guzzle": "^6.0", - "php": "^7.1", - "php-http/httplug": "^2.0", - "psr/http-client": "^1.0" - }, - "provide": { - "php-http/async-client-implementation": "1.0", - "php-http/client-implementation": "1.0", - "psr/http-client-implementation": "1.0" - }, - "require-dev": { - "ext-curl": "*", - "php-http/client-integration-tests": "^2.0", - "phpunit/phpunit": "^7.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Http\\Adapter\\Guzzle6\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - }, - { - "name": "David de Boer", - "email": "david@ddeboer.nl" - } - ], - "description": "Guzzle 6 HTTP Adapter", - "homepage": "http://httplug.io", - "keywords": [ - "Guzzle", - "http" - ], - "time": "2018-12-16T14:44:03+00:00" - }, - { - "name": "php-http/httplug", - "version": "2.1.0", - "source": { - "type": "git", - "url": "https://github.com/php-http/httplug.git", - "reference": "72d2b129a48f0490d55b7f89be0d6aa0597ffb06" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/httplug/zipball/72d2b129a48f0490d55b7f89be0d6aa0597ffb06", - "reference": "72d2b129a48f0490d55b7f89be0d6aa0597ffb06", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": "^7.0", - "php-http/promise": "^1.0", - "psr/http-client": "^1.0", - "psr/http-message": "^1.0" - }, - "require-dev": { - "friends-of-phpspec/phpspec-code-coverage": "^4.1", - "phpspec/phpspec": "^4.3.4|^5.0|^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Http\\Client\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eric GELOEN", - "email": "geloen.eric@gmail.com" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "description": "HTTPlug, the HTTP client abstraction for PHP", - "homepage": "http://httplug.io", - "keywords": [ - "client", - "http" - ], - "time": "2019-12-27T10:07:11+00:00" - }, - { - "name": "php-http/message", - "version": "1.8.0", - "source": { - "type": "git", - "url": "https://github.com/php-http/message.git", - "reference": "ce8f43ac1e294b54aabf5808515c3554a19c1e1c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/message/zipball/ce8f43ac1e294b54aabf5808515c3554a19c1e1c", - "reference": "ce8f43ac1e294b54aabf5808515c3554a19c1e1c", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "clue/stream-filter": "^1.4", - "php": "^7.1", - "php-http/message-factory": "^1.0.2", - "psr/http-message": "^1.0" - }, - "provide": { - "php-http/message-factory-implementation": "1.0" - }, - "require-dev": { - "akeneo/phpspec-skip-example-extension": "^1.0", - "coduo/phpspec-data-provider-extension": "^1.0", - "ext-zlib": "*", - "guzzlehttp/psr7": "^1.0", - "henrikbjorn/phpspec-code-coverage": "^1.0", - "phpspec/phpspec": "^2.4", - "slim/slim": "^3.0", - "zendframework/zend-diactoros": "^1.0" - }, - "suggest": { - "ext-zlib": "Used with compressor/decompressor streams", - "guzzlehttp/psr7": "Used with Guzzle PSR-7 Factories", - "slim/slim": "Used with Slim Framework PSR-7 implementation", - "zendframework/zend-diactoros": "Used with Diactoros Factories" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.8-dev" - } - }, - "autoload": { - "psr-4": { - "Http\\Message\\": "src/" - }, - "files": [ - "src/filters.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "description": "HTTP Message related tools", - "homepage": "http://php-http.org", - "keywords": [ - "http", - "message", - "psr-7" - ], - "time": "2019-08-05T06:55:08+00:00" - }, - { - "name": "php-http/message-factory", - "version": "v1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-http/message-factory.git", - "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/message-factory/zipball/a478cb11f66a6ac48d8954216cfed9aa06a501a1", - "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": ">=5.4", - "psr/http-message": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "description": "Factory interfaces for PSR-7 HTTP Message", - "homepage": "http://php-http.org", - "keywords": [ - "factory", - "http", - "message", - "stream", - "uri" - ], - "time": "2015-12-19T14:08:53+00:00" - }, - { - "name": "php-http/promise", - "version": "v1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-http/promise.git", - "reference": "dc494cdc9d7160b9a09bd5573272195242ce7980" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/promise/zipball/dc494cdc9d7160b9a09bd5573272195242ce7980", - "reference": "dc494cdc9d7160b9a09bd5573272195242ce7980", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require-dev": { - "henrikbjorn/phpspec-code-coverage": "^1.0", - "phpspec/phpspec": "^2.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "psr-4": { - "Http\\Promise\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - }, - { - "name": "Joel Wurtz", - "email": "joel.wurtz@gmail.com" - } - ], - "description": "Promise used for asynchronous HTTP requests", - "homepage": "http://httplug.io", - "keywords": [ - "promise" - ], - "time": "2016-01-26T13:27:02+00:00" - }, { "name": "phpoffice/phpspreadsheet", "version": "1.11.0", @@ -4376,61 +3627,6 @@ ], "time": "2017-02-14T16:28:37+00:00" }, - { - "name": "psr/http-client", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-client.git", - "reference": "496a823ef742b632934724bf769560c2a5c7c44e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/496a823ef742b632934724bf769560c2a5c7c44e", - "reference": "496a823ef742b632934724bf769560c2a5c7c44e", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": "^7.0", - "psr/http-message": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Client\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP clients", - "homepage": "https://github.com/php-fig/http-client", - "keywords": [ - "http", - "http-client", - "psr", - "psr-18" - ], - "time": "2018-10-30T23:29:13+00:00" - }, { "name": "psr/http-message", "version": "1.0.1", @@ -4815,16 +4011,16 @@ }, { "name": "rap2hpoutre/laravel-log-viewer", - "version": "v1.5.1", + "version": "v1.5.2", "source": { "type": "git", "url": "https://github.com/rap2hpoutre/laravel-log-viewer.git", - "reference": "52c2a39ffbaafab13afb7e537c6c53f06e0b5cf5" + "reference": "337bb72d2af6b0de9b3128e77f13c1ff262bc962" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rap2hpoutre/laravel-log-viewer/zipball/52c2a39ffbaafab13afb7e537c6c53f06e0b5cf5", - "reference": "52c2a39ffbaafab13afb7e537c6c53f06e0b5cf5", + "url": "https://api.github.com/repos/rap2hpoutre/laravel-log-viewer/zipball/337bb72d2af6b0de9b3128e77f13c1ff262bc962", + "reference": "337bb72d2af6b0de9b3128e77f13c1ff262bc962", "shasum": "", "mirrors": [ { @@ -4876,7 +4072,70 @@ "logging", "lumen" ], - "time": "2020-04-22T20:15:55+00:00" + "time": "2020-04-23T19:44:47+00:00" + }, + { + "name": "riverslei/payment", + "version": "v5.0.2", + "source": { + "type": "git", + "url": "https://github.com/helei112g/payment.git", + "reference": "c3a77896694f45d6b56547582f2d4996965e36bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/helei112g/payment/zipball/c3a77896694f45d6b56547582f2d4996965e36bc", + "reference": "c3a77896694f45d6b56547582f2d4996965e36bc", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-bcmath": "*", + "ext-json": "*", + "ext-mbstring": "*", + "ext-openssl": "*", + "ext-simplexml": "*", + "ext-xml": "*", + "guzzlehttp/guzzle": "~6.0", + "php": ">=7.0" + }, + "require-dev": { + "codeception/codeception": "*" + }, + "type": "library", + "autoload": { + "psr-4": { + "Payment\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Leo", + "email": "dayugog@gmail.com", + "homepage": "https://dayutalk.cn" + } + ], + "description": "支付宝支付、微信支付、招商一网通支付php SDK。方便快速接入,最完整的开源支付 php sdk", + "homepage": "http://helei112g.github.io/payment", + "keywords": [ + "alipay", + "weixin", + "一网通", + "微信支付", + "招商一网通", + "支付宝支付", + "集成支付接口SDK" + ], + "time": "2020-04-16T03:22:55+00:00" }, { "name": "scyllaly/hcaptcha", @@ -8856,5 +8115,6 @@ "ext-json": "*", "ext-openssl": "*" }, - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "1.1.0" } diff --git a/routes/web.php b/routes/web.php index 9666da61..d649a2ed 100644 --- a/routes/web.php +++ b/routes/web.php @@ -130,7 +130,7 @@ Route::group(['middleware' => ['isForbidden', 'isAdminLogin', 'isAdmin']], funct Route::post("del", "SensitiveWordsController@delSensitiveWords"); // 删除敏感词 }); Route::get("payment/callbackList", "PaymentController@callbackList"); // 支付回调日志 - Route::get('logs', '\Rap2hpoutre\Controllers\LogViewerController@index'); // 系统运行日志 + Route::get('logs', '\Rap2hpoutre\LaravelLogViewer\LogViewerController@index'); // 系统运行日志 }); Route::group(['middleware' => ['isForbidden', 'isMaintenance', 'isLogin']], function(){ diff --git a/update.sh b/update.sh index e9f1d43b..f03f8547 100644 --- a/update.sh +++ b/update.sh @@ -2,11 +2,11 @@ git fetch --all git reset --hard origin/master git pull -php composer.phar install -php artisan key:generate php artisan config:clear php artisan cache:clear php artisan view:clear +php composer.phar install +php artisan key:generate php artisan route:cache php artisan config:cache chown -R www:www ./ \ No newline at end of file