예제 #1
0
파일: PaypalWPS.php 프로젝트: kingsj/core
 /**
  * @return \XLite\Model\Payment\Method
  */
 protected function getTestMethod()
 {
     $method = parent::getTestMethod();
     $s = new \XLite\Model\Payment\MethodSetting();
     $s->setName('account');
     $s->setValue('test');
     $method->addSettings($s);
     $s->setPaymentMethod($method);
     $s = new \XLite\Model\Payment\MethodSetting();
     $s->setName('prefix');
     $method->addSettings($s);
     $s->setPaymentMethod($method);
     $s = new \XLite\Model\Payment\MethodSetting();
     $s->setName('description');
     $s->setValue('123');
     $method->addSettings($s);
     $s->setPaymentMethod($method);
     $s->setName('mode');
     $s->setValue('test');
     $method->addSettings($s);
     $s->setPaymentMethod($method);
     $s->setName('address_override');
     $s->setValue('N');
     $method->addSettings($s);
     $s->setPaymentMethod($method);
     \XLite\Core\Database::getEM()->persist($method);
     \XLite\Core\Database::getEM()->flush();
     return $method;
 }
예제 #2
0
파일: Quantum.php 프로젝트: kingsj/core
 /**
  * @return \XLite\Model\Payment\Method
  */
 protected function getTestMethod()
 {
     $method = parent::getTestMethod();
     $s = new \XLite\Model\Payment\MethodSetting();
     $s->setName('login');
     $s->setValue('test');
     $method->addSettings($s);
     $s->setPaymentMethod($method);
     $s = new \XLite\Model\Payment\MethodSetting();
     $s->setName('prefix');
     $method->addSettings($s);
     $s->setPaymentMethod($method);
     $s = new \XLite\Model\Payment\MethodSetting();
     $s->setName('hash');
     $s->setValue('123');
     $method->addSettings($s);
     $s->setPaymentMethod($method);
     \XLite\Core\Database::getEM()->persist($method);
     \XLite\Core\Database::getEM()->flush();
     return $method;
 }
예제 #3
0
파일: TwoCheckout.php 프로젝트: kingsj/core
 /**
  * getTestMethod
  *
  * @return void
  * @see    ____func_see____
  * @since  1.0.22
  */
 protected function getTestMethod()
 {
     $method = parent::getTestMethod();
     $s = new \XLite\Model\Payment\MethodSetting();
     $s->setName('account');
     $s->setValue($this->testOptions['account']);
     $method->addSettings($s);
     $s->setPaymentMethod($method);
     $s = new \XLite\Model\Payment\MethodSetting();
     $s->setName('secret');
     $s->setValue($this->testOptions['secret']);
     $method->addSettings($s);
     $s->setPaymentMethod($method);
     $s = new \XLite\Model\Payment\MethodSetting();
     $s->setName('prefix');
     $method->addSettings($s);
     $s->setPaymentMethod($method);
     $s = new \XLite\Model\Payment\MethodSetting();
     $s->setName('language');
     $s->setValue('en');
     $method->addSettings($s);
     $s->setPaymentMethod($method);
     $s->setName('mode');
     $s->setValue('test');
     $method->addSettings($s);
     $s->setPaymentMethod($method);
     $s->setName('currency');
     $s->setValue('USD');
     $method->addSettings($s);
     $s->setPaymentMethod($method);
     \XLite\Core\Database::getEM()->persist($method);
     \XLite\Core\Database::getEM()->flush();
     return $method;
 }