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