checkSign($arr, $sign, $order_no, $price, $real_price = 0, $is_bill_no = 0, $bill_no); } /** * 返回跳转 * @param array $data * @return void [type] [description] */ function redirect(array $data) { // TODO: Implement redirect() method. } /** * 检查支付信息 * @return void [type] 0=失败,1=成功 */ function check() { // TODO: Implement check() method. } /** * 构建订单提交数组 * @return array */ function buildOrder(): array { $orderInfo = [ 'parter' => $this->paymentConfig['merchant_id'], 'value' => $this->dataAccess->money, 'orderid' => $this->dataAccess->orderSn, 'type' => $this->dataAccess->payType, 'attach' => $this->dataAccess->extra ?? 'testGoods', 'callbackurl' => $this->notifyUrl, 'hrefbackurl' => $this->redirectUrl, ]; $this->paySign = true; $sign = $this->buildSign($orderInfo, $this->paymentConfig['merchant_md5_secret']); $orderInfo['sign'] = $sign; return $orderInfo; } /** * 生成签名函数 * @param array $param * @param string $merchantSecret * @return mixed */ function buildSign(array $param, $merchantSecret) { $signValue = "orderid={$param['orderid']}&opstate={$param['opstate']}&ovalue={$param['ovalue']}{$merchantSecret}";//异步签名串 $signStr = "parter={$param['parter']}&type={$param['type']}&value={$param['value']}&orderid={$param['orderid']}&callbackurl={$param['callbackurl']}{$merchantSecret}"; return $this->paySign ? md5($signStr) : md5($signValue); } /** * 基础配置 * @return void */ function config() { $this->apiUrl = 'https://gateway.easyipay.com/interface/AutoBank/index.aspx'; $this->success = 'opstate=0'; } /** * 设置返回类型 * @param string $type */ function setReturnType($type = 'HTML') { // TODO: Implement setReturnType() method. } /** * 发起支付函数 * @return mixed */ function goPay() { $this->debug = 0; $this->method = "POST"; $this->prePay(); } }