function payment_payvision($config) { parent::payment($config); add_member_field('payvision_cardid', '', 'hidden'); add_member_field('payvision_cardguid', '', 'hidden'); if ($this->config['testing']) { $this->paurl = "https://testprocessor.payvisionservices.com"; } else { $this->paurl = "https://testprocessor.payvisionservices.com"; } }
function check_setup_openid() { global $plugin_config, $config, $db; $this_config = $plugin_config['protect']['openid']; if (!$this_config['sqlupdated']) { openid_sql_field(); } add_member_field('openid', "OpenID UserID", 'text', "", '', array('sql' => 1, 'sql_type' => 'TEXT', 'display_profile' => '0', 'display_signup' => '0', 'default' => 0)); return ''; }
function check_setup_fb_connect() { global $plugin_config, $config, $db; $this_config = $plugin_config['protect']['fb_connect']; if (!$this_config['sqlupdated']) { fb_connect_sql_field(); } add_member_field('fbuserid', "Facebook UserID", 'text', "", '', array('sql' => 1, 'sql_type' => 'INT', 'display_profile' => '0', 'display_signup' => '0', 'default' => 0)); // Check login to Facebook $fbuserid = fb_connect_get_fbuser(); if ($fbuserid) { // Add email permissions button? if ($this_config['fbemail'] && !$_SESSION['fbme']['email']) { add_member_field('fbperm_email', "Sync With Facebook Email", 'readonly', "Automatically updates your profile email address<br/>\n\t\t\t\twhenever you change your Facebook email address<br/>\n\t\t\t\t(NB: Will not work with proxied Facebook email<br/>\n\t\t\t\t addresses, as these are too long)", '', array('display_profile' => '1', 'display_signup' => '0', 'default' => "<a href='https://graph.facebook.com/oauth/authorize?client_id={$this_config['appid']}&redirect_uri={$config['root_url']}/profile.php&scope=email'>Grant Permission</a>")); } // Add publish permissions button if ($this_config['publish_stream']) { add_member_field('fbperm_publish', "Allow Facebook Wall Updates", 'readonly', "Allow us to automatically put a notice on your Wall<br/>\n\t\t\t\twhenever you order a new product from us", '', array('display_profile' => '1', 'display_signup' => '0', 'default' => "<a href='https://graph.facebook.com/oauth/authorize?client_id={$this_config['appid']}&redirect_uri={$config['root_url']}/profile.php&scope=publish_stream'>Grant Permission</a>")); } } return ''; }
function payment_esolutions($config) { parent::payment($config); add_member_field('esolutions_card_id', 'Esolutions Customer Card Id', '', ''); }
function payment_micropayment_cc($config) { parent::payment($config); add_product_field('micropayment_cc_project', 'Micropayment_cc Project Code', 'text', ''); add_member_field('micropayment_cc_customer_vault_id', 'Micropayment_cc Customer Vault Id', '', ''); }
[1] => xxx [2] => yyy [unsubscribed] => 0 ) after Array ( [unsubscribed] => 1 ) */ if (!defined('INCLUDED_AMEMBER_CONFIG')) { die("Direct access to this location is not allowed"); } add_product_field('amail_aweber_header', 'aMail for AWeber v3.2.3.2', 'header', "", '', array('insert_before' => '##12')); add_product_field('amail_aweber_listnames', 'AWeber Listname For This Product', 'text', 'e.g.: If your list is yourlistname@aweber.com then just enter <strong>yourlistname</strong>.<br />(Use commas to separate multiple listnames. But it is best if there is only one.)', '', array('insert_after' => 'amail_aweber_header')); add_member_field('amail_aweber_subscriptions', 'AWeber Subscriptions', 'text', "AWeber lists member has been subscribed to so far.<br />NOTE: It does not mean they confirmed or are still subscribed.", '', null); add_member_field('amail_aweber_unsubscriptions', 'AWeber Un-Subscriptions', 'text', "AWeber lists member has been unsubscribed from.", '', null); define('_TPL_SIGNUP_NEWSLETTERS_SUBSCRIBE_2', 'Your password will be emailed to you.'); function check_setup_amail_aweber() { global $plugin_config, $config, $db; $this_config = $plugin_config['protect']['amail_aweber']; $listname = $this_config['listname']; if (!$listname) { $error = "Error. Please configure 'amail_aweber' plugin at aMember CP -> Setup -> amail_aweber"; if (!$_SESSION['check_setup_amail_aweber_error']) { $db->log_error($error); } $_SESSION['check_setup_amail_aweber_error'] = $error; return $error; } return '';
function init() { parent::init(); add_payment_field('epayph_vars', 'ePay subscription terms', 'hidden', ''); add_product_field('trial1_days', 'Trial 1 Duration', 'period', 'read ePay docs for explanation, leave empty to not use trial', 'validate_period'); add_product_field('trial1_price', 'Trial 1 Price', 'money', 'set 0 for free trial'); add_product_field('rebill_times', 'Recurring Times', 'text', 'Recurring Times. This is the number of payments which<br /> will occur at the regular rate. If omitted, payment will<br /> continue to recur at the regular rate until the subscription<br /> is cancelled.<br /> NOTE: this option is working for particular payment processing methods only'); if ($this->config['allow_create']) { add_product_field('epayph_id', 'ePay Product ID', 'text', 'an ID of corresponding product in your ePay account (item_number)'); } if ($this->config['other_account']) { add_product_field('epayph_other_account', 'Other ePay Account', 'text', 'email address of an other ePay account<br />which will be used with this product'); } add_product_field('epayph_currency', 'ePay Currency', 'select', 'valid only for ePay processing.<br /> You should not change it<br /> if you use another payment processors', '', array('options' => array('' => 'USD', 'GBP' => 'GBP', 'EUR' => 'EUR', 'CAD' => 'CAD', 'AUD' => 'AUD', 'JPY' => 'JPY', 'PHP' => 'PHP'))); add_payment_field('txn_id', 'ePay Transaction Id', 'readonly', 'internal'); add_payment_field('failed_orig_expiration', 'Failed payment original expiration date', 'readonly', 'internal'); add_member_field('epayph_email_rewritten', 'ePay had reset user e-mail', 'hidden', 'internal'); if ($this->config['testing']) { $this->epayph_domain = "www.epay.ph"; } else { $this->epayph_domain = "www.epay.ph"; } }
function payment_authorize_cim($config) { parent::payment($config); add_member_field('authorize_cim_user_profile_id', '', 'hidden'); add_member_field('authorize_cim_user_profile_hash', '', 'hidden'); add_member_field('authorize_cim_payment_profile_id', '', 'hidden'); add_member_field('authorize_cim_payment_profile_hash', '', 'hidden'); if ($this->config['testing']) { $this->wsl = "https://apitest.authorize.net/xml/v1/request.api"; $this->tpu = "https://test.authorize.net/gateway/transact.dll"; } else { $this->wsl = "https://api.authorize.net/xml/v1/request.api"; $this->tpu = "https://secure.authorize.net/gateway/transact.dll"; } }
when subscription expires', '', array('options' => array('' => 'No', 1 => 'Yes'))); add_product_field('rebill_times', 'Recurring Times', 'text', 'Recurring Times. This is the number of payments which<br /> will occur at the regular rate. If omitted, payment will<br /> continue to recur at the regular rate until the subscription<br /> is cancelled.<br /> NOTE: not for all payment processing this option is working'); add_member_field('cc_street', 'Billing Street Address', 'text', "", '', array('hidden_anywhere' => 1)); add_member_field('cc_city', 'Billing City', 'text', "", ''); add_member_field('cc_state', 'Billing State', 'select', "", '', array('options' => db_getStatesForCountry('US', true))); add_member_field('cc_zip', 'Billing ZIP', 'text', "", ''); add_member_field('cc_country', 'Billing Country', 'select', "", '', array('options' => db_getCountryList(true))); add_member_field('cc', 'Credit Card # (visible)', 'readonly', "credit card number (read-only)", '', array('hidden_anywhere' => 1)); add_member_field('cc-hidden', 'Credit Card # (crypted)', 'hidden', '', '', array('hidden_anywhere' => 1)); add_member_field('cc-expire', 'Credit Card Expire', 'readonly', 'Expiration date (mmyy)', '', array('hidden_anywhere' => 1)); add_member_field('cc_name_f', 'Billing First Name', 'text', ''); add_member_field('cc_name_l', 'Billing Last Name', 'text', ''); add_paysystem_to_list(array('paysys_id' => 'netbilling', 'title' => $config['payment']['netbilling']['title'] ? $config['payment']['netbilling']['title'] : _PLUG_PAY_NETBILLING_TITLE, 'description' => $config['payment']['netbilling']['description'] ? $config['payment']['netbilling']['description'] : _PLUG_PAY_NETBILLING_CC_PAYMENT, 'public' => 1, 'recurring' => 1)); class payment_netbilling extends payment { function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars) { global $config; header("Location: {$config['root_surl']}/plugins/payment/netbilling/cc.php?payment_id={$payment_id}&member_id={$member_id}"); return ''; } function get_cancel_link($payment_id) { global $db; $p = $db->get_payment($payment_id); if (!$p['data']['CANCELLED']) { return "member.php?action=cancel_recurring&payment_id={$payment_id}";
function init() { parent::init(); add_product_field('skypay_currency', 'Skyppay Currency', 'select', 'currency for Skypay gateway', '', array('options' => array('GBP' => 'GBP', 'EUR' => 'EUR', 'USD' => 'USD', 'JPY' => 'JPY', 'AUD' => 'AUD'))); add_member_field('street2', 'Billing Street Address 2', 'text', "", '', array('hidden_anywhere' => 1)); }
function init() { parent::init(); add_member_field('saferpay_user_pan', '', 'hidden'); add_member_field('saferpay_user_expmonth', '', 'hidden'); add_member_field('saferpay_user_expyear', '', 'hidden'); }
function cc_core_init($plugin) { global $config, $cc_core; // get features array $pl =& instantiate_plugin('payment', $plugin); $features = $pl->get_plugin_features(); $cc_core[$plugin] =& $pl; /// add_paysystem_to_list(array('paysys_id' => $plugin, 'title' => $pl->config['title'] ? $pl->config['title'] : $features['title'], 'description' => $pl->config['description'] ? $pl->config['description'] : $features['description'], 'public' => 1, 'recurring' => $features['no_recurring'] ? 0 : 1)); // add product fields if (!$features['no_recurring']) { add_product_field('is_recurring', 'Recurring Billing', 'checkbox', 'should user be charged automatically<br /> when subscription expires', ''); add_product_field('trial1_days', 'Trial 1 Duration', 'period', 'Trial 1 duration', 'validate_period'); add_product_field('trial1_price', 'Trial 1 Price', 'money', 'set 0 for free trial', ''); add_product_field('trial_group', 'Trial Group', 'text', "If this field is filled-in, user will be unable to order the product<br />\n twice. It is extermelly useful for any trial product. This field<br />\n can have different values for different products, then 'trial history'<br />\n will be separate for these groups of products.<br />\n If your site offers only one level of membership,<br />\n just enter \"1\" to this field. \n "); add_product_field('rebill_times', 'Recurring Times', 'text', 'Recurring Times. This is the number of payments which<br /> will occur including first payment. If omitted, payment will<br /> continue to recur at the regular rate until the subscription<br /> is cancelled.<br /> NOTE: not for all payment processing this option is working'); } if ($features['currency']) { add_product_field($plugin . '_currency', $pl->config['title'] . " Currency", 'select', "valid only for {$plugin} payments", '', array('options' => $features['currency'])); } /// add member fields add_member_field('cc_country', 'Billing Country', 'select', "", '', array('options' => db_getCountryList(true))); add_member_field('cc_street', 'Billing Street Address', 'text', "", '', array('hidden_anywhere' => 1)); add_member_field('cc_city', 'Billing City', 'text', "", ''); add_member_field('cc_state', 'Billing State', 'state', "", '', array('options' => array(), 'require_value' => array(array('name' => 'cc_country')))); add_member_field('cc_zip', 'Billing ZIP', 'text', "", ''); if ($features['name_f']) { add_member_field('cc_name_f', 'Billing First Name', 'text', ''); add_member_field('cc_name_l', 'Billing Last Name', 'text', ''); } elseif ($features['name']) { add_member_field('cc_name', 'Billing Name', 'text', ''); } if ($features['company']) { add_member_field('cc_company', 'Billing Company', 'text', ''); } if ($features['phone']) { add_member_field('cc_phone', 'Billing Phone#', 'text', ''); } if ($features['housenumber']) { add_member_field('cc_housenumber', 'Billing Housenumber', 'text', ''); } add_member_field('cc', 'Credit Card # (visible)', 'readonly', 'credit card number', '', array('hidden_anywhere' => 1)); add_member_field('cc-hidden', 'Credit Card # (crypted)', 'hidden', '', '', array('hidden_anywhere' => 1)); add_member_field('cc-expire', 'Credit Card Expire', 'readonly', 'Expiration date (mmyy)', '', array('hidden_anywhere' => 1)); if ($features['code'] == 2) { add_member_field('cc_code', 'Credit Card Code (crypted)', 'hidden', '', '', array('hidden_anywhere' => 1)); } if ($features['province_outside_of_us']) { add_member_field('cc_province', 'Billing International Province', 'text', "for international provinces outside of US & Canada include the province name here", ''); } if ($features['maestro_solo_switch']) { add_member_field('cc_issuenum', 'Card Issue #', 'text', "is required for Maestro/Solo/Switch credit cards only", ''); add_member_field('cc_startdate', 'Card Start Date', 'text', "is required for Maestro/Solo/Switch credit cards only", ''); } if ($features['type_options']) { add_member_field('cc_type', 'CC Type', 'select', 'credit card type', '', array('options' => $features['type_options'])); } /// setup hooks if (!$features['no_recurring']) { setup_plugin_hook('get_member_links', $plugin . '_get_member_links'); setup_plugin_hook('hourly', $plugin . '_rebill'); } }
} } ////////////////// ACCESS CHECKER CODE ///////////////////////////////// add_member_field('is_locked', 'Locked', 'select', 'auto-locking by IP', '', array('options' => array('' => 'No', 1 => 'Yes', -1 => "Disable auto-lock for this user"))); global $config; if ($config['manually_approve']) { add_member_field('is_approved', 'Approved', 'select', 'is member manually approved?', '', array('options' => array('' => 'No', 1 => 'Yes'))); } add_member_field('i_agree', 'Agreed With User Agreement', 'hidden', '', '', array('hidden_anywhere' => 1)); add_member_field('signup_email_sent', 'Signup Email Sent', 'hidden', '', '', array('hidden_anywhere' => 1)); add_member_field('approval_email_sent', 'Approval Email Sent', 'hidden', '', '', array('hidden_anywhere' => 1)); add_member_field('selected_lang', 'Selected Language', 'hidden', '', '', array('hidden_anywhere' => 1)); if ($config['verify_email_profile']) { add_member_field('email_new', 'New Email address(not verified)', 'hidden', '', '', array('hidden_anywhere' => 1)); add_member_field('email_confirm_code', 'Email verification confirmation code', 'hidden', '', '', array('hidden_anywhere' => 1)); add_member_field('email_confirm_code_exp', 'Email verification confirmation code expiration time', 'hidden', '', '', array('hidden_anywhere' => 1)); } // running from cron function clear_access_log() { global $db, $config; if (!$config['clear_access_log']) { return; } $dat = date('Y-m-d', time() - $config['clear_access_log_days'] * 3600 * 24); $db->clear_access_log($dat); } // running from cron function delete_old_newsletters() { global $db, $config;
function payment_abnamro($config) { parent::payment($config); add_member_field('abnamro_alias', '', 'hidden'); if ($this->config['testing']) { $this->aburl = "https://internetkassa.abnamro.nl/ncol/test/orderdirect.asp"; } else { $this->aburl = "https://internetkassa.abnamro.nl/ncol/prod/orderdirect.asp"; } }
<?php if (!defined('INCLUDED_AMEMBER_CONFIG')) { die("Direct access to this location is not allowed"); } add_paysystem_to_list(array('paysys_id' => 'manual_euro_bank', 'title' => $config['payment']['manual_euro_bank']['title'], 'description' => $config['payment']['manual_euro_bank']['description'], 'public' => 1, 'fixed_price' => 0)); /// add member fields add_member_field('bank_name', 'Account Holder Name', 'text', '', '', array()); add_member_field('bank_an', 'Account number', 'text', '', '', array()); add_member_field('bank_bic', 'Bank Identifier Code', 'text', '', '', array()); add_member_field('bank_bank_name', 'Bank Name', 'text', '', '', array()); add_member_field('bank_phone', 'Phone', 'text', '', '', array()); add_product_field('is_recurring', 'Recurring Billing', 'checkbox', 'should user be charged automatically<br /> when subscription expires'); add_product_field('trial1_days', 'Trial 1 Duration', 'period', 'trial period duration'); add_product_field('trial1_price', 'Trial 1 Price', 'money', 'enter 0.0 to offer free trial'); class payment_manual_euro_bank extends payment { function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars) { global $db, $config, $plugin_config; $pm = $db->get_payment($payment_id); $member = $db->get_user($member_id); if (!$vars['name']) { $vars['name'] = $member['name_f'] . " " . $member['name_l']; } if (!$vars['street']) { $vars['street'] = $member['street']; } if (!$vars['city']) { $vars['city'] = $member['city']; }
$config['cc_type_options'] = array('1' => 'VISA', '2' => 'Master Card', '3' => 'American Express', '4' => 'Discover Card'); add_member_field('cc_type', 'Credit Card Type', 'select', '', '', array('options' => $config['cc_type_options'])); add_member_field('cc_street', 'Billing Street Address', 'text', "", '', array('hidden_anywhere' => 1)); add_member_field('cc_city', 'Billing City', 'text', "", ''); add_member_field('cc_state', 'Billing State', 'select', "", '', array('options' => db_getStatesForCountry('US', true))); add_member_field('cc_zip', 'Billing ZIP', 'text', "", ''); add_member_field('cc_country', 'Billing Country', 'select', "", '', array('options' => db_getCountryList(true))); add_member_field('cc_name_f', 'Billing First Name', 'text', ''); add_member_field('cc_name_l', 'Billing Last Name', 'text', ''); if ($config['payment']['payready']['wells_fargo']) { add_member_field('cc_company', 'Billing Company', 'text', ''); add_member_field('cc_phone', 'Billing Company', 'text', ''); } add_member_field('cc', 'Credit Card # (visible)', 'readonly', "credit card number (read-only)", '', array('hidden_anywhere' => 1)); add_member_field('cc-hidden', 'Credit Card # (crypted)', 'hidden', '', '', array('hidden_anywhere' => 1)); add_member_field('cc-expire', 'Credit Card Expire', 'readonly', 'Expiration date (mmyy)', '', array('hidden_anywhere' => 1)); add_paysystem_to_list(array('paysys_id' => 'payready', 'title' => $config['payment']['payready']['title'] ? $config['payment']['payready']['title'] : _PLUG_PAY_PAYRDY_TITLE, 'description' => $config['payment']['payready']['description'] ? $config['payment']['payready']['description'] : _PLUG_PAY_PAYRDY_DESC, 'public' => 1, 'recurring' => 1)); class payment_payready extends payment { function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars) { global $config; header("Location: {$config['root_surl']}/plugins/payment/payready/cc.php?payment_id={$payment_id}&member_id={$member_id}"); return ''; } function get_cancel_link($payment_id) { global $db; $p = $db->get_payment($payment_id); if (!$p['data']['CANCELLED']) { return "member.php?action=cancel_recurring&payment_id={$payment_id}";
$vars['cvv'] = $cc_info['cc_code']; } $resp = $this->run_transaction($vars); if ($resp['response'] == 1 && $resp['customer_vault_id']) { $member['data']['inspirepay_customer_vault_id'] = $resp['customer_vault_id']; $db->update_user($member['member_id'], $member); } return $resp; } function update_customer($member, $cc_info) { global $db; $vars = array('customer_vault' => 'update_customer', 'customer_vault_id' => $member['data']['inspirepay_customer_vault_id'], 'username' => $this->config['login'], 'password' => $this->config['pass'], 'ccnumber' => $cc_info['cc_number'], 'ccexp' => $cc_info['cc-expire'], 'email' => $member['email'], 'firstname' => $cc_info['cc_name_f'], 'lastname' => $cc_info['cc_name_l'], 'address1' => $cc_info['cc_street'], 'city' => $cc_info['cc_city'], 'state' => $cc_info['cc_state'], 'zip' => $cc_info['cc_zip'], 'country' => $cc_info['cc_country'], 'ipaddress' => $member['remote_addr'] ? $member['remote_addr'] : $_SERVER['REMOTE_ADDR'], 'phone' => $cc_info['cc_phone']); if ($cc_info['cc_code']) { $vars['cvv'] = $cc_info['cc_code']; } $resp = $this->run_transaction($vars); return $resp; } } function inspirepay_get_member_links($user) { return cc_core_get_member_links('inspirepay', $user); } function inspirepay_rebill() { return cc_core_rebill('inspirepay'); } cc_core_init('inspirepay'); add_member_field("inspirepay_customer_vault_id", "Inspire Pay Customer Vault ID", "text");
add_member_field('aff_stormpay_email', _AFF_MEMBER_F2_1, 'text', '', '', array('hidden_anywhere' => 1)); } if (in_array('ikobo', (array) $config['aff']['payout_methods'])) { add_member_field('aff_ikobo_email', _AFF_MEMBER_F3_1, 'text', '', '', array('hidden_anywhere' => 1)); } if (in_array('moneybookers', (array) $config['aff']['payout_methods'])) { add_member_field('aff_moneybookers_email', _AFF_MEMBER_F4_1, 'text', '', '', array('hidden_anywhere' => 1)); } if (in_array('egold', (array) $config['aff']['payout_methods'])) { add_member_field('aff_egold_id', _AFF_MEMBER_F5_1, 'text', '', '', array('hidden_anywhere' => 1)); } if (in_array('check', (array) $config['aff']['payout_methods'])) { add_member_field('aff_check_payable_to', _AFF_MEMBER_F6_1, 'text', '', '', array('hidden_anywhere' => 1)); } if (in_array('safepay', (array) $config['aff']['payout_methods'])) { add_member_field('aff_safepay_email', _AFF_MEMBER_F7_1, 'text', '', '', array('hidden_anywhere' => 1)); } setup_plugin_hook('finish_waiting_payment', 'add_affiliate_commission'); setup_plugin_hook('get_member_links', 'aff_get_member_links'); if ($config['aff']['signup_type'] == 1) { setup_plugin_hook('update_users', 'aff_make_affiliate'); } } function check_aff_signup_email_sent($member_id) { global $db, $config; $user = $db->get_user($member_id); if (!$user['data']['aff_signup_email_sent']) { mail_signup_affiliate($member_id); $user['data']['aff_signup_email_sent']++; $db->update_user($member_id, $user);
function payment_braintree($config) { parent::payment($config); add_member_field('braintree_customer_vault_id', 'Braintree Customer Vault Id', '', ''); }