function init() { add_paysystem_to_list(array('paysys_id' => $this->get_plugin_name(), 'title' => $this->config['title'] == '' ? $this->title : $this->config['title'], 'description' => $this->config['description'] == '' ? $this->description : $this->config['description'], 'fixed_price' => $this->fixed_price, 'public' => $this->public, 'recurring' => $this->recurring, 'built_in_trials' => $this->built_in_trials)); if ($this->recurring) { add_product_field('is_recurring', 'Recurring Billing', 'checkbox', 'should user be charged automatically<br /> when subscription expires'); } if ($this->built_in_trials) { 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'); } }
foreach ($problems as $s) { if (preg_match('/^EXPIRED-(\\d+)$/', $s, $args)) { $prt = $db->get_product($args[1]); $titles[] = '"' . $prt['title'] . '"'; } } if ($titles) { $error[] = "\"{$pr[title]}\" cannot be ordered " . "because you already have expired subscription(s) " . "for: " . join(', ', $titles); } } } } return $error; } add_product_field('##12', 'Product Availability/Visibilty', 'header'); add_product_field('scope', 'Scope', 'select', "Limits who can order this product<br />\n (Does not affect existing customers)", '', array('options' => array('' => 'Visible for all', 'disabled' => 'Disabled (hidden both on signup.php and member.php)', 'signup' => 'Only Signup (hide from member.php page)', 'member' => 'Only Members having completed subscriptions (hide from signup page)'))); add_product_field('order', 'Sorting order', 'text', "This is a numeric field. Products<br />\n will be sorted according to this number, then alphabetically\n "); add_product_field('price_group', 'Price Group ID', 'text', "This is a numeric field. Products with a negative price_group<br />\n will not be displayed on the default Signup page. You can link to<br />\n an alternate Signup page like this 'signup.php?price_group=-1'<br /> to display\n products ONLY from Price Group -1. You can enter<br />\n comma-separated ',' lists of pricegroups as well\n "); add_product_field('renewal_group', 'Renewal Group', 'text', "Value in this field defines how aMember will calculate<br />\n subscription start date when user renews his membership.<br />\n Please read <a href='http://manual.amember.com/Product_Renewal_Group_Explained' target=_blank>this article</a> to get idea of this feature.<br />\n In short - set the same values for products offering the same level of access<br />\n - set different values for products offering different level of access\n "); add_product_field('need_agreement', 'Display Agreement', 'checkbox', "Specify whether the user must agree to your Customer<br />\n Agreement before being allowed to proceed with payment.<br />\n Please put your agreement text into template:<br />\n <em>templates/agreement.html</em>", ''); add_product_field('##13', 'Additional Options', 'header'); if (!is_lite()) { add_product_field('autoresponder_renew', 'Send Automatic Emails after Renewal', 'select', "When user renews subscription, aMember can<br />\n resend days counter and start emails again from first one<br />\n or aMember can continue old mailing cycle.\n ", '', array('options' => array('' => 'Continue old mailing cycle', '1' => 'Reset days counter to zero, start new cycle'))); add_product_field('dont_mail_expire', 'Do not send expiration e-mail for this product', 'hidden', "if you set this, expiration e-mail will not be send<br />\n for subscriptions to this product.\n ", '', array('options' => array('' => 'Send expiration e-mail (default)', '1' => 'Do not send expiration e-mail', '2' => 'Always send expiration e-mail'))); } add_product_field('terms', 'Custom Subscription Terms to Display', 'text', "this text will be displayed to customer near the<br />\n product title on signup.php and member.php pages<br /> \n to explain payment terms<br />\n if you keep it empty, it will be generated automatically<br />\n if that is filled-in, you have to change it manually when<br />\n you change product price or other parameters\n ", '', array('insert_before' => '##11', 'size' => 60)); unset($GLOBALS['COUPON_NOT_USED']); unset($GLOBALS['COUPON_DISCOUNT']); unset($GLOBALS['TAX_AMOUNT']); unset($GLOBALS['TAXES']); unset($GLOBALS['PAYMENT_TERMS']);
$config['cc_company'] = 1; $config['cc_phone'] = 1; } require_once "{$config['root_dir']}/plugins/payment/payready/pay.inc.php"; setup_plugin_hook('get_member_links', 'payready_get_member_links'); setup_plugin_hook('daily', 'payready_rebill'); add_product_field('is_recurring', 'Recurring Billing', 'select', 'should user be charged automatically<br /> when subscription expires', '', array('options' => array('' => 'No', 1 => 'Yes'))); add_product_field('trial1_days', 'Trial 1 Duration', 'period', 'Trial 1 duration'); 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: not for all payment processing this option is working'); add_product_field('authorize_currency', 'PayReady Currency', 'select', 'valid only for PayReady processing.<br /> You should not change it<br /> if you use another payment processors', '', array('options' => array('' => 'USD', 'GBP' => 'GBP', 'EUR' => 'EUR', 'CAD' => 'CAD', 'JPY' => 'JPY'))); global $config; $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));
/* * * * Author: Alex Scott * Email: alex@cgi-central.net * Web: http://www.cgi-central.net * Details: The installation file * FileName $RCSfile$ * Release: 3.1.8PRO ($Revision: 1781 $) * * Please direct bug reports,suggestions or feedback to the cgi-central forums. * http://www.cgi-central.net/forum/ * * aMember PRO is a commercial software. Any distribution is strictly prohibited. * */ add_paysystem_to_list(array('paysys_id' => 'paycom', 'title' => $config['payment']['paycom']['title'] ? $config['payment']['paycom']['title'] : _PLUG_PAY_PAYCOM_TITLE, 'description' => $config['payment']['paycom']['description'] ? $config['payment']['paycom']['description'] : _PLUG_PAY_PAYCOM_DESC, 'public' => 1, 'fixed_price' => 1)); add_product_field('paycom_id', 'PayCom Product/Subscription ID', 'text', 'you must create the same product<br /> in paycom and enter its ID here'); // need to configure products in clickbank and set thanks page to ./thanks.php class payment_paycom extends payment { function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars) { global $db, $config, $plugin_config; $t =& new_smarty(); $t->assign(array('this_config' => $this->config, 'member' => $db->get_user($member_id), 'payment' => $pm = $db->get_payment($payment_id), 'product' => $db->get_product($pm['product_id']))); $t->display(dirname(__FILE__) . '/paycom.html'); exit; } }
function init() { parent::init(); if (!$this->config['country']) { $this->config['country'] = 'UK'; } add_product_field('eway_currency', 'EWAY Currency', 'select', '', '', array('options' => array('GBP' => 'GBP'))); }
function payment_adultprocessor($config) { parent::payment($config); add_product_field('adultprocessor_siteid', 'Adultprocessor Site ID', 'text', '', ''); add_product_field('adultprocessor_scheduleid', 'Adultprocessor Schedule ID', 'text', '', ''); }
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 init() { parent::init(); add_product_field('globillnet_id', 'Globill.net ID', 'text', 'You must create this same subscription<br />in Globill.net and enter its number here', 'validate_globillnet_id'); }
function init() { parent::init(); add_product_field('twocheckout_id', '2Checkout ID', 'text', 'you must create the same product<br /> in 2Checkout and enter its number here<br /> it can be found at 2CO -> PRODUCTS -> VIEW: 2CO ID', 'validate_twocheckout_id'); }
<?php add_product_field('is_recurring', 'Recurring Billing', 'select', 'should user be charged automatically<br /> when subscription expires', '', array('options' => array('' => 'No', 1 => 'Yes'))); add_paysystem_to_list(array('paysys_id' => 'verotel', 'title' => $config['payment']['verotel']['title'] ? $config['payment']['verotel']['title'] : _PLUG_PAY_VEROTEL_TITLE, 'description' => $config['payment']['verotel']['description'] ? $config['payment']['verotel']['description'] : _PLUG_PAY_VEROTEL_DESC, 'public' => 1, 'recurring' => 1, 'fixed_price' => 1)); add_product_field('verotel_id', 'VeroTel Site ID', 'text', ''); function verotel_vsf(&$vars) { $err = array(); if (preg_match('/^.*_+.*$/', $vars['login'])) { $err[] = "Verotel does not accept usernames with underscores"; } return $err; } setup_plugin_hook('validate_signup_form', 'verotel_vsf'); class payment_verotel extends payment { function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars) { global $config, $db; $product =& get_product($product_id); $member = $db->get_user($member_id); $c_product_id = $product->config['verotel_id']; if (!$c_product_id) { fatal_error("Verotel Product ID empty for Product# {$product_id}"); } $vars = array('verotel_id' => $this->config['merchant_id'], 'verotel_product' => $c_product_id, 'verotel_website' => $c_product_id, 'verotel_usercode' => $member['login'], 'verotel_passcode' => $member['pass'], 'verotel_custom1' => $payment_id, 'verotel_custom2' => $member_id, 'verotel_custom3' => $product_id); $vars1 = array(); foreach ($vars as $kk => $vv) { $v = urlencode($vv); $k = urlencode($kk);
* 2009-09-06 v3.1.8.2 K.Gary Fixed bug where set wrong session variable name. * 2009-09-03 v3.1.8.1 K.Gary Clear one-click session variables in receipts when upsells and offers are complete. * 2009-05-28 v3.1.8.0 K.Gary Tested with aMember version 3.1.8 * 2009-05-28 v3.1.7.1 K.Gary Changed revision naming rules to match aMembers current level * 2009-05-26 v1.1 K.Gary Added field for copy to display on thank you page when a product is purchased. * 2009-05-20 v1.0 K.Gary Original Version. * * ============================================================================= * **/ if (!defined('INCLUDED_AMEMBER_CONFIG')) { die("Direct access to this location is not allowed"); } global $db; add_product_field('amthankyou_header', 'amThankYou v3.2.3.1', 'header', '', '', array('insert_before' => '##12')); add_product_field('amthankyou_copy', 'Thank You Page Copy', 'textarea', 'Enter the copy you want to show on the<br /> thank you page when this product is purchased.', '', array('insert_after' => 'amthankyou_header')); function check_setup_amthankyou() { global $plugin_config, $config, $db; $this_config = $plugin_config['protect']['amthankyou']; return ''; } // end check_setup_amthankyou if (!check_setup_amthankyou()) { // setup_plugin_hook('subscription_updated', 'amthankyou_updated'); // setup_plugin_hook('subscription_rebuild', 'amthankyou_rebuild'); // setup_plugin_hook('subscription_added', 'amthankyou_added'); // setup_plugin_hook('subscription_deleted', 'amthankyou_deleted'); // setup_plugin_hook('subscription_removed', 'amthankyou_removed'); setup_plugin_hook('filter_output', 'amthankyou_filter_output'); }
function init() { parent::init(); add_product_field('moneybookers_currency', 'moneybookers Currency', 'select', 'valid only for moneybookers processing.<br /> You should not change it<br /> if you use another payment processors', '', array('options' => array('' => 'USD', 'GBP' => 'GBP', 'EUR' => 'EUR', 'CAD' => 'CAD', 'JPY' => 'JPY'))); }
* Please direct bug reports,suggestions or feedback to the cgi-central forums. * http://www.cgi-central.net/forum/ * * aMember PRO is a commercial software. Any distribution is strictly prohibited. * */ $plugins['payment'][] = 'globill_phone'; $plugins['payment'][] = 'globill_check'; add_paysystem_to_list(array('paysys_id' => _PLUG_PAY_GLOBILL_ID, 'title' => _PLUG_PAY_GLOBILL_TITLE, 'description' => sprintf(_PLUG_PAY_GLOBILL_DESC, '<a href="http://www.globill.com" target=_blank>', '</a>'), 'public' => 1, 'recurring' => 1)); add_paysystem_to_list(array('paysys_id' => _PLUG_PAY_GLOBILL_PH_ID, 'title' => _PLUG_PAY_GLOBILL_PH_TITLE, 'description' => sprintf(_PLUG_PAY_GLOBILL_PH_DESC, '<a href="http://www.globill.com" target=_blank>', '</a>'), 'public' => 1, 'recurring' => 1)); add_paysystem_to_list(array('paysys_id' => _PLUG_PAY_GLOBILL_CH_ID, 'title' => _PLUG_PAY_GLOBILL_CH_TITLE, 'description' => sprintf(_PLUG_PAY_GLOBILL_CH_DESC, '<a href="http://www.globill.com" target=_blank>', '</a>'), 'public' => 1, 'recurring' => 1)); add_product_field('globill_cc_id', 'GloBill CC ID', 'text', 'you must create the same product<br /> in GloBill for CC billing. Enter pricegroup here'); add_product_field('globill_phone_id', 'GloBill Phone ID', 'text', 'you must create the same product<br /> in GloBill for Phone billing. Enter pricegroup here'); add_product_field('globill_check_id', 'GloBill Check ID', 'text', 'you must create the same product<br /> in GloBill for Online Check payment. Enter pricegroup here'); // need to configure products in clickbank and set thanks page to ./thanks.php class payment_globill extends payment { function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars) { global $config, $db, $plugin_config; $product =& get_product($product_id); $payment = $db->get_payment($payment_id); $member = $db->get_user($member_id); $this_config = $plugin_config['payment']['globill']; $vars = array('id' => $this_config['site_id'], 'username' => $member['login'], 'password' => $member['pass'], 'email' => $member['email'], 'firstname' => $member['name_f'], 'lastname' => $member['name_l'], 'address' => $member['street'], 'city' => $member['city'], 'state' => $member['state'], 'zip' => $member['zip'], 'country' => $member['country'], 'user1' => $payment_id, 'user2' => $member_id, 'user3' => $product_id); if ($payment['paysys_id'] == 'globill') { $pg = $product->config['globill_cc_id']; if (!$pg) { return _PLUG_PAY_GLOBILL_CANNOTORDER;
function init() { parent::init(); add_product_field('worldpay_currency', 'WorldPay Currency', 'select', 'currency for WorldPay gateway', '', array('options' => array('' => 'USD', 'GBP' => 'GBP', 'EUR' => 'EUR', 'JPY' => 'JPY', 'AUD' => 'AUD'))); }
function init() { parent::init(); add_product_field('gtbill_price_id', 'GTBill Price ID', 'text', 'Subscription plan PriceID.<br />Can be sent in as a comma delimited string, Ex. 1,2,3', 'validate_gtbill_price_id'); add_product_field('gtbill_currency', 'GTBill Currency', 'select', 'currency for GTBill gateway', '', array('options' => array('USD' => 'US Dollar', 'EUR' => 'Euro', 'GBP' => 'Pound Sterling'))); }
<?php if (!defined('INCLUDED_AMEMBER_CONFIG')) { die("Direct access to this location is not allowed"); } add_product_field('is_recurring', 'Recurring Billing', 'select', 'should user be charged automatically<br /> when subscription expires', '', array('options' => array('' => 'No', 1 => 'Yes'))); add_product_field('trial1_days', 'Trial 1 Duration', 'period', 'read PayPal docs for explanation, leave empty to not use trial'); add_product_field('trial1_price', 'Trial 1 Price', 'money', 'set 0 for free trial'); add_paysystem_to_list(array('paysys_id' => 'safepay', 'title' => $config['payment']['safepay']['title'] ? $config['payment']['safepay']['title'] : _PLUG_PAY_SAFEPAY_TITLE, 'description' => $config['payment']['safepay']['description'] ? $config['payment']['safepay']['description'] : sprintf(_PLUG_PAY_SAFEPAY_DESC, '<a href="http://www.safepaysolutions.com" target=_blank>', '</a>'), 'recurring' => 1, 'public' => 1, 'built_in_trials' => 1)); function get_date_day_diff($start_date, $end_date) { $days = 0; if ($start_date < $end_date) { $date1 = $start_date; $date2 = $end_date; } else { $date1 = $end_date; $date2 = $start_date; } while ($date1 + 86400 < $date2) { // only different dates //$thedate = getdate($date1); //if (($thedate["wday"] != '0') and ($thedate["wday"] != '6')) //Skip saturday or sunday. $days++; $date1 += 86400; // Add a day. } return $days; } class payment_safepay extends payment
function init() { parent::init(); add_product_field('fastspring_id', 'FastSpring Product ID', 'text', "You can get an ID from your FastSpring account -> Product Pages -> Option 1: View Product Detail Page \n <br />For example ID is 'testmembership' for an URL http://sites.fastspring.com/your_company/product/testmembership", 'validate_fastspring_id'); }
add_product_field('ccbill_id', 'ccBill Product/Subscription ID', 'text', 'you must create the same product<br /> in ccbill for CC billing. Enter pricegroup here'); add_product_field('ccbill_subaccount_id', 'ccBill SubAccount ID', 'text', 'keep empty to use default value (from config)'); add_product_field('ccbill_cc_form', 'ccBill CC Form ID', 'text', 'enter ccBill Form id to pay with credit card'); if ($GLOBALS['config']['payment']['ccbill']['use_cheques']) { $plugins['payment'][] = 'ccbill_check'; add_paysystem_to_list(array('paysys_id' => 'ccbill_check', 'title' => 'Online Check', 'description' => _PLUG_PAY_CC_BILL_CHECK_DESCR, 'public' => 1, 'recurring' => 1)); add_product_field('ccbill_check_form', 'ccBill Check Form ID', 'text', 'enter ccBill Form id to pay with online check'); } if ($GLOBALS['config']['payment']['ccbill']['use_900']) { $plugins['payment'][] = 'ccbill_900'; add_paysystem_to_list(array('paysys_id' => 'ccbill_900', 'title' => 'ccBill 900', 'description' => _PLUG_PAY_CC_BILL_TEL_DESCR, 'public' => 1, 'recurring' => 1)); add_product_field('ccbill_900_subaccount_id', 'ccBill 900 SubAccount ID', 'text', 'enter to specify alternative subaccount ID for ccBill900 billing'); add_product_field('ccbill_900_form', 'ccBill 900 Form ID', 'text', 'enter ccBill Form id to pay with ccBill900 phone bill'); } add_product_field('is_recurring', 'Recurring Billing', 'select', 'should user be charged automatically<br /> when subscription expires', '', array('options' => array('' => 'No', 1 => 'Yes'))); function ccbill_get_url($url, $post = '') { global $db; if (extension_loaded("curl")) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_HEADER, 0); if ($post) { curl_setopt($ch, CURLOPT_POSTFIELDS, $post); } curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $buffer = curl_exec($ch); if ($buffer === false) { $db->log_error(curl_error($ch)); } curl_close($ch);
function init() { parent::init(); add_product_field('gate2shop_currency', 'Gate2Shop Currency', 'select', 'currency for Gate2Shop gateway', '', array('options' => array('USD' => 'US Dollar', 'EUR' => 'Euro', 'GBP' => 'Pound Sterling'))); }
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'); } }
function init() { parent::init(); add_product_field('1shoppingcart_id', '1ShoppingCart Product ID#', 'text', "please take product ID# from 1ShoppingCart control panel<br>\n and enter here. To avoid confusion, product must have the same<br>\n price and duration settings"); add_product_field('trial1_days', 'Trial 1 Duration', 'period', 'read docs for explanation, leave empty to not use trial'); add_product_field('trial1_price', 'Trial 1 Price', 'money', 'set 0 for free trial'); $this->config['api_url'] = 'https://www.mcssl.com/API/'; }
* * Author: Alex Scott * Email: alex@cgi-central.net * Web: http://www.cgi-central.net * Details: The installation file * FileName $RCSfile$ * Release: 3.1.8PRO ($Revision: 1781 $) * * Please direct bug reports,suggestions or feedback to the cgi-central forums. * http://www.cgi-central.net/forum/ * * aMember PRO is a commercial software. Any distribution is strictly prohibited. * */ add_paysystem_to_list(array('paysys_id' => 'egspay', 'title' => $config['payment']['egspay']['title'] ? $config['payment']['egspay']['title'] : _PLUG_PAY_EGSPAY_TITLE, 'description' => $config['payment']['egspay']['description'] ? $config['payment']['egspay']['description'] : sprintf(_PLUG_PAY_EGSPAY_DESC, '<a href="http://www.egspay.com" target=_blank>', '</a>'), 'public' => 1, 'fixed_price' => 1)); add_product_field('egspay_id', 'EgsPay Product ID', 'text', 'you must create the same product<br /> in egspay and enter its number here'); // need to configure products in clickbank and set thanks page to ./thanks.php class payment_egspay extends payment { function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars) { global $config, $db; $product =& get_product($product_id); $member = $db->get_user($member_id); $c_product_id = $product->config['egspay_id']; if (!$c_product_id) { fatal_error("EgsPay Product ID empty for Product# {$product_id}"); } $vars = array('siteid' => $this->config['site_id'], 'productid' => $c_product_id, 'fname' => $member['name_f'], 'lname' => $member['name_l'], 'email' => $member['email'], 'address' => $member['street'], 'city' => $member['city'], 'state' => $member['state'], 'zip' => $member['zip'], 'country' => $member['country'], 'email' => $member['email'], 'username' => $member['login'], 'login' => $member['login'], 'password' => $member['pass'], 'var1' => $payment_id, 'var2' => $member_id, 'var3' => $product_id); $vars1 = array(); foreach ($vars as $kk => $vv) {
* * Author: Alex Scott * Email: alex@cgi-central.net * Web: http://www.cgi-central.net * Details: ccbill payment plugin * FileName $RCSfile$ * Release: 3.1.9PRO ($Revision: 1781 $) * * Please direct bug reports,suggestions or feedback to the cgi-central forums. * http://www.cgi-central.net/forum/ * * aMember PRO is a commercial software. Any distribution is strictly prohibited. * */ add_paysystem_to_list(array('paysys_id' => 'micropayment', 'title' => $config['payment']['micropayment']['title'] ? $config['payment']['micropayment']['title'] : "Micropayment Credit Card", 'description' => $config['payment']['micropayment']['description'] ? $config['payment']['micropayment']['description'] : "Credit Card Payments", 'public' => 1)); add_product_field('micropayment_project', 'Micropayment Project Code', 'text', ''); $plugins['payment'][] = 'micropayment_debit'; add_paysystem_to_list(array('paysys_id' => 'micropayment_debit', 'title' => 'Micropayment Debit Card', 'description' => "Debit Card Payments", 'public' => 1)); // need to configure products in clickbank and set thanks page to ./thanks.php class payment_micropayment extends payment { function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars) { global $config, $db, $plugin_config; $this->config = $config['payment']['micropayment']; $product =& $db->get_product($product_id); $payment = $db->get_payment($payment_id); $member = $db->get_user($member_id); $vars = array('project' => $product['micropayment_project'], 'amount' => intval($price * 100), 'freepaymentid' => $payment_id); switch ($payment['paysys_id']) { case 'micropayment':
$u = $db->get_user($member_id); $u['is_affiliate'] = 1; $_AFF_MAKE_AFFILIATE = 1; $db->update_user($member_id, $u); if ($config['aff']['mail_signup_user']) { check_aff_signup_email_sent($member_id); } unset($_AFF_MAKE_AFFILIATE); } global $config; if ($config['use_affiliates']) { /**/ add_product_field('aff_commission', 'Affiliate commission for first payment', 'text', 'affiliate comissions for first payment, ex.: 1.5 or 2.5%'); add_product_field('aff_commission_rec', 'Affiliate commission for the following payments', 'text', 'affiliate comissions for following payments, ex.: 0 or 5%'); add_product_field('aff_commission2', '2 Tier - Affiliate commission for first payment', 'text', 'affiliate comissions for referrer of the affiliate'); add_product_field('aff_commission_rec2', '2 Tier - Affiliate commission for the following payments', 'text', 'affiliate comissions for referrer of the affiliate'); add_member_field('aff_signup_email_sent', 'Affiliate Signup Email Sent', 'hidden', '', '', array('hidden_anywhere' => 1)); /**/ if (in_array('paypal', (array) $config['aff']['payout_methods'])) { add_member_field('aff_paypal_email', _AFF_MEMBER_F1_1, 'text', '', '', array('hidden_anywhere' => 1)); } if (in_array('stormpay', (array) $config['aff']['payout_methods'])) { 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'])) {
before Array ( [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;
function init() { parent::init(); add_product_field('dotpay_currency', 'DotPay Currency', 'select', 'currency for DotPay gateway', '', array('options' => array('PLN' => 'PLN', 'EUR' => 'EUR', 'USD' => 'USD', 'GBP' => 'GBP', 'JPY' => 'JPY'))); }
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', '', ''); }
$config['cc_company'] = 1; $config['cc_phone'] = 1; } require_once "{$config['root_dir']}/plugins/payment/theinternetcommerce/pay.inc.php"; setup_plugin_hook('get_member_links', 'theinternetcommerce_get_member_links'); setup_plugin_hook('daily', 'theinternetcommerce_rebill'); add_product_field('is_recurring', 'Recurring Billing', 'select', 'should user be charged automatically<br /> when subscription expires', '', array('options' => array('' => 'No', 1 => 'Yes'))); add_product_field('trial1_days', 'Trial 1 Duration', 'period', 'Trial 1 duration'); 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: not for all payment processing this option is working'); add_product_field('theinternetcommerce_currency', 'TheInternetCommerce Currency', 'select', 'valid only for TheInternetCommerce processing.<br /> You should not change it<br /> if you use another payment processors', '', array('options' => array('' => 'USD', 'GBP' => 'GBP', 'EUR' => 'EUR', 'CAD' => 'CAD', 'JPY' => 'JPY'))); 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 (0 || $config['payment']['theinternetcommerce']['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' => 'theinternetcommerce', 'title' => $config['payment']['theinternetcommerce']['title'] ? $config['payment']['theinternetcommerce']['title'] : _PLUG_PAY_INETCOM_TITLE, 'description' => $config['payment']['theinternetcommerce']['description'] ? $config['payment']['theinternetcommerce']['description'] : _PLUG_PAY_INETCOM_DESC, 'public' => 1, 'recurring' => 1));
* FileName $RCSfile$ * Release: 3.1.8PRO ($Revision: 1781 $) * * Please direct bug reports,suggestions or feedback to the cgi-central forums. * http://www.cgi-central.net/forum/ * * aMember PRO is a commercial software. Any distribution is strictly prohibited. * */ global $config; $_title = $config['payment']['anylink']['title']; if ($_title == '') { $_title = _PLUG_PAY_ANYLINK_TITLE; } add_paysystem_to_list(array('paysys_id' => 'anylink', 'title' => $_title, 'description' => $config['payment']['anylink']['description'] ? $config['payment']['authorize']['description'] : _PLUG_PAY_ANYLINK_CCACCEPTED, 'recurring' => 0, 'public' => 1, 'fixed_price' => 1)); add_product_field('anylink_url', 'AnyLink URL', 'text', 'URL where user will be redirected to make payment<br /> if he chooses "anylink" payment option', 'validate_anylink_url'); class payment_anylink extends payment { function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars) { global $config, $db; $p = $db->get_payment($payment_id); $pr = $db->get_product($p['product_id']); $u = $db->get_user($member_id); $url = $pr['anylink_url']; foreach ($u as $k => $v) { $url = str_replace('{$member.' . $k . '}', $v, $url); } $url = str_replace('{$payment_id}', $payment_id, $url); if ($url == '') { fatal_error(sprintf(_PLUG_PAY_ANYLINK_REDIR_ERROR, $p[product_id]));
function init() { add_product_field('google_merchant_item_id', 'Google Checkout Merchant item ID', 'text', 'contains a value, such as a stock keeping unit (SKU), that you use to uniquely identify an item', 'google_checkout_validate_product'); add_product_field('google_currency', 'Google Checkout Currency', 'text', 'identifies the unit of currency associated with the Price<br /> The value of the currency attribute must be a three-letter <a href="http://www.iso.org/iso/en/prods-services/popstds/currencycodeslist.html" target="_blank">ISO 4217 currency code</a>', ''); 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'); add_product_field('digital_content', 'Google Checkout Digital content', 'checkbox', 'see <a href="http://code.google.com/intl/ru/apis/checkout/developer/Google_Checkout_Digital_Delivery.html" target="_blank">manual</a>', ''); add_product_field('delivery_schedule', 'Google Checkout Delivery schedule', 'select', 'you can specify when the buyer will receive instructions for accessing the purchased digital content', '', array('options' => array('PESSIMISTIC' => 'Pessimistic delivery', 'OPTIMISTIC' => 'Optimistic delivery')), array('default' => 'PESSIMISTIC')); add_product_field('delivery_method', 'Google Checkout Delivery method', 'select', 'you can specify how instructions for accessing the digital content will be communicated to the buyer', '', array('options' => array('email' => 'Email delivery', 'key' => 'Key/URL delivery', 'description' => 'Description-based delivery')), array('default' => 'email')); add_product_field('delivery_description', 'Google Checkout Delivery Description', 'textarea', 'contains instructions for downloading a digital content item', ''); add_product_field('delivery_key', 'Google Checkout Delivery Key', 'text', 'contains a key needed to download or unlock a digital content item', ''); add_product_field('delivery_url', 'Google Checkout Delivery URL', 'text', 'specifies a URL from which the customer can download or access the purchased content', ''); }