mirror of
				https://github.com/v2board/v2board.git
				synced 2025-10-31 01:11:46 +08:00 
			
		
		
		
	update
This commit is contained in:
		| @@ -109,26 +109,15 @@ class OrderController extends Controller | ||||
|         ]; | ||||
|         $strToSign = $bitpayX->prepareSignId($inputJSON['merchant_order_id']); | ||||
|         if (!$bitpayX->verify($strToSign, $inputJSON['token'])) { | ||||
|             die([ | ||||
|                 'status' => 400, | ||||
|                 'error' => 'sign error' | ||||
|             ]); | ||||
|             abort(500, 'sign error'); | ||||
|         } | ||||
|         if ($params['status'] !== 'PAID') { | ||||
|             die([ | ||||
|                 'status' => 400, | ||||
|                 'error' => 'order is not paid' | ||||
|             ]); | ||||
|             abort(500, 'order is not paid'); | ||||
|         } | ||||
|         if (!$this->handle($params['merchant_order_id'], $params['order_id'])) { | ||||
|             die([ | ||||
|                 'status' => 400, | ||||
|                 'error' => 'order process fail' | ||||
|             ]); | ||||
|             abort(500, 'order process fail'); | ||||
|         } | ||||
|         die([ | ||||
|             'status' => 200 | ||||
|         ]); | ||||
|         die('success'); | ||||
|     } | ||||
|  | ||||
|     public function payTaroNotify(Request $request) | ||||
|   | ||||
| @@ -396,7 +396,7 @@ class OrderController extends Controller | ||||
|     { | ||||
|         $bitpayX = new BitpayX(config('v2board.bitpayx_appsecret')); | ||||
|         $params = [ | ||||
|             'merchant_order_id' => 'V2Board_' . $order->trade_no, | ||||
|             'merchant_order_id' => $order->trade_no, | ||||
|             'price_amount' => $order->total_amount / 100, | ||||
|             'price_currency' => 'CNY', | ||||
|             'title' => '支付单号:' . $order->trade_no, | ||||
|   | ||||
| @@ -68,7 +68,6 @@ CREATE TABLE `v2_order` ( | ||||
|   `plan_id` int(11) NOT NULL, | ||||
|   `type` int(11) NOT NULL COMMENT '1新购2续费3升级', | ||||
|   `cycle` varchar(255) NOT NULL, | ||||
|   `method` tinyint(1) DEFAULT NULL COMMENT '支付方式', | ||||
|   `trade_no` varchar(36) NOT NULL, | ||||
|   `callback_no` varchar(255) DEFAULT NULL, | ||||
|   `total_amount` int(11) NOT NULL, | ||||
| @@ -223,4 +222,4 @@ CREATE TABLE `v2_user` ( | ||||
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||||
|  | ||||
|  | ||||
| -- 2020-01-20 08:47:41 | ||||
| -- 2020-01-20 15:33:23 | ||||
| @@ -128,3 +128,6 @@ INSERT INTO `v2_tutorial` (`id`, `title`, `description`, `icon`, `steps`, `show` | ||||
|  | ||||
| ALTER TABLE `v2_server_log` | ||||
| CHANGE `rate` `rate` decimal(10,2) NOT NULL AFTER `d`; | ||||
|  | ||||
| ALTER TABLE `v2_order` | ||||
| DROP `method`; | ||||
		Reference in New Issue
	
	Block a user