Exemplo n.º 1
0
 public static function handlePendingTransaction(Customweb_Payment_Authorization_DefaultTransaction $transaction, $timeout, $interval)
 {
     $transaction->setUpdateExecutionDate(null);
     if (!$transaction->isAuthorized() && !$transaction->isAuthorizationFailed()) {
         $diff = time() - $transaction->getCreatedOn()->getTimestamp();
         if ($diff > $timeout) {
             $transaction->setAuthorizationFailed(Customweb_I18n_Translation::__("The customer does not finish the payment with in the timeout."));
         } else {
             $date = new DateTime();
             $date->setTimestamp(time() + $interval);
             $transaction->setUpdateExecutionDate($date);
         }
     }
 }
Exemplo n.º 2
0
 public function setAuthorizationParameters(array $parameters)
 {
     return parent::setAuthorizationParameters(array_change_key_case($parameters, CASE_UPPER));
 }