Exemplo n.º 1
0
 public function isSuccessful()
 {
     if (!$this->redirect) {
         $request_data = $this->request->getdata();
         return isset($this->data['status']) && '1' === $this->data['status'] && Helper::checkDataParam($this->data, $request_data, 'projectid') && Helper::checkDataParam($this->data, $request_data, 'amount') && Helper::checkDataParam($this->data, $request_data, 'currency') && Helper::checkDataParam($this->data, $request_data, 'test');
     }
     return false;
 }
 public function getData()
 {
     $this->validate('card');
     $card = $this->getCard();
     $param = array('projectid' => Helper::createParam($this->getProjectId(), 11), 'orderid' => Helper::createParam($this->getTransactionId(), 11), 'accepturl' => Helper::createParam($this->getReturnUrl()), 'cancelurl' => Helper::createParam($this->getCancelUrl()), 'callbackurl' => Helper::createParam($this->getNotifyUrl()), 'version' => Helper::createParam($this->getVersion(), 9), 'lang' => Helper::createParam($this->getlanguage(), 3, false), 'amount' => Helper::createParam($this->getAmountInteger(), 11), 'currency' => Helper::createParam($this->getCurrency(), 3), 'p_firstname' => Helper::createParam($card->getFirstName()), 'p_lastname' => Helper::createParam($card->getLastName()), 'p_email' => Helper::createParam($card->getEmail()), 'p_street' => Helper::createParam($card->getAddress1(), 255, false), 'p_city' => Helper::createParam($card->getCity(), 255, false), 'p_state' => Helper::createParam($card->getState(), 20, false), 'p_zip' => Helper::createParam($card->getPostcode(), 20, false), 'p_countrycode' => Helper::createParam($card->getCountry(), 2, false), 'test' => Helper::createParam($this->getTestMode(), 1, false), 'developerid' => Helper::createParam($this->getDeveloperId(), 11, false));
     Helper::validateData($param);
     $data = array();
     $data['data'] = Helper::prepareData($param);
     $data['sign'] = Helper::signData($data['data'], $this->getSignPassword());
     return $data;
 }
 public function getData()
 {
     return array('projectid' => Helper::createParam($this->getProjectId(), 11), 'version' => Helper::createParam($this->getVersion(), 9), 'amount' => Helper::createParam($this->getAmountInteger(), 11), 'currency' => Helper::createParam($this->getCurrency(), 3), 'test' => Helper::createParam($this->getTestMode(), 1, false), 'developerid' => Helper::createParam($this->getDeveloperId(), 11, false));
 }