コード例 #1
0
 /**
  * Get the raw data array for this message. The format of this varies from gateway to
  * gateway, but will usually be either an associative array, or a SimpleXMLElement.
  *
  * @return mixed
  */
 public function getData()
 {
     $this->validate('certPath', 'certPassword', 'orderId', 'txnTime', 'txnAmt');
     $data = array('version' => $this->getVersion(), 'encoding' => $this->getEncoding(), 'certId' => $this->getCertId(), 'signMethod' => $this->getSignMethod(), 'txnType' => '00', 'txnSubType' => '00', 'bizType' => $this->getBizType(), 'accessType' => $this->getAccessType(), 'channelType' => $this->getChannelType(), 'orderId' => $this->getOrderId(), 'merId' => $this->getMerId(), 'txnTime' => $this->getTxnTime());
     $data = Helper::filterData($data);
     $data['signature'] = Helper::getParamsSignatureWithRSA($data, $this->getCertPath(), $this->getCertPassword());
     return $data;
 }
コード例 #2
0
 /**
  * Get the raw data array for this message. The format of this varies from gateway to
  * gateway, but will usually be either an associative array, or a SimpleXMLElement.
  *
  * @return mixed
  */
 public function getData()
 {
     $this->validateData();
     $data = array('version' => $this->getVersion(), 'encoding' => $this->getEncoding(), 'certId' => $this->getCertId(), 'txnType' => '01', 'txnSubType' => '01', 'bizType' => $this->getBizType(), 'frontUrl' => $this->getReturnUrl(), 'backUrl' => $this->getNotifyUrl(), 'signMethod' => $this->getSignMethod(), 'channelType' => $this->getChannelType(), 'accessType' => $this->getAccessType(), 'merId' => $this->getMerId(), 'orderId' => $this->getOrderId(), 'txnTime' => $this->getTxnTime(), 'txnAmt' => $this->getTxnAmt(), 'currencyCode' => $this->getCurrencyCode(), 'defaultPayType' => $this->getDefaultPayType(), 'orderDesc' => $this->getOrderDesc(), 'reqReserved' => $this->getReqReserved());
     $data = Helper::filterData($data);
     $data['signature'] = Helper::getParamsSignatureWithRSA($data, $this->getCertPath(), $this->getCertPassword());
     return $data;
 }