Example #1
0
 /**
  * Retrieve credit card expire years
  *
  * @return array
  */
 public function getCcYears()
 {
     $years = $this->getData('cc_years');
     if ($years === null) {
         $years = $this->_paymentConfig->getYears();
         $years = [0 => __('Year')] + $years;
         $this->setData('cc_years', $years);
     }
     return $years;
 }
Example #2
0
 /**
  * Retrieve credit card expire years
  *
  * @return array
  */
 public function getCcYears()
 {
     $years = $this->getData('cc_years');
     if (is_null($years)) {
         $years = $this->_paymentConfig->getYears();
         $years = array(0 => __('Year')) + $years;
         $this->setData('cc_years', $years);
     }
     return $years;
 }
Example #3
0
 public function testGetYears()
 {
     $this->date->expects($this->once())->method('date')->with('Y')->will($this->returnValue(self::CURRENT_YEAR));
     $this->assertEquals($this->_getPreparedYearsList(), $this->config->getYears());
 }
Example #4
0
 /**
  * Retrieve credit card expire years
  *
  * @return array
  */
 public function getCcYears()
 {
     return $this->config->getYears();
 }