浏览代码

fix and add

1.  简化支付;
2. 修复余额充值显示错误;
3. 加入关闭订单功能;
4. 改PayJS支付方式为收银台模式cashier,而非扫码模式native
兔姬桑 4 年之前
父节点
当前提交
32e8638363

+ 1 - 0
app/Console/Commands/AutoJob.php

@@ -91,6 +91,7 @@ class AutoJob extends Command {
 				foreach($paymentList as $payment){
 					// 关闭支付单
 					Payment::query()->whereId($payment->id)->update(['status' => -1]);
+					// 关闭回调PaymentCallback::query()->whereTradeNo($payment->trade_no)->update(['status' => 0]);
 
 					// 关闭订单
 					Order::query()->whereOid($payment->oid)->update(['status' => -1]);

+ 44 - 17
app/Http/Controllers/Gateway/AbstractPayment.php

@@ -6,6 +6,7 @@ use App\Components\Helpers;
 use App\Models\Goods;
 use App\Models\Order;
 use App\Models\Payment;
+use App\Models\PaymentCallback;
 use App\Models\ReferralLog;
 use App\Models\User;
 use Illuminate\Http\Request;
@@ -18,24 +19,11 @@ abstract class AbstractPayment {
 		self::$systemConfig = Helpers::systemConfig();
 	}
 
-	public static function generateGuid() {
-		mt_srand((double) microtime() * 10000);
-		$charId = strtoupper(md5(uniqid(mt_rand() + time(), true)));
-		$hyphen = chr(45);
-		$uuid = chr(123).substr($charId, 0, 8).$hyphen.substr($charId, 8, 4).$hyphen.substr($charId, 12,
-				4).$hyphen.substr($charId, 16, 4).$hyphen.substr($charId, 20, 12).chr(125);
-
-		$uuid = str_replace(['}', '{', '-'], '', $uuid);
-		$uuid = substr($uuid, 0, 8);
-
-		return $uuid;
-	}
-
 	abstract public function purchase(Request $request);
 
 	abstract public function notify(Request $request);
 
-	public function postPayment($data, $method) {
+	protected function postPayment($data, $method) {
 		// 获取需要的信息
 		$payment = Payment::whereTradeNo($data)->first();
 		// 是否为余额购买套餐
@@ -49,8 +37,8 @@ abstract class AbstractPayment {
 		$user = User::find($order->user_id);
 
 		//余额充值
-		if($order->goods_id == -1){
-			Order::query()->whereOid($order->oid)->update(['status'=>2]);
+		if($order->goods_id == 0 || $order->goods_id == NULL){
+			Order::query()->whereOid($order->oid)->update(['status' => 2]);
 			User::query()->whereId($order->user_id)->increment('credit', $order->amount * 100);
 			// 余额变动记录日志
 			Helpers::addUserCreditLog($order->user_id, $order->oid, $order->user->credit,
@@ -62,7 +50,7 @@ abstract class AbstractPayment {
 		// 商品为流量或者套餐
 		switch($goods->type){
 			case 1:
-				Order::query()->whereOid($order->oid)->update(['status'=>2]);
+				Order::query()->whereOid($order->oid)->update(['status' => 2]);
 				User::query()->whereId($order->user_id)->increment('transfer_enable', $goods->traffic * MB);
 				Helpers::addUserTrafficModifyLog($order->user_id, $order->oid, $user->transfer_enable,
 					$user->transfer_enable + $goods->traffic * MB, '['.$method.']加上用户购买的套餐流量');
@@ -169,4 +157,43 @@ abstract class AbstractPayment {
 
 		return $log->save();
 	}
+
+	protected function creatNewPayment($uid, $oid, $amount) {
+		$payment = new Payment();
+		$payment->trade_no = self::generateGuid();
+		$payment->user_id = $uid;
+		$payment->oid = $oid;
+		$payment->amount = $amount;
+		$payment->save();
+
+		return $payment;
+	}
+
+	public static function generateGuid() {
+		mt_srand((double) microtime() * 10000);
+		$charId = strtoupper(md5(uniqid(mt_rand() + time(), true)));
+		$hyphen = chr(45);
+		$uuid = chr(123).substr($charId, 0, 8).$hyphen.substr($charId, 8, 4).$hyphen.substr($charId, 12,
+				4).$hyphen.substr($charId, 16, 4).$hyphen.substr($charId, 20, 12).chr(125);
+
+		$uuid = str_replace(['}', '{', '-'], '', $uuid);
+		$uuid = substr($uuid, 0, 8);
+
+		return $uuid;
+	}
+
+	/**
+	 * @param  string  $trade_no      本地订单号
+	 * @param  string  $out_trade_no  外部订单号
+	 * @param  int     $amount        交易金额
+	 * @return int
+	 */
+	protected function addPamentCallback($trade_no, $out_trade_no, $amount) {
+		$log = new PaymentCallback();
+		$log->trade_no = $trade_no;
+		$log->out_trade_no = $out_trade_no;
+		$log->amount = $amount;
+
+		return $log->save();
+	}
 }

+ 3 - 16
app/Http/Controllers/Gateway/BitpayX.php

@@ -1,29 +1,16 @@
 <?php
 
-
 namespace App\Http\Controllers\Gateway;
 
-
 use App\Models\Payment;
 use Auth;
-use Illuminate\Http\Request;
 use Response;
 
 class BitpayX extends AbstractPayment {
 	private $bitpayGatewayUri = 'https://api.mugglepay.com/v1/';
 
-	/**
-	 * @param  Request  $request
-	 *
-	 * @return mixed
-	 */
-	public function purchase(Request $request) {
-		$payment = new Payment();
-		$payment->trade_no = self::generateGuid();
-		$payment->user_id = Auth::id();
-		$payment->oid = $request->input('oid');
-		$payment->amount = $request->input('amount');
-		$payment->save();
+	public function purchase($request) {
+		$payment = $this->creatNewPayment(Auth::id(),$request->input('oid'),$request->input('amount'));
 
 		$data = [
 			'merchant_order_id' => $payment->trade_no,
@@ -95,7 +82,7 @@ class BitpayX extends AbstractPayment {
 		return $data;
 	}
 
-	public function notify(Request $request) {
+	public function notify($request) {
 		$inputString = file_get_contents('php://input', 'r');
 		$inputStripped = str_replace(["\r", "\n", "\t", "\v"], '', $inputString);
 		$inputJSON = json_decode($inputStripped, true); //convert JSON into array

+ 1 - 6
app/Http/Controllers/Gateway/CodePay.php

@@ -8,12 +8,7 @@ use Response;
 
 class CodePay extends AbstractPayment {
 	public function purchase($request) {
-		$payment = new Payment();
-		$payment->trade_no = self::generateGuid();
-		$payment->user_id = Auth::id();
-		$payment->oid = $request->input('oid');
-		$payment->amount = $request->input('amount');
-		$payment->save();
+		$payment = $this->creatNewPayment(Auth::id(),$request->input('oid'),$request->input('amount'));
 
 		$data = [
 			'id'         => parent::$systemConfig['codepay_id'],

+ 2 - 7
app/Http/Controllers/Gateway/F2Fpay.php

@@ -30,12 +30,7 @@ class F2Fpay extends AbstractPayment {
 	}
 
 	public function purchase($request) {
-		$payment = new Payment();
-		$payment->trade_no = self::generateGuid();
-		$payment->user_id = Auth::id();
-		$payment->oid = $request->input('oid');
-		$payment->amount = $request->input('amount');
-		$payment->save();
+		$payment = $this->creatNewPayment(Auth::id(),$request->input('oid'),$request->input('amount'));
 
 		$data = [
 			'body'        => '',
@@ -60,7 +55,7 @@ class F2Fpay extends AbstractPayment {
 		}
 
 		Payment::whereId($payment->id)
-		       ->update(['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
+		       ->update(['qr_code' => 'http://qr.topscan.com/api.php?text='.urlencode($result['qr_code']).'&el=1&w=400&m=10&logo=https://t.alipayobjects.com/tfscom/T1Z5XfXdxmXXXXXXXX.png']);//后备:https://cli.im/api/qrcode/code?text=".$result['qr_code']."&mhid=5EfGCwztyckhMHcmI9ZcOKs
 
 		return Response::json(['status' => 'success', 'data' => $payment->trade_no, 'message' => '创建订单成功!']);
 	}

+ 2 - 5
app/Http/Controllers/Gateway/Local.php

@@ -8,11 +8,10 @@ use App\Models\Goods;
 use App\Models\Order;
 use App\Models\User;
 use Auth;
-use Illuminate\Http\Request;
 use Response;
 
 class Local extends AbstractPayment {
-	public function purchase(Request $request) {
+	public function purchase($request) {
 		$amount = $request->input('amount');
 		$order = Order::whereOid($request->input('oid'))->first();
 		$goods = Goods::query()->whereStatus(1)->whereId($request->input('goods_id'))->first();
@@ -30,7 +29,5 @@ class Local extends AbstractPayment {
 		return Response::json(['status' => 'success', 'message' => '购买完成!']);
 	}
 
-	public function notify(Request $request) {
-		// TODO: Implement notify() method.
-	}
+	public function notify($request) { }
 }

+ 11 - 14
app/Http/Controllers/Gateway/PayJs.php

@@ -4,7 +4,6 @@ namespace App\Http\Controllers\Gateway;
 
 use App\Models\Payment;
 use Auth;
-use Log;
 use Response;
 use Xhat\Payjs\Payjs as Pay;
 
@@ -20,27 +19,22 @@ class PayJs extends AbstractPayment {
 	}
 
 	public function purchase($request) {
-		$payment = new Payment();
-		$payment->trade_no = self::generateGuid();
-		$payment->user_id = Auth::id();
-		$payment->oid = $request->input('oid');
-		$payment->amount = $request->input('amount');
-		$payment->save();
-
-		$result = (new Pay($this::$config))->native([
+		$payment = $this->creatNewPayment(Auth::id(), $request->input('oid'), $request->input('amount'));
+
+		$result = (new Pay($this::$config))->cashier([
 			'body'         => parent::$systemConfig['subject_name']?: parent::$systemConfig['website_name'],
 			'total_fee'    => $payment->amount * 100,
 			'out_trade_no' => $payment->trade_no,
-			'attach'       => '',
 			'notify_url'   => (parent::$systemConfig['website_callback_url']?: parent::$systemConfig['website_url']).'/callback/notify?method=payjs',
 		]);
 
-		if($result['return_code'] != 1){
-			Log::error('PayJs '.$result['return_msg']);
-		}
 		// 获取收款二维码内容
-		Payment::whereId($payment->id)->update(['qr_code' => $result['qrcode']]);
+		Payment::whereId($payment->id)->update([
+			'url'     => $result,
+			'qr_code' => 'http://qr.topscan.com/api.php?text='.urlencode($result).'&el=1&w=400&m=10&logo='.parent::$systemConfig['website_url'].'/assets/images/payment/wechat.png'
+		]);
 
+		//$this->addPamentCallback($payment->trade_no, null, $payment->amount * 100);
 		return Response::json(['status' => 'success', 'data' => $payment->trade_no, 'message' => '创建订单成功!']);
 	}
 
@@ -48,6 +42,9 @@ class PayJs extends AbstractPayment {
 		$data = (new Pay($this::$config))->notify();
 
 		if($data['return_code'] == 1){
+			//			PaymentCallback::query()
+			//			               ->whereTradeNo($data['out_trade_no'])
+			//			               ->update(['out_trade_no' => $data['payjs_order_id'], 'status' => 1]);
 			$this::postPayment($data['out_trade_no'], 'PayJs');
 			exit("success");
 		}

+ 3 - 8
app/Http/Controllers/Gateway/PayPal.php

@@ -48,13 +48,8 @@ class PayPal extends AbstractPayment {
 		}
 	}
 
-	public function purchase(Request $request) {
-		$payment = new Payment();
-		$payment->trade_no = self::generateGuid();
-		$payment->user_id = Auth::id();
-		$payment->oid = $request->input('oid');
-		$payment->amount = $request->input('amount');
-		$payment->save();
+	public function purchase($request) {
+		$payment = $this->creatNewPayment(Auth::id(), $request->input('oid'), $request->input('amount'));
 
 		$data = $this->getCheckoutData($payment->trade_no, $payment->amount);
 
@@ -119,7 +114,7 @@ class PayPal extends AbstractPayment {
 		return redirect('/invoices');
 	}
 
-	public function notify(Request $request) {
+	public function notify($request) {
 		$request->merge(['cmd' => '_notify-validate']);
 		foreach($request->input() as $key => $value){
 			if($value == null){

+ 21 - 9
app/Http/Controllers/PaymentController.php

@@ -59,14 +59,6 @@ class PaymentController extends Controller {
 		}
 	}
 
-	public static function returnHTML(Request $request) {
-		return self::getClient()->getReturnHTML($request);
-	}
-
-	public static function purchaseHTML() {
-		return Response::view('user.components.purchase');
-	}
-
 	public static function getStatus(Request $request) {
 		$payment = Payment::whereTradeNo($request->input('trade_no'))->first();
 		if($payment){
@@ -171,7 +163,7 @@ class PaymentController extends Controller {
 		$order = new Order();
 		$order->order_sn = $orderSn;
 		$order->user_id = Auth::id();
-		$order->goods_id = $credit? -1 : $goods_id;
+		$order->goods_id = $credit? 0 : $goods_id;
 		$order->coupon_id = !empty($coupon)? $coupon->id : 0;
 		$order->origin_amount = $credit?: $goods->price;
 		$order->amount = $amount;
@@ -196,6 +188,26 @@ class PaymentController extends Controller {
 		return self::getClient()->purchase($request);
 	}
 
+	public function close($oid) {
+		$order = Order::query()->whereOid($oid)->first();
+		$payment = Payment::query()->whereOid($oid)->first();
+		if($order){
+			$ret = Order::query()->whereOid($oid)->update(['status' => -1]);
+			if(!$ret){
+				return Response::json(['status' => 'fail', 'message' => '关闭订单失败']);
+			}
+		}else{
+			return Response::json(['status' => 'fail', 'message' => '未找到订单']);
+		}
+		if($payment){
+			$ret = Payment::query()->whereOid($oid)->update(['status' => -1]);
+			if(!$ret){
+				return Response::json(['status' => 'fail', 'message' => '关闭在线订单失败']);
+			}
+		}
+		return Response::json(['status' => 'success', 'message' => '关闭订单成功']);
+	}
+
 	// 支付单详情
 	public function detail($trade_no) {
 		$payment = Payment::uid()->with(['order', 'order.goods'])->whereTradeNo($trade_no)->first();

+ 0 - 2
app/Http/Controllers/UserController.php

@@ -302,7 +302,6 @@ class UserController extends Controller {
 		// 有重置日时按照重置日为标准,否者就以过期日为标准
 		$dataPlusDays = $user->reset_time? $user->reset_time : $user->expire_time;
 		$view['dataPlusDays'] = $dataPlusDays > date('Y-m-d')? round((strtotime($dataPlusDays) - strtotime(date('Y-m-d'))) / Day) : 0;
-		$view['purchaseHTML'] = PaymentController::purchaseHTML();
 
 		return Response::view('user.services', $view);
 	}
@@ -559,7 +558,6 @@ class UserController extends Controller {
 			                           $q->whereType(2);
 		                           })
 		                           ->exists();
-		$view['purchaseHTML'] = PaymentController::purchaseHTML();
 		$view['goods'] = $goods;
 
 		return Response::view('user.buy', $view);

+ 1 - 2
app/Http/Middleware/WebApi.php

@@ -3,11 +3,10 @@
 namespace App\Http\Middleware;
 
 use Closure;
-use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
 use Illuminate\Http\Request;
 use Response;
 
-class WebApi extends Middleware {
+class WebApi{
 	/**
 	 * Handle an incoming request.
 	 *

+ 3 - 3
composer.json

@@ -28,12 +28,12 @@
     "misechow/no-captcha": "^1.0",
     "openlss/lib-array2xml": "^1.0",
     "overtrue/laravel-lang": "^3.0",
-    "phpoffice/phpspreadsheet": "^1.11",
+    "phpoffice/phpspreadsheet": "^1.13",
     "predis/predis": "^1.1",
-    "rap2hpoutre/laravel-log-viewer": "^1.5",
+    "rap2hpoutre/laravel-log-viewer": "^1.6",
     "riverslei/payment": "*",
     "scyllaly/hcaptcha": "^4.1",
-    "spatie/laravel-permission": "^3.11",
+    "spatie/laravel-permission": "^3.13",
     "srmklive/paypal": "~1.0",
     "xhat/payjs": "^1.4"
   },

+ 167 - 144
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": "2e58b1a54b626dad916eeb405654defa",
+    "content-hash": "59fe960ac16eef546fe52b6a61a09322",
     "packages": [
         {
             "name": "barryvdh/laravel-debugbar",
@@ -325,16 +325,16 @@
         },
         {
             "name": "composer/composer",
-            "version": "1.10.7",
+            "version": "1.10.8",
             "source": {
                 "type": "git",
                 "url": "https://github.com/composer/composer.git",
-                "reference": "956608ea4f7de9e58c53dfb019d85ae62b193c39"
+                "reference": "56e0e094478f30935e9128552188355fa9712291"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/composer/composer/zipball/956608ea4f7de9e58c53dfb019d85ae62b193c39",
-                "reference": "956608ea4f7de9e58c53dfb019d85ae62b193c39",
+                "url": "https://api.github.com/repos/composer/composer/zipball/56e0e094478f30935e9128552188355fa9712291",
+                "reference": "56e0e094478f30935e9128552188355fa9712291",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -359,12 +359,11 @@
                 "symfony/process": "^2.7 || ^3.0 || ^4.0 || ^5.0"
             },
             "conflict": {
-                "symfony/console": "2.8.38",
-                "symfony/phpunit-bridge": "3.4.40"
+                "symfony/console": "2.8.38"
             },
             "require-dev": {
                 "phpspec/prophecy": "^1.10",
-                "symfony/phpunit-bridge": "^3.4"
+                "symfony/phpunit-bridge": "^4.2"
             },
             "suggest": {
                 "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages",
@@ -408,7 +407,7 @@
                 "dependency",
                 "package"
             ],
-            "time": "2020-06-03T08:03:56+00:00"
+            "time": "2020-06-24T19:23:30+00:00"
         },
         {
             "name": "composer/semver",
@@ -1116,16 +1115,16 @@
         },
         {
             "name": "egulias/email-validator",
-            "version": "2.1.17",
+            "version": "2.1.18",
             "source": {
                 "type": "git",
                 "url": "https://github.com/egulias/EmailValidator.git",
-                "reference": "ade6887fd9bd74177769645ab5c474824f8a418a"
+                "reference": "cfa3d44471c7f5bfb684ac2b0da7114283d78441"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ade6887fd9bd74177769645ab5c474824f8a418a",
-                "reference": "ade6887fd9bd74177769645ab5c474824f8a418a",
+                "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/cfa3d44471c7f5bfb684ac2b0da7114283d78441",
+                "reference": "cfa3d44471c7f5bfb684ac2b0da7114283d78441",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -1155,7 +1154,7 @@
             },
             "autoload": {
                 "psr-4": {
-                    "Egulias\\EmailValidator\\": "EmailValidator"
+                    "Egulias\\EmailValidator\\": "src"
                 }
             },
             "notification-url": "https://packagist.org/downloads/",
@@ -1176,7 +1175,7 @@
                 "validation",
                 "validator"
             ],
-            "time": "2020-02-13T22:36:52+00:00"
+            "time": "2020-06-16T20:11:17+00:00"
         },
         {
             "name": "erusev/parsedown",
@@ -1285,16 +1284,16 @@
         },
         {
             "name": "fideloper/proxy",
-            "version": "4.3.0",
+            "version": "4.4.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/fideloper/TrustedProxy.git",
-                "reference": "ec38ad69ee378a1eec04fb0e417a97cfaf7ed11a"
+                "reference": "9beebf48a1c344ed67c1d36bb1b8709db7c3c1a8"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/ec38ad69ee378a1eec04fb0e417a97cfaf7ed11a",
-                "reference": "ec38ad69ee378a1eec04fb0e417a97cfaf7ed11a",
+                "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/9beebf48a1c344ed67c1d36bb1b8709db7c3c1a8",
+                "reference": "9beebf48a1c344ed67c1d36bb1b8709db7c3c1a8",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -1341,20 +1340,20 @@
                 "proxy",
                 "trusted proxy"
             ],
-            "time": "2020-02-22T01:51:47+00:00"
+            "time": "2020-06-23T01:36:47+00:00"
         },
         {
             "name": "guzzlehttp/guzzle",
-            "version": "6.5.4",
+            "version": "6.5.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/guzzle/guzzle.git",
-                "reference": "a4a1b6930528a8f7ee03518e6442ec7a44155d9d"
+                "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/a4a1b6930528a8f7ee03518e6442ec7a44155d9d",
-                "reference": "a4a1b6930528a8f7ee03518e6442ec7a44155d9d",
+                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e",
+                "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -1368,7 +1367,7 @@
                 "guzzlehttp/promises": "^1.0",
                 "guzzlehttp/psr7": "^1.6.1",
                 "php": ">=5.5",
-                "symfony/polyfill-intl-idn": "1.17.0"
+                "symfony/polyfill-intl-idn": "^1.17.0"
             },
             "require-dev": {
                 "ext-curl": "*",
@@ -1414,7 +1413,7 @@
                 "rest",
                 "web service"
             ],
-            "time": "2020-05-25T19:35:05+00:00"
+            "time": "2020-06-16T21:01:06+00:00"
         },
         {
             "name": "guzzlehttp/promises",
@@ -1840,16 +1839,16 @@
         },
         {
             "name": "jaybizzle/crawler-detect",
-            "version": "v1.2.95",
+            "version": "v1.2.96",
             "source": {
                 "type": "git",
                 "url": "https://github.com/JayBizzle/Crawler-Detect.git",
-                "reference": "a7936c4b60c78f8ae9024eeecf7e8d4cf470b730"
+                "reference": "5a53c78644c54a628c3f5ead915c35b489c92239"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/a7936c4b60c78f8ae9024eeecf7e8d4cf470b730",
-                "reference": "a7936c4b60c78f8ae9024eeecf7e8d4cf470b730",
+                "url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/5a53c78644c54a628c3f5ead915c35b489c92239",
+                "reference": "5a53c78644c54a628c3f5ead915c35b489c92239",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -1891,20 +1890,20 @@
                 "crawlerdetect",
                 "php crawler detect"
             ],
-            "time": "2020-04-14T20:42:56+00:00"
+            "time": "2020-06-14T20:37:24+00:00"
         },
         {
             "name": "jenssegers/agent",
-            "version": "v2.6.3",
+            "version": "v2.6.4",
             "source": {
                 "type": "git",
                 "url": "https://github.com/jenssegers/agent.git",
-                "reference": "bcb895395e460478e101f41cdab139c48dc721ce"
+                "reference": "daa11c43729510b3700bc34d414664966b03bffe"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/jenssegers/agent/zipball/bcb895395e460478e101f41cdab139c48dc721ce",
-                "reference": "bcb895395e460478e101f41cdab139c48dc721ce",
+                "url": "https://api.github.com/repos/jenssegers/agent/zipball/daa11c43729510b3700bc34d414664966b03bffe",
+                "reference": "daa11c43729510b3700bc34d414664966b03bffe",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -1923,7 +1922,7 @@
                 "phpunit/phpunit": "^5.0|^6.0|^7.0"
             },
             "suggest": {
-                "illuminate/support": "^4.0|^5.0"
+                "illuminate/support": "Required for laravel service providers"
             },
             "type": "library",
             "extra": {
@@ -1966,7 +1965,7 @@
                 "user agent",
                 "useragent"
             ],
-            "time": "2019-01-19T21:32:55+00:00"
+            "time": "2020-06-13T08:05:20+00:00"
         },
         {
             "name": "justinrainbow/json-schema",
@@ -3321,16 +3320,16 @@
         },
         {
             "name": "opis/closure",
-            "version": "3.5.3",
+            "version": "3.5.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/opis/closure.git",
-                "reference": "cac47092144043d5d676e2e7cf8d0d2f83fc89ca"
+                "reference": "dec9fc5ecfca93f45cd6121f8e6f14457dff372c"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/opis/closure/zipball/cac47092144043d5d676e2e7cf8d0d2f83fc89ca",
-                "reference": "cac47092144043d5d676e2e7cf8d0d2f83fc89ca",
+                "url": "https://api.github.com/repos/opis/closure/zipball/dec9fc5ecfca93f45cd6121f8e6f14457dff372c",
+                "reference": "dec9fc5ecfca93f45cd6121f8e6f14457dff372c",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -3384,7 +3383,7 @@
                 "serialization",
                 "serialize"
             ],
-            "time": "2020-05-25T09:32:45+00:00"
+            "time": "2020-06-17T14:59:55+00:00"
         },
         {
             "name": "overtrue/laravel-lang",
@@ -3590,16 +3589,16 @@
         },
         {
             "name": "phpoption/phpoption",
-            "version": "1.7.3",
+            "version": "1.7.4",
             "source": {
                 "type": "git",
                 "url": "https://github.com/schmittjoh/php-option.git",
-                "reference": "4acfd6a4b33a509d8c88f50e5222f734b6aeebae"
+                "reference": "b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/4acfd6a4b33a509d8c88f50e5222f734b6aeebae",
-                "reference": "4acfd6a4b33a509d8c88f50e5222f734b6aeebae",
+                "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3",
+                "reference": "b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -3647,7 +3646,7 @@
                 "php",
                 "type"
             ],
-            "time": "2020-03-21T18:07:53+00:00"
+            "time": "2020-06-07T10:40:07+00:00"
         },
         {
             "name": "predis/predis",
@@ -4633,7 +4632,7 @@
         },
         {
             "name": "symfony/console",
-            "version": "v4.4.9",
+            "version": "v4.4.10",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/console.git",
@@ -4716,7 +4715,7 @@
         },
         {
             "name": "symfony/css-selector",
-            "version": "v5.1.0",
+            "version": "v5.1.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/css-selector.git",
@@ -4775,7 +4774,7 @@
         },
         {
             "name": "symfony/debug",
-            "version": "v4.4.9",
+            "version": "v4.4.10",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/debug.git",
@@ -4838,7 +4837,7 @@
         },
         {
             "name": "symfony/error-handler",
-            "version": "v4.4.9",
+            "version": "v4.4.10",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/error-handler.git",
@@ -4901,7 +4900,7 @@
         },
         {
             "name": "symfony/event-dispatcher",
-            "version": "v4.4.9",
+            "version": "v4.4.10",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/event-dispatcher.git",
@@ -5041,7 +5040,7 @@
         },
         {
             "name": "symfony/filesystem",
-            "version": "v5.1.0",
+            "version": "v5.1.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/filesystem.git",
@@ -5097,7 +5096,7 @@
         },
         {
             "name": "symfony/finder",
-            "version": "v4.4.9",
+            "version": "v4.4.10",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/finder.git",
@@ -5152,7 +5151,7 @@
         },
         {
             "name": "symfony/http-foundation",
-            "version": "v4.4.9",
+            "version": "v4.4.10",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/http-foundation.git",
@@ -5213,16 +5212,16 @@
         },
         {
             "name": "symfony/http-kernel",
-            "version": "v4.4.9",
+            "version": "v4.4.10",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/http-kernel.git",
-                "reference": "54526b598d7fc86a67850488b194a88a79ab8467"
+                "reference": "81d42148474e1852a333ed7a732f2a014af75430"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/http-kernel/zipball/54526b598d7fc86a67850488b194a88a79ab8467",
-                "reference": "54526b598d7fc86a67850488b194a88a79ab8467",
+                "url": "https://api.github.com/repos/symfony/http-kernel/zipball/81d42148474e1852a333ed7a732f2a014af75430",
+                "reference": "81d42148474e1852a333ed7a732f2a014af75430",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -5306,20 +5305,20 @@
             ],
             "description": "Symfony HttpKernel Component",
             "homepage": "https://symfony.com",
-            "time": "2020-05-31T05:25:51+00:00"
+            "time": "2020-06-12T11:15:37+00:00"
         },
         {
             "name": "symfony/mime",
-            "version": "v5.1.0",
+            "version": "v5.1.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/mime.git",
-                "reference": "56261f89385f9d13cf843a5101ac72131190bc91"
+                "reference": "c0c418f05e727606e85b482a8591519c4712cf45"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/mime/zipball/56261f89385f9d13cf843a5101ac72131190bc91",
-                "reference": "56261f89385f9d13cf843a5101ac72131190bc91",
+                "url": "https://api.github.com/repos/symfony/mime/zipball/c0c418f05e727606e85b482a8591519c4712cf45",
+                "reference": "c0c418f05e727606e85b482a8591519c4712cf45",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -5375,20 +5374,20 @@
                 "mime",
                 "mime-type"
             ],
-            "time": "2020-05-25T12:33:44+00:00"
+            "time": "2020-06-09T15:07:35+00:00"
         },
         {
             "name": "symfony/polyfill-ctype",
-            "version": "v1.17.0",
+            "version": "v1.17.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-ctype.git",
-                "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9"
+                "reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e94c8b1bbe2bc77507a1056cdb06451c75b427f9",
-                "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9",
+                "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d",
+                "reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -5407,6 +5406,10 @@
             "extra": {
                 "branch-alias": {
                     "dev-master": "1.17-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
                 }
             },
             "autoload": {
@@ -5439,20 +5442,20 @@
                 "polyfill",
                 "portable"
             ],
-            "time": "2020-05-12T16:14:59+00:00"
+            "time": "2020-06-06T08:46:27+00:00"
         },
         {
             "name": "symfony/polyfill-iconv",
-            "version": "v1.17.0",
+            "version": "v1.17.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-iconv.git",
-                "reference": "c4de7601eefbf25f9d47190abe07f79fe0a27424"
+                "reference": "ba6c9c18db36235b859cc29b8372d1c01298c035"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/c4de7601eefbf25f9d47190abe07f79fe0a27424",
-                "reference": "c4de7601eefbf25f9d47190abe07f79fe0a27424",
+                "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/ba6c9c18db36235b859cc29b8372d1c01298c035",
+                "reference": "ba6c9c18db36235b859cc29b8372d1c01298c035",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -5471,6 +5474,10 @@
             "extra": {
                 "branch-alias": {
                     "dev-master": "1.17-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
                 }
             },
             "autoload": {
@@ -5504,20 +5511,20 @@
                 "portable",
                 "shim"
             ],
-            "time": "2020-05-12T16:47:27+00:00"
+            "time": "2020-06-06T08:46:27+00:00"
         },
         {
             "name": "symfony/polyfill-intl-idn",
-            "version": "v1.17.0",
+            "version": "v1.17.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-intl-idn.git",
-                "reference": "3bff59ea7047e925be6b7f2059d60af31bb46d6a"
+                "reference": "a57f8161502549a742a63c09f0a604997bf47027"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/3bff59ea7047e925be6b7f2059d60af31bb46d6a",
-                "reference": "3bff59ea7047e925be6b7f2059d60af31bb46d6a",
+                "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a57f8161502549a742a63c09f0a604997bf47027",
+                "reference": "a57f8161502549a742a63c09f0a604997bf47027",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -5538,6 +5545,10 @@
             "extra": {
                 "branch-alias": {
                     "dev-master": "1.17-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
                 }
             },
             "autoload": {
@@ -5572,20 +5583,20 @@
                 "portable",
                 "shim"
             ],
-            "time": "2020-05-12T16:47:27+00:00"
+            "time": "2020-06-06T08:46:27+00:00"
         },
         {
             "name": "symfony/polyfill-mbstring",
-            "version": "v1.17.0",
+            "version": "v1.17.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-mbstring.git",
-                "reference": "fa79b11539418b02fc5e1897267673ba2c19419c"
+                "reference": "7110338d81ce1cbc3e273136e4574663627037a7"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fa79b11539418b02fc5e1897267673ba2c19419c",
-                "reference": "fa79b11539418b02fc5e1897267673ba2c19419c",
+                "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7110338d81ce1cbc3e273136e4574663627037a7",
+                "reference": "7110338d81ce1cbc3e273136e4574663627037a7",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -5604,6 +5615,10 @@
             "extra": {
                 "branch-alias": {
                     "dev-master": "1.17-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
                 }
             },
             "autoload": {
@@ -5637,7 +5652,7 @@
                 "portable",
                 "shim"
             ],
-            "time": "2020-05-12T16:47:27+00:00"
+            "time": "2020-06-06T08:46:27+00:00"
         },
         {
             "name": "symfony/polyfill-php72",
@@ -5702,16 +5717,16 @@
         },
         {
             "name": "symfony/polyfill-php73",
-            "version": "v1.17.0",
+            "version": "v1.17.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-php73.git",
-                "reference": "a760d8964ff79ab9bf057613a5808284ec852ccc"
+                "reference": "fa0837fe02d617d31fbb25f990655861bb27bd1a"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a760d8964ff79ab9bf057613a5808284ec852ccc",
-                "reference": "a760d8964ff79ab9bf057613a5808284ec852ccc",
+                "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fa0837fe02d617d31fbb25f990655861bb27bd1a",
+                "reference": "fa0837fe02d617d31fbb25f990655861bb27bd1a",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -5727,6 +5742,10 @@
             "extra": {
                 "branch-alias": {
                     "dev-master": "1.17-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
                 }
             },
             "autoload": {
@@ -5762,20 +5781,20 @@
                 "portable",
                 "shim"
             ],
-            "time": "2020-05-12T16:47:27+00:00"
+            "time": "2020-06-06T08:46:27+00:00"
         },
         {
             "name": "symfony/polyfill-php80",
-            "version": "v1.17.0",
+            "version": "v1.17.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-php80.git",
-                "reference": "5e30b2799bc1ad68f7feb62b60a73743589438dd"
+                "reference": "4a5b6bba3259902e386eb80dd1956181ee90b5b2"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/5e30b2799bc1ad68f7feb62b60a73743589438dd",
-                "reference": "5e30b2799bc1ad68f7feb62b60a73743589438dd",
+                "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4a5b6bba3259902e386eb80dd1956181ee90b5b2",
+                "reference": "4a5b6bba3259902e386eb80dd1956181ee90b5b2",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -5791,6 +5810,10 @@
             "extra": {
                 "branch-alias": {
                     "dev-master": "1.17-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
                 }
             },
             "autoload": {
@@ -5830,11 +5853,11 @@
                 "portable",
                 "shim"
             ],
-            "time": "2020-05-12T16:47:27+00:00"
+            "time": "2020-06-06T08:46:27+00:00"
         },
         {
             "name": "symfony/process",
-            "version": "v4.4.9",
+            "version": "v4.4.10",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/process.git",
@@ -5889,7 +5912,7 @@
         },
         {
             "name": "symfony/routing",
-            "version": "v4.4.9",
+            "version": "v4.4.10",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/routing.git",
@@ -6035,7 +6058,7 @@
         },
         {
             "name": "symfony/translation",
-            "version": "v4.4.9",
+            "version": "v4.4.10",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/translation.git",
@@ -6180,7 +6203,7 @@
         },
         {
             "name": "symfony/var-dumper",
-            "version": "v4.4.9",
+            "version": "v4.4.10",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/var-dumper.git",
@@ -6318,16 +6341,16 @@
         },
         {
             "name": "vlucas/phpdotenv",
-            "version": "v3.6.5",
+            "version": "v3.6.6",
             "source": {
                 "type": "git",
                 "url": "https://github.com/vlucas/phpdotenv.git",
-                "reference": "8b64814b356b96a90d2bc942b152c80d8888b8d4"
+                "reference": "4669484ccbc38fe7c4e0c50456778f2010566aad"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/8b64814b356b96a90d2bc942b152c80d8888b8d4",
-                "reference": "8b64814b356b96a90d2bc942b152c80d8888b8d4",
+                "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/4669484ccbc38fe7c4e0c50456778f2010566aad",
+                "reference": "4669484ccbc38fe7c4e0c50456778f2010566aad",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -6338,13 +6361,13 @@
             },
             "require": {
                 "php": "^5.4 || ^7.0 || ^8.0",
-                "phpoption/phpoption": "^1.5",
-                "symfony/polyfill-ctype": "^1.9"
+                "phpoption/phpoption": "^1.5.2",
+                "symfony/polyfill-ctype": "^1.16"
             },
             "require-dev": {
                 "ext-filter": "*",
                 "ext-pcre": "*",
-                "phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0 || ^7.0"
+                "phpunit/phpunit": "^4.8.35 || ^5.7.27 || ^6.5.6 || ^7.0"
             },
             "suggest": {
                 "ext-filter": "Required to use the boolean validator.",
@@ -6383,7 +6406,7 @@
                 "env",
                 "environment"
             ],
-            "time": "2020-05-23T09:42:03+00:00"
+            "time": "2020-06-02T14:08:54+00:00"
         },
         {
             "name": "xhat/payjs",
@@ -6490,16 +6513,16 @@
         },
         {
             "name": "filp/whoops",
-            "version": "2.7.2",
+            "version": "2.7.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/filp/whoops.git",
-                "reference": "17d0d3f266c8f925ebd035cd36f83cf802b47d4a"
+                "reference": "5d5fe9bb3d656b514d455645b3addc5f7ba7714d"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/filp/whoops/zipball/17d0d3f266c8f925ebd035cd36f83cf802b47d4a",
-                "reference": "17d0d3f266c8f925ebd035cd36f83cf802b47d4a",
+                "url": "https://api.github.com/repos/filp/whoops/zipball/5d5fe9bb3d656b514d455645b3addc5f7ba7714d",
+                "reference": "5d5fe9bb3d656b514d455645b3addc5f7ba7714d",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -6553,7 +6576,7 @@
                 "throwable",
                 "whoops"
             ],
-            "time": "2020-05-05T12:28:07+00:00"
+            "time": "2020-06-14T09:00:00+00:00"
         },
         {
             "name": "fzaninotto/faker",
@@ -6741,16 +6764,16 @@
         },
         {
             "name": "myclabs/deep-copy",
-            "version": "1.9.5",
+            "version": "1.10.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/myclabs/DeepCopy.git",
-                "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef"
+                "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef",
-                "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef",
+                "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/969b211f9a51aa1f6c01d1d2aef56d3bd91598e5",
+                "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -6760,7 +6783,7 @@
                 ]
             },
             "require": {
-                "php": "^7.1"
+                "php": "^7.1 || ^8.0"
             },
             "replace": {
                 "myclabs/deep-copy": "self.version"
@@ -6791,7 +6814,7 @@
                 "object",
                 "object graph"
             ],
-            "time": "2020-01-17T21:11:47+00:00"
+            "time": "2020-06-29T13:22:24+00:00"
         },
         {
             "name": "nunomaduro/collision",
@@ -6979,16 +7002,16 @@
         },
         {
             "name": "phpdocumentor/reflection-common",
-            "version": "2.1.0",
+            "version": "2.2.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/phpDocumentor/ReflectionCommon.git",
-                "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b"
+                "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/6568f4687e5b41b054365f9ae03fcb1ed5f2069b",
-                "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b",
+                "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b",
+                "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -6998,12 +7021,12 @@
                 ]
             },
             "require": {
-                "php": ">=7.1"
+                "php": "^7.2 || ^8.0"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.x-dev"
+                    "dev-2.x": "2.x-dev"
                 }
             },
             "autoload": {
@@ -7030,7 +7053,7 @@
                 "reflection",
                 "static analysis"
             ],
-            "time": "2020-04-27T09:25:28+00:00"
+            "time": "2020-06-27T09:03:43+00:00"
         },
         {
             "name": "phpdocumentor/reflection-docblock",
@@ -7093,16 +7116,16 @@
         },
         {
             "name": "phpdocumentor/type-resolver",
-            "version": "1.1.0",
+            "version": "1.3.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/phpDocumentor/TypeResolver.git",
-                "reference": "7462d5f123dfc080dfdf26897032a6513644fc95"
+                "reference": "e878a14a65245fbe78f8080eba03b47c3b705651"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/7462d5f123dfc080dfdf26897032a6513644fc95",
-                "reference": "7462d5f123dfc080dfdf26897032a6513644fc95",
+                "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e878a14a65245fbe78f8080eba03b47c3b705651",
+                "reference": "e878a14a65245fbe78f8080eba03b47c3b705651",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -7112,17 +7135,16 @@
                 ]
             },
             "require": {
-                "php": "^7.2",
+                "php": "^7.2 || ^8.0",
                 "phpdocumentor/reflection-common": "^2.0"
             },
             "require-dev": {
-                "ext-tokenizer": "^7.2",
-                "mockery/mockery": "~1"
+                "ext-tokenizer": "*"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.x-dev"
+                    "dev-1.x": "1.x-dev"
                 }
             },
             "autoload": {
@@ -7141,7 +7163,7 @@
                 }
             ],
             "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
-            "time": "2020-02-18T18:59:58+00:00"
+            "time": "2020-06-27T10:12:23+00:00"
         },
         {
             "name": "phpspec/prophecy",
@@ -7496,16 +7518,16 @@
         },
         {
             "name": "phpunit/phpunit",
-            "version": "8.5.5",
+            "version": "8.5.8",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/phpunit.git",
-                "reference": "63dda3b212a0025d380a745f91bdb4d8c985adb7"
+                "reference": "34c18baa6a44f1d1fbf0338907139e9dce95b997"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/63dda3b212a0025d380a745f91bdb4d8c985adb7",
-                "reference": "63dda3b212a0025d380a745f91bdb4d8c985adb7",
+                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/34c18baa6a44f1d1fbf0338907139e9dce95b997",
+                "reference": "34c18baa6a44f1d1fbf0338907139e9dce95b997",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -7581,7 +7603,7 @@
                 "testing",
                 "xunit"
             ],
-            "time": "2020-05-22T13:51:52+00:00"
+            "time": "2020-06-22T07:06:58+00:00"
         },
         {
             "name": "sebastian/code-unit-reverse-lookup",
@@ -8318,16 +8340,16 @@
         },
         {
             "name": "webmozart/assert",
-            "version": "1.8.0",
+            "version": "1.9.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/webmozart/assert.git",
-                "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6"
+                "reference": "9dc4f203e36f2b486149058bade43c851dd97451"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/webmozart/assert/zipball/ab2cb0b3b559010b75981b1bdce728da3ee90ad6",
-                "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6",
+                "url": "https://api.github.com/repos/webmozart/assert/zipball/9dc4f203e36f2b486149058bade43c851dd97451",
+                "reference": "9dc4f203e36f2b486149058bade43c851dd97451",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -8341,6 +8363,7 @@
                 "symfony/polyfill-ctype": "^1.8"
             },
             "conflict": {
+                "phpstan/phpstan": "<0.12.20",
                 "vimeo/psalm": "<3.9.1"
             },
             "require-dev": {
@@ -8368,7 +8391,7 @@
                 "check",
                 "validate"
             ],
-            "time": "2020-04-18T12:12:48+00:00"
+            "time": "2020-06-16T10:16:42+00:00"
         }
     ],
     "aliases": [],

+ 1 - 0
resources/lang/en/home.php

@@ -61,6 +61,7 @@ return [
 	'recharge_credit'                 => 'Recharge Credit',
 	'payment_method'                  => 'charge method',
 	'close'                           => 'Close',
+	'cancel'                          => 'Cancel',
 	'redeem_score'                    => 'Redeem for bandwidth',
 	'redeem'                          => 'Redeem',
 	'redeem_info'                     => 'You have got :score points and can redeem :score M free bandwidth.',

+ 2 - 1
resources/lang/zh-CN/home.php

@@ -61,7 +61,8 @@ return [
 	'announcement'                    => '公告',
 	'recharge_credit'                 => '余额充值',
 	'payment_method'                  => '充值方式',
-	'close'                           => '取消',
+	'close'                           => '关闭',
+	'cancel'                          => '取消',
 	'redeem_score'                    => '兑换流量',
 	'redeem'                          => '立即兑换',
 	'redeem_info'                     => '您有 :score 积分,可兑换 :score M 免费流量。',

+ 2 - 1
resources/views/admin/config/system.blade.php

@@ -1211,7 +1211,7 @@
 										<div class="row">
 											<label class="col-md-3 col-form-label">PayJs</label>
 											<div class="col-md-7">
-												请到<a href="https://payjs.cn/dashboard/member" target="_blank">PayJs</a> 申请账号
+												请到<a href="https://payjs.cn/ref/zgxjnb" target="_blank">PayJs</a> 申请账号
 											</div>
 										</div>
 									</div>
@@ -1226,6 +1226,7 @@
 													</span>
 												</div>
 											</div>
+											<span class="text-help offset-md-3">在<a href="https://payjs.cn/dashboard/member" target="_blank">本界面</a>获取信息</span>
 										</div>
 									</div>
 									<div class="form-group col-lg-6">

+ 1 - 1
resources/views/admin/logs/orderList.blade.php

@@ -116,7 +116,7 @@
 								@endif
 							</td>
 							<td> {{$order->order_sn}}</td>
-							<td> {{$order->goods_id == -1? "余额充值" :$order->goods->name}} </td>
+							<td> {{empty($order->goods) ? ($order->goods_id == 0 ? '余额充值': trans('home.invoice_table_goods_deleted')) : $order->goods->name}} </td>
 							<td> {{$order->is_expire ? '已过期' : $order->expire_at}} </td>
 							<td> {{$order->coupon ? $order->coupon->name . ' - ' . $order->coupon->sn : ''}} </td>
 							<td> ¥{{$order->origin_amount}} </td>

+ 15 - 11
resources/views/user/components/purchase.blade.php

@@ -1,21 +1,25 @@
 @if(\App\Components\Helpers::systemConfig()['is_AliPay'])
-	<button class="btn btn-flat" onclick="pay('{{\App\Components\Helpers::systemConfig()['is_AliPay']}}','1')"><img
-				src="/assets/images/payment/alipay.svg" height="36px" alt="alipay"/></button>
+	<button class="btn btn-flat" onclick="pay('{{\App\Components\Helpers::systemConfig()['is_AliPay']}}','1')">
+		<img src="/assets/images/payment/alipay.svg" height="36px" alt="alipay"/>
+	</button>
 @endif
 @if(\App\Components\Helpers::systemConfig()['is_QQPay'])
-	<button class="btn btn-flat" onclick="pay('{{\App\Components\Helpers::systemConfig()['is_QQPay']}}','2')"><img
-				src="/assets/images/payment/qqpay.svg" height="36px" alt="qq"/></button>
+	<button class="btn btn-flat" onclick="pay('{{\App\Components\Helpers::systemConfig()['is_QQPay']}}','2')">
+		<img src="/assets/images/payment/qqpay.svg" height="36px" alt="qq"/>
+	</button>
 @endif
 @if(\App\Components\Helpers::systemConfig()['is_WeChatPay'])
-	<button class="btn btn-flat" onclick="pay('{{\App\Components\Helpers::systemConfig()['is_WeChatPay']}}','3')"><img
-				src="/assets/images/payment/wechatpay.svg" height="36px" alt="wechat"/></button>'
+	<button class="btn btn-flat" onclick="pay('{{\App\Components\Helpers::systemConfig()['is_WeChatPay']}}','3')">
+		<img src="/assets/images/payment/wechatpay.svg" height="36px" alt="wechat"/>
+	</button>'
 @endif
 @if(\App\Components\Helpers::systemConfig()['is_otherPay'] == 'bitpayx')
-	<button class="btn btn-flat" onclick="pay('{{\App\Components\Helpers::systemConfig()['is_otherPay']}}','')"><img
-				src="/assets/images/payment/btc.svg" height="36px" alt="other"/> <span
-				class="font-size-24 black"> 虚拟货币</span></button>'
+	<button class="btn btn-flat" onclick="pay('{{\App\Components\Helpers::systemConfig()['is_otherPay']}}','')">
+		<img src="/assets/images/payment/btc.svg" height="36px" alt="other"/>
+		<span class="font-size-24 black"> 虚拟货币</span>
+	</button>'
 @elseif(\App\Components\Helpers::systemConfig()['is_otherPay'] == 'paypal')
-	<button class="btn btn-flat" onclick="pay('{{\App\Components\Helpers::systemConfig()['is_otherPay']}}','')"><img
-				src="https://www.paypalobjects.com/webstatic/mktg/Logo/pp-logo-150px.png" height="32px" alt="PayPal"/>
+	<button class="btn btn-flat" onclick="pay('{{\App\Components\Helpers::systemConfig()['is_otherPay']}}','')">
+		<img src="https://www.paypalobjects.com/webstatic/mktg/Logo/pp-logo-150px.png" height="32px" alt="PayPal"/>
 	</button>'
 @endif

+ 1 - 1
resources/views/user/invoiceDetail.blade.php

@@ -58,7 +58,7 @@
 						<tbody>
 						<tr>
 							<td>
-								<h3>{{empty($order->goods) ? ($order->goods_id == -1 ? '余额充值': trans('home.invoice_table_goods_deleted')) : $order->goods->name}}</h3>
+								<h3>{{empty($order->goods) ? ($order->goods_id == 0 ? '余额充值': trans('home.invoice_table_goods_deleted')) : $order->goods->name}}</h3>
 							</td>
 							<td>
 								@if($order->goods)

+ 50 - 27
resources/views/user/invoices.blade.php

@@ -28,34 +28,30 @@
 						<tr>
 							<td>{{$loop->iteration}}</td>
 							<td><a href="/invoice/{{$order->order_sn}}" target="_blank">{{$order->order_sn}}</a></td>
-							<td>{{empty($order->goods) ? ($order->goods_id == -1 ? '余额充值': trans('home.invoice_table_goods_deleted')) : $order->goods->name}}</td>
+							<td>{{empty($order->goods) ? ($order->goods_id == 0 ? '余额充值': trans('home.invoice_table_goods_deleted')) : $order->goods->name}}</td>
 							<td>{{$order->pay_way === 1 ? trans('home.service_pay_button') : trans('home.online_pay')}}</td>
 							<td>¥{{$order->amount}}</td>
 							<td>{{$order->created_at}}</td>
-							<td>{{empty($order->goods) ? '' : $order->goods_id == -1 || $order->status == 3 ? '' : $order->expire_at}}</td>
+							<td>{{empty($order->goods) ? '' : $order->goods_id == 0 || $order->status == 3 ? '' : $order->expire_at}}</td>
 							<td>
 								@switch($order->status)
 									@case(-1)
 									<span class="badge badge-default">{{trans('home.invoice_status_closed')}}</span>
 									@break
 									@case(0)
-									<span
-											class="badge badge-danger">{{trans('home.invoice_status_wait_payment')}}</span>
+									<span class="badge badge-danger">{{trans('home.invoice_status_wait_payment')}}</span>
 									@break
 									@case(1)
 									<span class="badge badge-info">{{trans('home.invoice_status_wait_confirm')}}</span>
 									@break
 									@case(2)
-									@if ($order->goods_id == -1)
-										<span
-												class="badge badge-default">{{trans('home.invoice_status_payment_confirm')}}</span>
+									@if ($order->goods_id == 0)
+										<span class="badge badge-default">{{trans('home.invoice_status_payment_confirm')}}</span>
 									@else
 										@if($order->is_expire)
-											<span
-													class="badge badge-default">{{trans('home.invoice_table_expired')}}</span>
+											<span class="badge badge-default">{{trans('home.invoice_table_expired')}}</span>
 										@else
-											<span
-													class="badge badge-success">{{trans('home.invoice_table_active')}}</span>
+											<span class="badge badge-success">{{trans('home.invoice_table_active')}}</span>
 										@endif
 									@endif
 									@break
@@ -64,21 +60,21 @@
 							@break
 							@endswitch
 							<td>
-								@if($order->status == 0 && $order->payment)
-									@if($order->payment->url)
-										<a href="{{$order->payment->url}}" target="_blank"
-												class="btn btn-primary">{{trans('home.pay')}}</a>
-									@elseif($order->payment->trade_no)
-										<a href="/payment/{{$order->payment->trade_no}}" target="_blank"
-												class="btn btn-primary">{{trans('home.pay')}}</a>
+								<div class="btn-group">
+									@if($order->status == 0 && $order->payment)
+										@if($order->payment->qr_code)
+											<a href="/payment/{{$order->payment->trade_no}}" target="_blank" class="btn btn-primary">{{trans('home.pay')}}</a>
+										@elseif($order->payment->url)
+											<a href="{{$order->payment->url}}" target="_blank" class="btn btn-primary">{{trans('home.pay')}}</a>
+										@endif
+										<button onclick="closeOrder('{{$order->oid}}')" class="btn btn-danger">{{trans('home.cancel')}}</button>
+									@elseif ($order->status == 1)
+										<button onClick="window.location.reload();" class="btn btn-primary">
+											<i class="icon wb-refresh" aria-hidden="true"></i></button>
+									@elseif ($order->status == 3)
+										<button onclick="activeOrder('{{$order->oid}}')" class="btn btn-success">{{trans('home.invoice_table_start')}}</button>
 									@endif
-								@elseif ($order->status == 1)
-									<button onClick="window.location.reload();" class="btn btn-primary"><i
-												class="icon wb-refresh" aria-hidden="true"></i></button>
-								@elseif ($order->status == 3)
-									<button onclick="activeOrder('{{$order->oid}}')"
-											class="btn btn-success">{{trans('home.invoice_table_start')}}</button>
-								@endif
+								</div>
 							</td>
 						</tr>
 					@endforeach
@@ -99,8 +95,7 @@
 @endsection
 @section('script')
 	<script src="/assets/global/vendor/bootstrap-table/bootstrap-table.min.js" type="text/javascript"></script>
-	<script src="/assets/global/vendor/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js"
-			type="text/javascript"></script>
+	<script src="/assets/global/vendor/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js" type="text/javascript"></script>
 	<script type="text/javascript">
 		function activeOrder(oid) {
 			swal.fire({
@@ -130,5 +125,33 @@
 				}
 			})
 		}
+
+		function closeOrder(oid) {
+			swal.fire({
+				title: '关闭订单?',
+				type: 'warning',
+				showCancelButton: true,
+				cancelButtonText: '{{trans('home.ticket_close')}}',
+				confirmButtonText: '{{trans('home.ticket_confirm')}}',
+			}).then((result) => {
+				if (result.value) {
+					$.ajax({
+						type: "POST",
+						url: "payment/close/" + oid,
+						async: false,
+						data: {_token: '{{csrf_token()}}'},
+						dataType: 'json',
+						success: function (ret) {
+							if (ret.status === 'success') {
+								swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
+									.then(() => window.location.reload())
+							} else {
+								swal.fire({title: ret.message, type: 'error'});
+							}
+						}
+					});
+				}
+			})
+		}
 	</script>
 @endsection

+ 3 - 3
resources/views/user/payment.blade.php

@@ -3,8 +3,8 @@
 	<div class="page-content container">
 		<div class="panel panel-bordered">
 			<div class="panel-heading">
-				<h1 class="panel-title cyan-600"><i
-							class="icon wb-payment"></i>{{\App\Components\Helpers::systemConfig()['website_name']}}{{trans('home.online_pay')}}
+				<h1 class="panel-title cyan-600">
+					<i class="icon wb-payment"></i>{{\App\Components\Helpers::systemConfig()['website_name']}}{{trans('home.online_pay')}}
 				</h1>
 			</div>
 			<div class="panel-body border-primary">
@@ -12,7 +12,7 @@
 					<div class="col-2"></div>
 					<div class="alert alert-info col-8 text-center">
 						请扫描二维码进行支付
-{{--						请使用<strong class="red-600"> 支付宝 </strong>扫描二维码进行支付--}}
+						{{--						请使用<strong class="red-600"> 支付宝 </strong>扫描二维码进行支付--}}
 					</div>
 					<div class="col-2"></div>
 					<div class="col-2"></div>

+ 14 - 27
resources/views/user/services.blade.php

@@ -15,8 +15,7 @@
 						<div class="content-text text-center mb-0">
 							<span class="font-size-40 font-weight-100">{{Auth::getUser()->credit}}</span>
 							<br/>
-							<button class="btn btn-danger float-right mr-15" data-toggle="modal"
-									data-target="#charge_modal">{{trans('home.recharge')}}</button>
+							<button class="btn btn-danger float-right mr-15" data-toggle="modal" data-target="#charge_modal">{{trans('home.recharge')}}</button>
 						</div>
 					</div>
 				</div>
@@ -39,7 +38,8 @@
 			<div class="col-xxl-10 col-lg-9">
 				<div class="panel">
 					<div class="panel-heading p-20">
-						<h1 class="panel-title cyan-700"><i class="icon wb-shopping-cart"></i>{{trans('home.services')}}
+						<h1 class="panel-title cyan-700">
+							<i class="icon wb-shopping-cart"></i>{{trans('home.services')}}
 						</h1>
 					</div>
 					<div class="panel-body">
@@ -47,27 +47,22 @@
 							@foreach($goodsList as $goods)
 								<div class="col-md-6 col-xl-4 col-xxl-3 pb-30">
 									<div class="pricing-list text-left">
-										<div class="pricing-header text-white"
-												style="background-color: {{$goods->color}}">
+										<div class="pricing-header text-white" style="background-color: {{$goods->color}}">
 											<div class="pricing-title font-size-20">{{$goods->name}}</div>
 											@if($goods->limit_num)
-												<div
-														class="ribbon ribbon-vertical ribbon-bookmark ribbon-reverse ribbon-primary mr-10">
+												<div class="ribbon ribbon-vertical ribbon-bookmark ribbon-reverse ribbon-primary mr-10">
 													<span class="ribbon-inner h-auto">限<br>购</span>
 												</div>
 											@elseif($goods->is_hot)
-												<div
-														class="ribbon ribbon-vertical ribbon-bookmark ribbon-reverse ribbon-danger mr-10">
+												<div class="ribbon ribbon-vertical ribbon-bookmark ribbon-reverse ribbon-danger mr-10">
 													<span class="ribbon-inner h-auto">热<br>销</span>
 												</div>
 											@endif
-											<div
-													class="pricing-price text-white @if($goods->type == 1) text-center @endif">
+											<div class="pricing-price text-white @if($goods->type == 1) text-center @endif">
 												<span class="pricing-currency">¥</span>
 												<span class="pricing-amount">{{$goods->price}}</span>
 												@if($goods->type == 2)
-													<span
-															class="pricing-period">/ {{$goods->days}}{{trans('home.day')}}</span>
+													<span class="pricing-period">/ {{$goods->days}}{{trans('home.day')}}</span>
 												@endif
 											</div>
 											@if($goods->info)
@@ -84,8 +79,7 @@
 											{!!$goods->info!!}
 										</ul>
 										<div class="pricing-footer text-center bg-blue-grey-100">
-											<a href="/buy/{{$goods->id}}"
-													class="btn btn-lg btn-primary"> {{trans('home.service_buy_button')}}</a>
+											<a href="/buy/{{$goods->id}}" class="btn btn-lg btn-primary"> {{trans('home.service_buy_button')}}</a>
 										</div>
 									</div>
 								</div>
@@ -125,8 +119,7 @@
 							<div class="form-group row charge_credit">
 								<label for="amount" class="offset-md-1 col-md-2 col-form-label">充值金额</label>
 								<div class="col-md-8">
-									<input type="text" name="amount" id="amount" data-plugin="ionRangeSlider" data-min=1
-											data-max=300 data-from=40 data-prefix="¥"/>
+									<input type="text" name="amount" id="amount" data-plugin="ionRangeSlider" data-min=1 data-max=300 data-from=40 data-prefix="¥"/>
 								</div>
 							</div>
 						@endif
@@ -139,17 +132,13 @@
 									</p>
 									@if(\App\Components\Helpers::systemConfig()['wechat_qrcode'])
 										<div class="col-md-6">
-											<img class="w-p75 mb-10"
-													src="{{\App\Components\Helpers::systemConfig()['wechat_qrcode']}}"
-													alt=""/>
+											<img class="w-p75 mb-10" src="{{\App\Components\Helpers::systemConfig()['wechat_qrcode']}}" alt=""/>
 											<p>微 信 | WeChat</p>
 										</div>
 									@endif
 									@if(\App\Components\Helpers::systemConfig()['alipay_qrcode'])
 										<div class="col-md-6">
-											<img class="w-p75 mb-10"
-													src="{{\App\Components\Helpers::systemConfig()['alipay_qrcode']}}"
-													alt=""/>
+											<img class="w-p75 mb-10" src="{{\App\Components\Helpers::systemConfig()['alipay_qrcode']}}" alt=""/>
 											<p>支 付 宝 | AliPay</p>
 										</div>
 									@endif
@@ -160,8 +149,7 @@
 							<label for="charge_coupon"
 									class="offset-md-2 col-md-2 col-form-label"> {{trans('home.coupon_code')}} </label>
 							<div class="col-md-6">
-								<input type="text" class="form-control round" name="charge_coupon" id="charge_coupon"
-										placeholder="{{trans('home.please_input_coupon')}}">
+								<input type="text" class="form-control round" name="charge_coupon" id="charge_coupon" placeholder="{{trans('home.please_input_coupon')}}">
 							</div>
 						</div>
 					</form>
@@ -170,8 +158,7 @@
 					<div class="btn btn-group-lg charge_credit">
 						@include('user.components.purchase')
 					</div>
-					<button type="button" class="btn btn-primary" id="change_btn"
-							onclick="pay()">{{trans('home.recharge')}}</button>
+					<button type="button" class="btn btn-primary" id="change_btn" onclick="pay()">{{trans('home.recharge')}}</button>
 				</div>
 			</div>
 		</div>

+ 1 - 0
routes/web.php

@@ -183,6 +183,7 @@ Route::group(['middleware' => ['isForbidden', 'isMaintenance', 'isLogin']], func
 
 	Route::group(['prefix' => 'payment'], function() {
 		Route::post('purchase', 'PaymentController@purchase'); // 创建支付
+		Route::post('close/{id}', 'PaymentController@close'); // 关闭支付单
 		Route::get('getStatus', 'PaymentController@getStatus'); // 获取支付单状态
 		Route::get('{trade_no}', 'PaymentController@detail'); // 支付单详情
 	});

+ 2 - 1
sql/mod/20200624.sql

@@ -1,2 +1,3 @@
 ALTER TABLE `user`
-    CHANGE `uuid` `vmess_id` VARCHAR(64) NOT NULL DEFAULT '';
+    CHANGE `uuid` `vmess_id` VARCHAR(64) NOT NULL DEFAULT '',
+    ADD `protocol_param` varchar(255) DEFAULT '' COMMENT '协议参数';