Exemple #1
0
 /**
  * Set payment method
  *
  * @param \XLite\Model\Payment\Method $method Payment method OPTIONAL
  *
  * @return void
  */
 public function setPaymentMethod(\XLite\Model\Payment\Method $method = null)
 {
     $this->payment_method = $method;
     if ($method) {
         $this->setMethodName($method->getServiceName());
         $this->setMethodLocalName($method->getName());
         $this->renewTransactionId();
     }
 }
Exemple #2
0
 /**
  * Check that existing payment method is in the list of the imported methods. Mark that in the list 
  *
  * @param \XLite\Model\Payment\Method $paymentMethod       Payment method
  * @param array                       $list List of the imported payment methods
  *
  * @return void
  */
 protected function checkMethodInImportedList(\XLite\Model\Payment\Method $paymentMethod, &$list)
 {
     $result = false;
     foreach ($list as $key => $data) {
         if ($paymentMethod->getName() == $data['moduleName'] && $paymentMethod->getSetting('id') == $data['id']) {
             $result = true;
             $list[$key]['paymentMethodId'] = $paymentMethod->getMethodId();
             break;
         }
     }
     return $result;
 }
 /**
  * {@inheritDoc}
  */
 public function getName()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getName', array());
     return parent::getName();
 }