Commit 29af874b authored by wanjilong's avatar wanjilong

add: 多子单支付

parent 038229f0
......@@ -26,5 +26,8 @@ class RefundException extends BaseException
11 => 'pingxx退单缺少matadata!',
12 => 'pingxx未支付订单不允许退款。',
13 => 'pingxx订单可能存在多次成功支付,需人工确认处理。',
14 => '不存在满足条件的退款订单。',
15 => '订单未支付或不存在,请核对。',
16 => '订单退款回调处理失败,请核对。',
];
}
......@@ -2,6 +2,7 @@
use App\Base\Base;
use App\Exception\custom\PayException;
use App\Services\pay\PayService;
use App\Services\refund\RefundService;
use Api\PhpUtils\Log\FileLog;
......@@ -40,14 +41,19 @@ class OrderController extends Base
public function refundAction() {
$params = $this->params;
$user_id = $params['user_id'];
$order_item_id = $params['order_item_id'];
if(!is_array($order_item_id)) {
$order_item_id = explode(',');
}
if(empty($params['order_id'])) {
throw new PayException(['cus' => 1]);
}
$refundSrv = new RefundService();
$ret = $refundSrv->do_refund($order_item_id, $user_id);
$ret = $refundSrv->do_refund($params['order_id'], $order_item_id);
$this->success(['result'=>$ret]);
}
public function write_offAction() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment