Example #1
0
 /**
  * Action failure status of transaction for form payment
  */
 public function actionFailure()
 {
     // Clear all session
     HelperCommon::clearStore(array('details', 'extra', 'isDeliverySame'));
     $view = new HelperView('form/result');
     $view->setData($this->_resultData());
     $view->render();
 }
Example #2
0
 /**
  * Check details data
  */
 protected function checkDetails()
 {
     $details = HelperCommon::getStore('details');
     $billingDetails = $this->createCustomerDetails($details, 'billing');
     $details = array_merge($details, $this->customerDetailsToArray($billingDetails, 'billing'));
     $billingErrors = $billingDetails->validate();
     if (HelperCommon::getStore('isDeliverySame')) {
         $deliveryErrors = array();
     } else {
         $deliveryDetails = $this->createCustomerDetails($details, 'delivery');
         $details = array_merge($details, $this->customerDetailsToArray($deliveryDetails, 'delivery'));
         $deliveryErrors = $deliveryDetails->validate();
     }
     if (!empty($billingErrors) || !empty($deliveryErrors)) {
         $this->redirect($this->integrationType);
     } else {
         $this->checkProducts(null, true);
     }
 }
Example #3
0
 /**
  * Action remove all the customers DIRECT mode
  */
 public function actionDeleteAllCustomers()
 {
     HelperCommon::clearStore('account');
     $sagepayToken = new SagepayToken($this->sagepayConfig);
     $cardTokens = ModelAbstract::factory('Card')->getAll();
     foreach ($cardTokens as $card) {
         $sagepayToken->remove($card->token);
     }
     $view = new HelperView('admin/deleted');
     $view->setData(array('env' => $this->sagepayConfig->getEnv(), 'vendorName' => $this->sagepayConfig->getVendorName(), 'integrationType' => $this->integrationType, 'numDeleted' => ModelAbstract::factory('Customer')->deleteAll()));
     $view->render();
 }
Example #4
0
 /**
  * Action failure for direct payment
  */
 public function actionFailure()
 {
     // Clear all session
     HelperCommon::clearStore(array('isDeliverySame', 'details', 'extra', 'VendorTxCode'));
     $view = new HelperView('direct/result');
     $view->setData($this->getPaymentResultData());
     $view->render();
 }
Example #5
0
 /**
  * Action low profile page for server payment
  */
 public function actionLowProfile()
 {
     $view = new HelperView('server/low_profile');
     $view->setData(array('env' => $this->sagepayConfig->getEnv(), 'vendorName' => $this->sagepayConfig->getVendorName(), 'integrationType' => $this->integrationType, 'request' => HelperCommon::getStore('txData')));
     $view->render();
 }
 /**
  * Action logout of system page
  */
 public function actionLogout()
 {
     HelperCommon::clearStore('account');
     // Render logout tpl
     $view = new HelperView('server-and-direct/logout');
     $view->setData(array('env' => $this->sagepayConfig->getEnv(), 'vendorName' => $this->sagepayConfig->getVendorName(), 'integrationType' => $this->integrationType));
     $view->render();
 }