'hj/order/create', // 创建支付订单 'order_query' => 'hj/order/query', // 订单查询 'mch_info' => 'hj/mch/info', // 分账方信息 'order_refund' => 'hj/order/refund', // 订单退款 'order_refund_query' => 'hj/order/refundQuery', // 退款查询 'order_alt_list' => 'hj/order/altList', // 分账列表 'order_settle_list' => 'hj/order/settleList', // 结算记录 'sign_content' => 'hj/mch/signContent', // 签约内容 'confirm_sign' => 'hj/mch/confirmSign', // 确认签约 ]; /** * 创建支付订单 * * @param array $params * @return array */ public function create_order($params) { return $this->request($this->getFullUrl(__FUNCTION__), array_filter($params), 'post'); } /** * 订单查询 * * @param string $order_no * @return array */ public function order_query($sys_order_no) { return $this->request($this->getFullUrl(__FUNCTION__), array_filter(compact('sys_order_no')), 'get'); } /** * 订单退款 * * @param array $params * [ * 'order_no' => '商户订单号' * 'refund_order_no' => '退款订单号' * 'refund_amount' => '退款金额' * 'reason' => '退款理由' * 'notify_url' => '通知地址' * ] * @return array */ public function order_refund($params) { return $this->request($this->getFullUrl(__FUNCTION__), array_filter($params), 'post'); } /** * 退款订单查询 * * @param string $refund_order_no 退款订单号 * @return array */ public function order_refund_query($refund_order_no) { return $this->request($this->getFullUrl(__FUNCTION__), array_filter(compact('refund_order_no')), 'get'); } /** * 查询分账 * * @param string $start_time 2022-03-01 * @param string $end_time 2022-03-01 * @param string $order_no 流水单号 * @param integer $page * @return array */ public function order_alt_list($start_time, $end_time, $order_no = '', $page = 1) { return $this->request($this->getFullUrl(__FUNCTION__), array_filter(compact( 'start_time', 'end_time', 'order_no', 'page' )), 'get'); } /** * 查询结算记录 * * @param string $start_time 2022-03-01 * @param string $end_time 2022-03-01 * @param integer $page * @return array */ public function order_settle_list($start_time, $end_time, $page = 1) { return $this->request($this->getFullUrl(__FUNCTION__), array_filter(compact( 'start_time', 'end_time', 'page' )), 'get'); } /** * 分账方信息 * * @param string $alt_mch_no * @return array */ public function mch_info($alt_mch_no) { return $this->request($this->getFullUrl(__FUNCTION__), array_filter(compact( 'alt_mch_no' )), 'get'); } /** * 获取签约内容 * * @return string */ public function sign_content() { return $this->request($this->getFullUrl(__FUNCTION__), [], 'get'); } /** * 执行确认签约 * * @return boolean */ public function confirm_sign() { return $this->request($this->getFullUrl(__FUNCTION__), [], 'get'); } }