コード例 #1
0
ファイル: Ideal.php プロジェクト: Maikel-Koek/magento
 /**
  * @param Mage_Sales_Model_Quote|null $quote
  * @return bool
  */
 public function isAvailable($quote = null)
 {
     $isAvailable = parent::isAvailable();
     $disableZeroTotal = Mage::getStoreConfig('payment/adyen_hpp/disable_zero_total', $quote->getStoreId());
     if (!is_null($quote) && $quote->getGrandTotal() <= 0 && $disableZeroTotal) {
         return false;
     }
     return $isAvailable;
 }
コード例 #2
0
ファイル: Ideal.php プロジェクト: LybeAB/magento
 public function validate()
 {
     parent::validate();
     $info = $this->getInfoInstance();
     $hppType = $info->getCcType();
     // validate if the ideal bank is chosen
     if ($hppType == "ideal") {
         if ($info->getPoNumber() == "") {
             // hpp type is empty throw error
             Mage::throwException(Mage::helper('adyen')->__('You chose an invalid bank'));
         }
     }
 }
コード例 #3
0
ファイル: Openinvoice.php プロジェクト: raphaelpor/magento
 /**
  * @desc Openinvoice Optional Fields.
  * @desc Notice these are used to prepopulate the fields, but client can edit them at Adyen.
  * @return type array
  */
 public function getFormFields()
 {
     $adyFields = parent::getFormFields();
     $adyFields = $this->getOptionalFormFields($adyFields, $this->_order);
     return $adyFields;
 }