protected function executePostRequest(Gpf_Rpc_Params $params) { $signupFormHandler = new Pap_Signup_AffiliateForm(); return $signupFormHandler->add($params); }
protected function registerAffiliate() { $this->debug("Start registering affiliate, params Name='".$this->getUserFirstName()."', Surname='".$this->getUserLastName()."', username='******'"); if ($this->allRequireValues()) { try { $signupForm = new Pap_Signup_AffiliateForm(); $form = $signupForm->add($this->createSignupParams()); if (!$form->isSuccessful()) { $this->debug('Creating affiliate error: ' . $form->getErrorMessage()); } else { $this->debug('Affiliate created successfully: ' . $form->getInfoMessage()); } } catch (Gpf_Exception $e) { $this->debug("Error while saving affiliate: " . $e->getMessage()); } } else { $this->debug("Some essential values for creating new affiliate account is missing, process stopped"); } $this->debug("End registering affiliate"); }