Ejemplo n.º 1
0
 /**
  * Creates the CVC element and control.
  *
  * @return void
  */
 protected function buildCVCElement()
 {
     if ($this->getCvcFieldName() !== null && $this->isCvcElementShown()) {
         $this->createCVCControl();
         $this->cvcElement = new Customweb_Form_Element(Customweb_I18n_Translation::__('CVC Code'), $this->cvcControl, Customweb_I18n_Translation::__('Please enter here the CVC code from your card. You find the code on the back of the card.'));
         $this->cvcElement->setRequired($this->isCvcElementRequired())->setElementIntention(Customweb_Form_Intention_Factory::getCvcIntention())->setErrorMessage($this->getCvcElementErrorMessage());
     }
 }
Ejemplo n.º 2
0
 /**
  * This method creates a Issue Number element for Maestro UK, this element must be created after the corresponnding CVC number field.
  * This field checks if either the cvc or the issue number is not empty.
  *
  * @param string $fieldName
  *        	The field name of the Issue Number field.
  * @deprecated Use instead the Customweb_Payment_Authorization_Method_CreditCard_ElementBuilder
  * @return Customweb_Form_IElement
  */
 public static function getINElementOfCVCandINPair($fieldName, $errorMessage = null, $required = true)
 {
     $control = new Customweb_Form_Control_TextInput($fieldName);
     $control->setAutocomplete(false);
     if ($required) {
         $control->addValidator(new Customweb_Form_Validator_OneNotEmptyLast($control, Customweb_I18n_Translation::__('You have to enter either the CVC code or the issue number of your card.'), 'cwCVCandINControl'));
     }
     $element = new Customweb_Form_Element(Customweb_I18n_Translation::__('Issue Number'), $control, Customweb_I18n_Translation::__('Please enter your issue number, if there is no CVC code on your card.'));
     $element->setElementIntention(Customweb_Form_Intention_Factory::getCvcIntention())->setErrorMessage($errorMessage);
     return $element;
 }