Exemplo n.º 1
0
 public function isAvailable($quote = null)
 {
     $isAvailable = parent::isAvailable($quote);
     // check if adyen_cc is enabled if not disable oneclick as well
     $isCCActive = $this->_getConfigData('active', 'adyen_cc');
     if (!$isCCActive) {
         return false;
     }
     return $isAvailable;
 }
Exemplo n.º 2
0
 public function isAvailable($quote = null)
 {
     $isAvailble = parent::isAvailable($quote);
     // extra check if contract_type is allowed
     if ($isAvailble) {
         $recurringPaymentType = $this->getRecurringPaymentType();
         $recurringDetails = $this->getRecurringDetails();
         if (isset($recurringDetails['recurring_type'])) {
             $result = strpos($recurringDetails['recurring_type'], $recurringPaymentType);
             if ($result !== false) {
                 return true;
             } else {
                 return false;
             }
         }
     }
     return $isAvailble;
 }