request->post('order_don');//订单号 $info = UnionOrder::getOrderInfo2($order_don); if(empty($info)) { throw new \Exception('订单不存在'); } if($info['order_status'] != 5) { throw new \Exception('该订单状态不允许退款'); } $result = TonglianPayment::refund($info['order_price']*100, $order_don); if($result['trxstatus'] == '0000') { UnionOrder::updateRefund($order_don); } return json_success($result); } }