barCodeAll($data); if ($cache) { return $cache; } else { self::$errmsg = $obj->getMsg(); return false; } } /** 云闪付统一刷卡接口 * @param $order_no * @param $code * @param $total_fee * @param $body * @return bool */ public function slotCard($order_no, $code, $total_fee, $body) { $merinfo = self::$merinfo; $obj = new CloudObj($merinfo); $cache = $obj->slotCard($order_no, $code, $total_fee, $body, "alipay"); if ($cache) { return true; } else { self::$errmsg = $obj->getMsg(); return false; } } /** 云闪付统一刷卡接口 * @param $order_no * @param $code * @param $total_fee * @param $body * @return bool 2020-12-23 */ public function slotCard_v1($order_no, $code, $total_fee, $body) { $merinfo = self::$merinfo; $obj = new CloudObj($merinfo); $cache = $obj->slotCard_v1($order_no, $code, $total_fee, $body, "alipay"); if ($cache) { return true; } else { self::$errmsg = $obj->getMsg(); return false; } } /** 查询支付宝订单信息 * @param $out_trade_no * @return bool|mixed|string * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\ModelNotFoundException * @throws \think\exception\DbException */ public function queryOrder($out_trade_no) { $merinfo = self::$merinfo; $obj = new CloudObj($merinfo); $re = $obj->queryOrder($out_trade_no, 'alipay'); if ($re) { return $re; } else { self::$errmsg = $obj->getMsg(); return false; } } /** 统一支付宝退款事件 * @param $order_no * @param string $refund_id * @param $total_fee * @param $refund_fee * @return mixed|string */ public function refund($order_no, $total_fee, $refund_fee, $refund_id = '') { $merinfo = self::$merinfo; $obj = new CloudObj($merinfo); $cache = $obj->Refund($order_no, $total_fee, 'alipay', $refund_fee, $refund_id); if ($cache) { return true; } else { self::$errmsg = $obj->getMsg(); return false; } } /** 查询支付宝退款订单信息 * @param $out_trade_no * @return bool|mixed|string * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\ModelNotFoundException * @throws \think\exception\DbException */ public function refundQuery($out_trade_no) { $merinfo = self::$merinfo; $obj = new CloudObj($merinfo); $re = $obj->refundQuery($out_trade_no); if ($re) { return $re; } else { self::$errmsg = $obj->getMsg(); return false; } } /** 下单操作 * @param $order_no * @param $open_id * @param $payPrice * @return bool */ public function unifiedorder($order_no, $payPrice, $storetag) { $merinfo = self::$merinfo; $data['total_amount'] = $payPrice; $data['trandeno'] = $order_no; $data['orderType'] = 'alipay'; $data['storetag'] = $storetag; $obj = new CloudObj($merinfo); $cache = $obj->barCode($data); if ($cache) { return $cache; } else { self::$errmsg = $obj->getMsg(); return false; } } /** 返回错误报告数据 * @return string */ public function getMsg() { return self::$errmsg; } }