/** * @see OptimizePress_Modules_Email_ProviderInterface::register() */ public function register($list, $email, $fname, $lname) { $this->logger->info('Registering user (MailPoet): ' . print_r(func_get_args(), true)); $data = array('user' => array('email' => $email, 'firstname' => $fname, 'lastname' => $lname), 'user_list' => array('list_ids' => array($list))); $helperUser = WYSIJA::get('user', 'helper'); $status = $helperUser->addSubscriber($data); $this->logger->notice('Registration status (MailPoet): ' . print_r($status, true)); return true; }
/** * @see OptimizePress_Modules_Email_ProviderInterface::register() */ public function register($list, $email, $fname, $lname) { $this->logger->info('Registering user: '******'first_name' => $fname, 'last_name' => $lname)); $this->logger->notice('Registration status: ' . print_r($status, true)); return true; }
/** * @see OptimizePress_Modules_Email_ProviderInterface::register() */ public function register($list, $email, $fname, $lname) { $this->logger->info('Registering user: '******'email' => $email, 'first_name' => $fname, 'last_name' => $lname, 'p[' . $list . ']' => $list); $status = $this->getClient()->api("contact/add", $fields); $this->logger->notice('Registration status: ' . print_r($status, true)); return true; }
/** * Returns form fields for given list * @param string $id * @return array */ public function getFormFields($id) { $fields = array('first_name' => 'first_name', 'last_name' => 'last_name', 'phone' => 'phone', 'fax' => 'fax'); $vars = $this->getClient()->customFieldsList(); foreach ($vars as $var) { $fields[$var->name] = $var->name; } $this->logger->notice('Form Fields: ' . print_r($fields, true)); return $fields; }
/** * @see OptimizePress_Modules_Email_ProviderInterface::register() */ public function register($list, $email, $fname, $lname) { $this->logger->info('Registering user: '******'first_name' => $fname, 'last_name' => $lname), array($list)); $this->logger->notice('Registration status: ' . print_r($status, true)); if (!isset($status->added) || $status->added != 1) { // No extra info then the one provided by debug } return true; }
/** * @see OptimizePress_Modules_Email_ProviderInterface::register() */ public function register($list, $email, $fname, $lname) { $this->logger->info('Registering user: '******' ' . $lname, $email, 'standard', 0, null); $this->logger->notice('Registration status: ' . print_r($status, true)); } catch (Exception $e) { $this->logger->error('Error ' . $e->getCode() . ': ' . $e->getMessage()); } return true; }
/** * @see OptimizePress_Modules_Email_ProviderInterface::register() */ public function register($list, $email, $fname, $lname) { $this->logger->info('Registering user: '******'email' => $email, 'name' => $fname . ' ' . $lname)); $this->logger->notice('Registration status: ' . print_r($status, true)); } catch (OP_AWeberAPIException $e) { $this->logger->error('Error ' . $e->type . ': ' . $e->message); } return true; }
/** * @see OptimizePress_Modules_Email_ProviderInterface::register() */ public function register($list, $email, $fname, $lname) { $this->logger->info('Registering user: '******'fname' => $fname, 'lname' => $lname)); $this->logger->notice('Registration status: ' . print_r($status, true)); /* * Displays error */ if (false === $status) { $this->logger->error('Error ' . $this->getClient()->errorCode . ': ' . $this->getClient()->errorMessage); } return true; }
/** * @see OptimizePress_Modules_Email_ProviderInterface::register() */ public function register($list, $email, $fname, $lname) { $this->logger->info('Registering user: '******'normal', $mergeVars['prefix'], $fname, $lname); $this->logger->notice('Adding contact status: ' . print_r($contact, true)); $status = $this->getClient()->subscribeContactToList($contact->contactId, $list); $this->logger->notice('Registration status: ' . print_r($status, true)); return true; } catch (Exception $e) { $this->logger->error('Error ' . $e->getCode() . ': ' . $e->getMessage()); return true; } }
/** * @see OptimizePress_Modules_Email_ProviderInterface::register() */ public function register($list, $email, $fname, $lname) { $this->logger->info('Registering user: '******'EmailAddress' => $email, 'Name' => $fname . ' ' . $lname, 'CustomFields' => array(), 'Resubscribe' => true, 'RestartSubscriptionBasedAutoresponders' => true); $status = $this->getSubscribersClient($list)->add($subscriber); $this->logger->notice('Registration status: ' . print_r($status, true)); /* * Displays error */ if (!$status->was_successful()) { $this->logger->error('Error ' . $status->response->Code . ': ' . $status->response->Message); } return true; }
/** * @see OptimizePress_Modules_Email_ProviderInterface::register() */ public function register($list, $email, $fname, $lname) { $this->logger->info('Registering user: '******'fields']['First Name'] = $fname; $params['fields']['Last Name'] = $lname; $params['fields']['E-Mail'] = $email; if (!empty($list)) { $params['sequences'] = array($list); } try { $status = $this->getClient()->add_contact($params); $this->logger->notice('Registration status: ' . print_r($status, true)); } catch (Exception $e) { $this->logger->error('Error ' . $e->getCode() . ': ' . $e->getMessage()); } return true; }
/** * @see OptimizePress_Modules_Email_ProviderInterface::subscribe() */ public function subscribe($data) { $this->logger->info('Subscribing user: '******'list']) && isset($data['email'])) { $webinarKey = substr($data['list'], 1); unset($data['list']); try { $status = $this->getClient()->createRegistrant($webinarKey, $data); $this->logger->notice('Subscription status: ' . print_r($status, true)); } catch (Exception $e) { $this->logger->error('Error ' . $e->getCode() . ': ' . $e->getMessage()); } return true; } else { $this->logger->alert('Mandatory information not present [list and/or email address]'); wp_die('Mandatory information not present [webinar and/or email address].'); } }