api = 'https://ipaynow.acquire.cmbchina.com/'; $this->param['funcode'] = 'WP001'; $this->param['version'] = '1.0.0'; } public function request($request, $tool = false) { $this->data = $request; $tool->log('支付回调-初始化11', $request); $this->setParam('mhtOrderNo'); $this->setParam('mhtOrderName'); $this->setParam('mhtOrderType'); $this->setParam('mhtCurrencyType'); $this->setParam('mhtOrderAmt'); $this->setParam('oriMhtOrderAmt'); $this->setParam('discountAmt'); $this->setParam('mhtOrderDetail'); $this->setParam('mhtOrderTimeOut'); $this->setParam('mhtOrderStartTime'); $this->setParam('payTime'); $this->setParam('nowPayOrderNo'); $this->setParam('transStatus'); $this->setParam('mhtCharset'); $this->setParam('deviceType'); $this->setParam('payChannelType'); $this->setParam('channelOrderNo'); $this->setParam('payConsumerId'); $this->setParam('mhtReserved'); $this->setParam('bankType'); $this->setParam('cardType'); $this->setParam('signType'); $error = $this->getError(); if ($error) { $tool->updateOrder($this->param['mhtOrderNo'], $this->param['mhtOrderAmt'], $error); return false; } $tool->log('支付回调-初始化22', $this->param); $signature = $this->createSignature($this->param['signType']); $tool->log('支付回调-初始化33', $signature); if ($signature != $this->data['signature']) { $tool->updateOrder($this->param['mhtOrderNo'], $this->param['mhtOrderAmt'], '签名错误'); return false; } return $this->param; } public function response($response) { return $response; } }