Example #1
0
 protected function createComponentPaypalPayForm()
 {
     $form = new Form();
     if ($this->translator) {
         $form->setTranslator($this->translator);
     }
     $form->addImage('paypalPay', $this->payImage, 'Pay with PayPal');
     $form->onSuccess[] = callback($this, 'processPayment');
     return $form;
 }
Example #2
0
 /**
  * If some submodule wants to create new button,
  * it should call this function for its creation.
  *
  * @return \Nette\Application\UI\Form $button
  */
 public function createComponentButton()
 {
     $form = new Form();
     if ($this->translator) {
         $form->setTranslator($this->translator);
     }
     $form->addImage('paypalCheckOutButton', self::PAYPAL_BUTTON_IMAGE, 'Check out with PayPal');
     $form->onSuccess[] = array($this, 'initPayment');
     return $form;
 }