1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- namespace Cmbc\Api;
- class Notify extends Core
- {
- protected function init()
- {
- $this->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;
- $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) {
- return $tool->updateOrder($this->param['mhtOrderNo'], $this->param['mhtOrderAmt'], $error);
- }
- $signature = $this->createSignature($this->param['signType']);
- if ($signature != $data['signature']) {
- $tool->updateOrder($this->param['mhtOrderNo'], $this->param['mhtOrderAmt'], '签名错误');
- }
- return $this->param;
- }
- public function response($response)
- {
- return $response;
- }
- }
|