Ejemplo n.º 1
0
 /**
  * Load available billing agreement methods
  *
  * @return array
  */
 protected function _loadPaymentMethods()
 {
     if (!$this->_paymentMethods) {
         foreach ($this->_helper->getBillingAgreementMethods() as $paymentMethod) {
             $this->_paymentMethods[$paymentMethod->getCode()] = $paymentMethod->getTitle();
         }
     }
     return $this->_paymentMethods;
 }
Ejemplo n.º 2
0
 /**
  * Retrieve wizard payment options array
  *
  * @return array
  */
 public function getWizardPaymentMethodOptions()
 {
     $paymentMethodOptions = [];
     foreach ($this->_helper->getBillingAgreementMethods() as $paymentMethod) {
         if ($paymentMethod->getConfigData('allow_billing_agreement_wizard') == 1) {
             $paymentMethodOptions[$paymentMethod->getCode()] = $paymentMethod->getTitle();
         }
     }
     return $paymentMethodOptions;
 }
Ejemplo n.º 3
0
 /**
  * @dataProvider getBillingAgreementMethodsDataProvider
  * @param $store
  * @param $quote
  * @param $paymentMethods
  * @param $expectedResult
  */
 public function testGetBillingAgreementMethods($store, $quote, $paymentMethods, $expectedResult)
 {
     $this->_paymentDataMock->expects($this->any())->method('getStoreMethods')->with($store, $quote)->will($this->returnValue($paymentMethods));
     $this->assertEquals($expectedResult, $this->_helper->getBillingAgreementMethods($store, $quote));
 }