|
@@ -96,11 +96,10 @@ class PayOperService
|
|
*/
|
|
*/
|
|
public static function settle($orderSn, $payamount, $transactionid = '')
|
|
public static function settle($orderSn, $payamount, $transactionid = '')
|
|
{
|
|
{
|
|
- $order = OrderService::getDetailByOrderSn($orderSn);
|
|
|
|
|
|
+ $order = OrderService::getDetailByOrderSn($orderSn);
|
|
if (!$order->canPayHandle()) {
|
|
if (!$order->canPayHandle()) {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
-
|
|
|
|
if ($payamount != $order->amount) {
|
|
if ($payamount != $order->amount) {
|
|
\think\Log::write("支付失败,订单支付金额不一致[{$orderSn}][{$payamount}][{$order->amount}]");
|
|
\think\Log::write("支付失败,订单支付金额不一致[{$orderSn}][{$payamount}][{$order->amount}]");
|
|
return false;
|
|
return false;
|
|
@@ -109,7 +108,7 @@ class PayOperService
|
|
// 启动事务
|
|
// 启动事务
|
|
Db::startTrans();
|
|
Db::startTrans();
|
|
try {
|
|
try {
|
|
- $order->status = OrderEnum::STATUS_PAY;
|
|
|
|
|
|
+ $order->order_status = OrderEnum::STATUS_PAY;
|
|
// $order->transaction_id = $transactionid;
|
|
// $order->transaction_id = $transactionid;
|
|
$order->pay_amount = $payamount;
|
|
$order->pay_amount = $payamount;
|
|
$order->pay_time = time();
|
|
$order->pay_time = time();
|