示例#1
0
 protected function processFormData(Customweb_Saferpay_Authorization_Transaction $transaction, $parameters)
 {
     if ($transaction->isUseExistingAlias()) {
         $transaction->setTransactionState(Customweb_Saferpay_Authorization_Transaction::STATE_ALIAS_EXISTS);
         $parameters = array_merge($parameters, $transaction->getTransactionContext()->getCustomParameters());
         $this->processAuthorization($transaction, $parameters);
     } else {
         $this->createAlias($transaction, $parameters);
     }
 }
 /**
  * This method is called for all redirections to specific URL.
  * The user will get
  * redirected to this URL when the shop system calls self::processFurther().
  *
  * @param string $state STATE_INITIAL | STATE_3D_SECURE
  * @param Customweb_Saferpay_Authorization_Transaction $transaction
  * @param string $url
  */
 protected function redirect($state, Customweb_Saferpay_Authorization_Transaction $transaction, $url)
 {
     if ($state != null) {
         $transaction->setTransactionState($state);
     }
     $transaction->setNextRedirectUrl($url);
     $response = new Customweb_Core_Http_Response();
     $response->setLocation($url);
     return $response;
 }