예제 #1
0
파일: Sue.php 프로젝트: buttasg/cowgirlk
 /**
  * Route to appropriate file based on version
  *
  * @return false|Shopgate_Framework_Model_Payment_Abstract
  */
 public function getModelByPaymentMethod()
 {
     if (version_compare($this->_getVersion(), '3.0.0', '>=')) {
         $this->setPaymentMethod('SUE300');
     } else {
         $this->setPaymentMethod('SUE118');
     }
     return parent::getModelByPaymentMethod();
 }
예제 #2
0
파일: Cc.php 프로젝트: buttasg/cowgirlk
 /**
  * Temp rewrite for edge case where AUTHN_CC needs to be
  * handled by AuthorizeCIM or USAEPAY_CC by ChargeItPro
  *
  * @return false|Shopgate_Framework_Model_Payment_Abstract
  * @throws Exception
  */
 public function getModelByPaymentMethod()
 {
     if (Mage::getModel('shopgate/payment_cc_authncim', $this->getShopgateOrder())->isValid()) {
         $this->setPaymentMethod('AUTHNCIM_CC');
     } elseif (Mage::getModel('shopgate/payment_cc_chargeitpro', $this->getShopgateOrder())->isValid()) {
         $this->setPaymentMethod('CHARGEITPRO_CC');
     }
     return parent::getModelByPaymentMethod();
 }
예제 #3
0
파일: Paypal.php 프로젝트: buttasg/cowgirlk
 /**
  * Redirect to standard or express
  *
  * @return false|Shopgate_Framework_Model_Payment_Abstract
  */
 public function getModelByPaymentMethod()
 {
     $standard = Mage::getModel('shopgate/payment_simple_paypal_standard', $this->getShopgateOrder());
     if ($standard instanceof Shopgate_Framework_Model_Payment_Interface && $standard->isValid()) {
         if ($this->_getConfigHelper()->getIsMagentoVersionLower1410()) {
             $this->setPaymentMethod('STANDARD1400');
         } else {
             $this->setPaymentMethod('STANDARD');
         }
     } else {
         $this->setPaymentMethod('EXPRESS');
     }
     return parent::getModelByPaymentMethod();
 }
예제 #4
0
파일: Prepay.php 프로젝트: buttasg/cowgirlk
 /**
  * If mage 1.7+ use native bank payment, else try Check Money Order.
  * Phoenix plugin takes priority if it's enabled
  * Note! Last one overwrites previous.
  *
  * @return false|Shopgate_Framework_Model_Payment_Abstract
  */
 public function getModelByPaymentMethod()
 {
     if ($this->_getConfigHelper()->getIsMagentoVersionLower1700() === false) {
         $native = Mage::getModel('shopgate/payment_simple_prepay_native', $this->getShopgateOrder());
         if ($native instanceof Shopgate_Framework_Model_Payment_Interface && $native->isValid()) {
             $this->setPaymentMethod('Native');
         }
     } else {
         $checkmo = Mage::getModel('shopgate/payment_simple_prepay_checkmo', $this->getShopgateOrder());
         if ($checkmo instanceof Shopgate_Framework_Model_Payment_Interface && $checkmo->isValid()) {
             $this->setPaymentMethod('Checkmo');
         }
     }
     $phoenix = Mage::getModel('shopgate/payment_simple_prepay_phoenix', $this->getShopgateOrder());
     if ($phoenix instanceof Shopgate_Framework_Model_Payment_Interface && $phoenix->isValid()) {
         $this->setPaymentMethod('Phoenix');
     }
     return parent::getModelByPaymentMethod();
 }
예제 #5
0
파일: Cod.php 프로젝트: buttasg/cowgirlk
 /**
  * Checks Phoenix|MSP|Native COD payment methods
  * Note! Last one overwrites previous.
  *
  * @return false|Shopgate_Framework_Model_Payment_Abstract
  */
 public function getModelByPaymentMethod()
 {
     if ($this->_getConfigHelper()->getIsMagentoVersionLower1700() === false) {
         $class = Mage::getModel('shopgate/payment_simple_cod_native', $this->getShopgateOrder());
         if ($class instanceof Shopgate_Framework_Model_Payment_Interface && $class->isValid()) {
             $this->setPaymentMethod('Native');
         }
     }
     if ($this->isModuleActive()) {
         if (version_compare($this->_getVersion(), '1.0.8', '<')) {
             $this->setPaymentMethod('Phoenix107');
         } else {
             $this->setPaymentMethod('Phoenix108');
         }
     }
     $msp = Mage::getModel('shopgate/payment_simple_cod_msp', $this->getShopgateOrder());
     if ($msp instanceof Shopgate_Framework_Model_Payment_Interface && $msp->isValid()) {
         $this->setPaymentMethod('Msp');
     }
     return parent::getModelByPaymentMethod();
 }