本文整理汇总了PHP中add_paysystem_to_list函数的典型用法代码示例。如果您正苦于以下问题:PHP add_paysystem_to_list函数的具体用法?PHP add_paysystem_to_list怎么用?PHP add_paysystem_to_list使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了add_paysystem_to_list函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
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');
}
}
示例2: die
<?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'];
}
示例3: add_paysystem_to_list
* Details: payflow_pro payment plugin
* 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);
示例4: add_paysystem_to_list
*
*
* Author: Centipaid Corporation
* Email: admin@centipaid.com
* Web: http://www.centipaid.com
* Details: Centipaid CART API Payment Plugin
*
* 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' => 'centipaid', 'title' => $config['payment']['centipaid']['title'] ? $config['payment']['centipaid']['title'] : _PLUG_PAY_CENTIP_TITLE, 'description' => $config['payment']['centipaid']['description'] ? $config['payment']['centipaid']['description'] : sprintf(_PLUG_PAY_CENTIP_DESC, '<a target=centipaid href="http://www.centipaid.com/faq/question.php?qstId=1">', '</a>'), 'public' => 1));
class payment_centipaid extends payment
{
function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars)
{
global $config;
$product =& get_product($product_id);
$vars = array('x_Version' => '1.4', 'x_Login' => $this->config['login'], 'x_Test_Request' => $this->config['testing'] ? 'TRUE' : 'FALSE', 'x_Show_Form' => 'PAYMENT_FORM', 'x_Amount' => $price = sprintf('%.2f', $price), 'x_ADC_Relay_Response' => 'True', 'x_Hide_Centipaid' => '1', 'x_Receipt_Link_URL' => $config['root_url'] . '/thanks.php', 'x_ADC_URL' => $config['root_url'] . '/plugins/payment/centipaid/ipn.php', 'x_invoice_num' => $payment_id, 'x_Cust_ID' => $member_id, 'x_Description' => $product->config['title'], 'x_fp_sequence' => $payment_id, 'x_fp_timestamp' => $tstamp = time());
$data = $this->config['login'] . "^" . $payment_id . "^" . $tstamp . "^" . $price . "^";
$vars1 = array();
foreach ($vars as $kk => $vv) {
$v = urlencode($vv);
$k = urlencode($kk);
$vars1[] = "{$kk}={$vv}";
}
$vars2 = join('&', $vars1);
示例5: add_paysystem_to_list
/*
*
*
* 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;
}
}
示例6: add_paysystem_to_list
* Author: Alex Scott
* Email: alex@cgi-central.net
* Web: http://www.cgi-central.net
* Details: Internetsecure Payment Plugin
* 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' => 'internetsecure', 'title' => $config['payment']['internetsecure']['title'] ? $config['payment']['internetsecure']['title'] : _PLUG_PAY_INTERSEC_TITLE, 'description' => $config['payment']['internetsecure']['description'] ? $config['payment']['internetsecure']['description'] : _PLUG_PAY_INTERSEC_DESC, 'public' => 1));
class payment_internetsecure 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);
$vars = array('MerchantNumber' => $this->config['merchant_id'], 'Products' => "{$price}::1::999::" . $product->config['title'] . "::", 'ReturnCGI' => $config['root_url'] . "/plugins/payment/internetsecure/thanks.php?payment_id={$payment_id}", 'xxxName' => $member[name_f] . " " . $member[name_l], 'xxxAddress' => $member[street], 'xxxCity' => $member[city], 'xxxProvince' => $member[state], 'xxxCountry' => $member[contry], 'xxxPostal' => $member[zip], 'xxxEmail' => $member[email]);
if ($this->config['testing']) {
$vars['Products'] .= "{TEST}";
}
$vars1 = array();
foreach ($vars as $kk => $vv) {
$v = urlencode($vv);
$k = urlencode($kk);
示例7: add_paysystem_to_list
* Author: Alex Scott
* Email: alex@cgi-central.net
* Web: http://www.cgi-central.net
* Details: PayFlow Link Payment Plugin
* FileName $RCSfile$
* Release: 3.1.9PRO ($Revision: 3856 $)
*
* 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' => 'authorize', 'title' => $config['payment']['authorize']['title'] ? $config['payment']['authorize']['title'] : _PLUG_PAY_AUTHORIZE_TITLE, 'description' => $config['payment']['authorize']['description'] ? $config['payment']['authorize']['description'] : sprintf(_PLUG_PAY_AUTHORIZE_DESCR, "<a href=\"http://www.authorize.net\">", "</a>"), 'public' => 1));
class payment_authorize extends payment
{
/* function hmac ($key, $data) {
# print "$key=$data<br />";
return (bin2hex (mhash(MHASH_MD5, $data, $key)));
}
*/
function hmac($key, $data)
{
// RFC 2104 HMAC implementation for php.
// Creates an md5 HMAC.
// Eliminates the need to install mhash to compute a HMAC
// Hacked by Lance Rushing
$b = 64;
// byte length for md5
示例8: array
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));
class payment_theinternetcommerce 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/theinternetcommerce/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}";
}
示例9: add_paysystem_to_list
* Author: Alex Scott
* Email: alex@cgi-central.net
* Web: http://www.cgi-central.net
* Details: Chronopay payment plugin
* FileName $RCSfile$
* Release: 3.1.8PRO ($Revision: 1785 $)
*
* 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' => 'chronopay', 'title' => 'chronopay', 'description' => 'ChronoPay.com', 'recurring' => 1, 'public' => 1, 'fixed_price' => 1));
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('chronopay_id', 'ChronoPay product ID', 'text', 'you must create the same product<br />
in ChronoPay and enter its ID number here', '');
class payment_chronopay 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);
$u = $db->get_user($member_id);
$q = $db->query("select title from {$db->config[prefix]}products where product_id='{$product_id}'");
$pr = mysql_fetch_assoc($q);
$p = $db->get_payment($payment_id);
$vars = array('cb_url' => "{$config['root_url']}/plugins/payment/chronopay/ipn.php", 'decline_url' => "{$config['root_url']}/cancel.php", 'name' => $u['name_f'] . ' ' . $u['name_l'], 'city' => $u['city'], 'state' => $u['state'] == 'XX' ? 'NA' : $u['state'], 'street' => $u['street'], 'zip' => $u['zip'], 'country' => $u['country'], 'email' => $u['email'], 'cs1' => $payment_id, 'product_price' => $price, 'product_id' => $product->config['chronopay_id'], 'product_name' => $pr['title'], 'cb_type' => 'G', 'product_price_currency' => 'USD');
示例10: add_paysystem_to_list
* 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' => 'qchex', 'title' => $config['payment']['qchex']['title'] ? $config['payment']['qchex']['title'] : _PLUG_PAY_QCHEX_TITLE, 'description' => $config['payment']['qchex']['description'] ? $config['payment']['qchex']['description'] : sprintf(_PLUG_PAY_QCHEX_DESC, '<a href="http://www.qchex.com" target=_blank>', '</a>'), 'public' => 1));
class payment_qchex 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);
$u = $db->get_user($member_id);
$vars = array('MerchantID' => $this->config['merchant_id'], 'Amount' => $price, 'RefNo' => 'AMEMBER-' . $payment_id, 'PaymentCurrency' => 'USD', 'PayourName' => $u['name_f'] . ' ' . $u['name_l'], 'PayourAddress' => $u['street'], 'PayourCity' => $u['city'], 'PayourState' => $u['state'], 'PayourZipcode' => $u['zip'], 'Memo' => 'Bank-Country=' . $this->config['country'], 'ReturnTo' => sprintf("%s/plugins/payment/qchex/thanks.php?payment_id=%d&member_id=%d&product_id=%d", $config['root_url'], $payment_id, $member_id, $product_id), 'SendBackAuthCode' => 1, 'SendBackMethod' => 'P');
$vars1 = array();
foreach ($vars as $kk => $vv) {
$v = urlencode($vv);
$k = urlencode($kk);
$vars1[] = "{$k}={$v}";
}
$vars = join('&', $vars1);
示例11: add_paysystem_to_list
*
* Author: Alexander Smith
* Email: alexander@cgi-central.net
* Web: http://www.cgi-central.net
* Details: WebAffair payment plugin
* FileName $RCSfile$
*
* 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' => 'webaffair', 'title' => $config['payment']['webaffair']['title'] ? $config['payment']['webaffair']['title'] : "WebAffair", 'description' => $config['payment']['webaffair']['description'] ? $config['payment']['webaffair']['description'] : "Pay by credit card/debit card - Visa/Mastercard", 'public' => 1, 'built_in_trials' => 1));
class payment_webaffair extends payment
{
function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars)
{
global $config, $db;
$amount = sprintf("%d", $price * 100);
$parm = "merchant_id=" . $this->config["merchant"] . " merchant_country=fr amount={$amount} currency_code=978";
$parm .= " pathfile=" . $this->config["pathfile"] . " transaction_id={$payment_id}";
$parm .= " normal_return_url={$config['root_url']}/thanks.php";
$parm .= " cancel_return_url={$config['root_url']}/cancel.php";
$parm = "{$parm} automatic_response_url={$config['root_url']}/plugins/payment/webaffair/ipn.php";
$result = exec($this->config["path_bin"] . " {$parm}");
$tableau = explode("!", "{$result}");
$code = $tableau[1];
$error = $tableau[2];
示例12: add_paysystem_to_list
* Author: Alex Scott
* Email: alex@cgi-central.net
* Web: http://www.cgi-central.net
* Details: NoChex plugin
* 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' => 'nochex', 'title' => $config['payment']['nochex']['title'] ? $config['payment']['nochex']['title'] : _PLUG_PAY_NOCHEX_TITLE, 'description' => $config['payment']['nochex']['description'] ? $config['payment']['nochex']['description'] : _PLUG_PAY_NOCHEX_DESC, 'recurring' => 0, 'public' => 1));
class payment_nochex extends payment
{
function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars)
{
global $db;
global $config;
if (is_array($vars['product_id'])) {
$p = $db->get_payment($payment_id);
$price_count = 0;
foreach ($p['data'][0]['BASKET_PRICES'] as $pp) {
if ($pp) {
$price_count++;
}
}
if ($price_count > 1) {
示例13: add_paysystem_to_list
* 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 is free for both commercial and non-commercial use providing that the
* copyright headers remain intact and the links remain on the html pages.
* Re-distribution of this script without prior consent is strictly prohibited.
*
*/
add_paysystem_to_list(array('paysys_id' => 'securetrading', 'title' => $config['payment']['securetraiding']['title'] ? $config['payment']['securetraiding']['title'] : _PLUG_PAY_SECURTRD_TITLE, 'description' => $config['payment']['securetraiding']['description'] ? $config['payment']['securetraiding']['description'] : _PLUG_PAY_SECURTRD_DESC, 'public' => 1));
add_product_field('securetrading_currency', 'securetrading Currency', 'select', 'valid only for securetrading 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')));
class payment_securetrading extends payment
{
function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars)
{
global $config, $db;
$products = $product_id;
$orig_product_id = $product_id;
if (is_array($product_id)) {
$product_id = $product_id[0];
}
$product =& get_product($product_id);
if (count($orig_product_id) > 1) {
$product->config['title'] = $config['multi_title'];
示例14: add_product_field
* Email: alex@cgi-central.net
* Web: http://www.cgi-central.net
* Details: protx payment plugin
* FileName $RCSfile$
* Release: 3.1.9PRO ($Revision: 4903 $)
*
* 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_product_field('protx_currency', 'protx Currency', 'select', 'currency for protx gateway', '', array('options' => array('' => 'USD', 'GBP' => 'GBP', 'EUR' => 'EUR', 'JPY' => 'JPY')));
add_paysystem_to_list(array('paysys_id' => 'protx', 'title' => $config['payment']['protx']['title'] ? $config['payment']['protx']['title'] : _PLUG_PAY_PROTX_TITLE, 'description' => $config['payment']['protx']['description'] ? $config['payment']['protx']['description'] : _PLUG_PAY_PROTX_DESC, 'public' => 1));
/* The SimpleXor encryption algorithm **
** NOTE: This is a placeholder really. Future releases of VSP Form will use AES or TwoFish. Proper encryption **
** This simple function and the Base64 will deter script kiddies and prevent the "View Source" type tampering **
** It won't stop a half decent hacker though, but the most they could do is change the amount field to something **
** else, so provided the vendor checks the reports and compares amounts, there is no harm done. It's still **
** more secure than the other PSPs who don't both encrypting their forms at all */
function protx_simple_xor($InString, $Key)
{
// Initialise key array
$KeyList = array();
// Initialise out variable
$output = "";
// Convert $Key into array of ASCII values
for ($i = 0; $i < strlen($Key); $i++) {
$KeyList[$i] = ord(substr($Key, $i, 1));
示例15: add_product_field
* Web: http://www.cgi-central.net
* Details: Probilling payment plugin
* 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_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' => 'probilling', 'title' => $config['payment']['probilling']['title'] ? $config['payment']['probilling']['title'] : _PLUG_PAY_PROBILLING_TITLE, 'description' => $config['payment']['probilling']['description'] ? $config['payment']['probilling']['description'] : _PLUG_PAY_PROBILLING_DESC, 'recurring' => 1, 'public' => 1, 'fixed_price' => 1));
add_product_field('pon', 'Probilling PON', 'text', 'probilling payment option number. You have to define' . "\n<br />" . 'in probilling the same product and write their option number' . "\n<br />" . 'in this field');
class payment_probilling 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);
$u = $db->get_user($member_id);
$vars = array('pon' => $product->config['pon'], 'success_redirect' => "{$config['root_url']}/thanks.php", 'failure_redirect' => "{$config['root_url']}/cancel.php", 'first_name' => $u['name_f'], 'last_name' => $u['name_l'], 'address' => $u['street'], 'city' => $u['city'], 'country_code' => $u['country'], 'state' => $u['state'] == 'XX' ? 'NA' : $u['state'], 'zip' => $u['zip'], 'email' => $u['email'], 'username' => $u['login'], 'password' => $u['pass'], 'payment_id' => $payment_id, 'member_id' => $member_id);
$vars1 = array();
foreach ($vars as $kk => $vv) {
$v = urlencode($vv);
$k = urlencode($kk);
$vars1[] = "{$k}={$v}";
}