예제 #1
0
 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');
     }
 }
<?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
0
*    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
0
*
*
*     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
0
/*
*
*
*     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;
    }
}
*     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
0
*     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
    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
0
*     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
0
*     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
0
*
*     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
0
*     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) {
*     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
0
*      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
0
*        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}";
        }
예제 #16
0
}
/*
*
*
*     Author: Alexander Smith
*      Email: alexander@cgi-central.net
*        Web: http://www.cgi-central.net
*    Details: AlertPay 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' => 'mollie', 'title' => $config['payment']['mollie']['title'] ? $config['payment']['mollie']['title'] : "Mollie", 'description' => $config['payment']['mollie']['description'] ? $config['payment']['mollie']['description'] : "payment by phone", 'public' => 1, 'built_in_trials' => 1));
class payment_mollie extends payment
{
    function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars)
    {
        global $config, $db;
        $_SESSION['mollie_id'] = $this->config['id'];
        $_SESSION['mollie_amount'] = $price;
        $_SESSION['mollie_data'] = serialize(array("payment_id" => $payment_id, "member_id" => $member_id, "product_id" => $product_id, "price" => $price));
        header("Location: {$config['root_surl']}/plugins/payment/mollie/pay.php");
        exit;
    }
}
예제 #17
0
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');
    }
}
예제 #18
0
*     Author: Alex Scott
*      Email: alex@cgi-central.net
*        Web: http://www.cgi-central.net
*    Details: PayFlow Link 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' => 'ematters', 'title' => $config['payment']['ematters']['title'] ? $config['payment']['ematters']['title'] : _PLUG_PAY_EMATTERS_TITLE, 'description' => $config['payment']['ematters']['description'] ? $config['payment']['ematters']['description'] : _PLUG_PAY_EMATTERS_DESC, 'public' => 1));
class payment_ematters 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);
        $title = $product->config['title'];
        $vars = array('__Click' => 0, 'UID' => $payment_id, 'CompanyName' => $this->config['company_name'], 'Returnemail' => $config['admin_email'], 'ReturnHTTP' => "[{$config['root_url']}/plugins/payment/ematters/ipn.php?", 'MerchantID' => $this->config['merchant_id'], 'SendeMail' => $this->config['send_email'], 'ABN' => $this->config['abn'], 'Bank' => $this->config['bank'], 'Platform' => 'ASP', 'Mode' => $this->config['testing'] ? 'Test' : 'Live', 'readers' => $this->config['readers'], 'Desc' => $title, 'Name' => $member['name_f'] . ' ' . $member['name_l'], 'Email' => $member['email'], 'FinalPrice' => '$' . sprintf('%.2f', $price));
        global $t;
        $t->assign('vars', $vars);
        $t->assign('member', $member);
        $t->display(dirname(__FILE__) . "/pay.html");
        exit;
    }
예제 #19
0
<?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
예제 #20
0
*
*
* aMember PRO is a commercial software. Any distribution is strictly prohibited.
*
*
*/
function webmoney_get_dump($var)
{
    //dump of array
    $s = "";
    foreach ((array) $var as $k => $v) {
        $s .= "{$k} => {$v}<br />\n";
    }
    return $s;
}
add_paysystem_to_list(array('paysys_id' => 'webmoney', 'title' => $config['payment']['webmoney']['title'] ? $config['payment']['webmoney']['title'] : _PLUG_PAY_WEBMONEY_TITLE, 'description' => $config['payment']['webmoney']['description'] ? $config['payment']['webmoney']['description'] : _PLUG_PAY_WEBMONEY_DESC, 'public' => 1, 'fixed_price' => 0));
class payment_webmoney extends payment
{
    function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars)
    {
        global $config, $db;
        $product = $db->get_product($product_id);
        $price = 0 + $price;
        $vars = array('url' => urlencode($config['root_url'] . "/plugins/payment/webmoney/thanks.php"), 'purse' => $this->config['purse'], 'amount' => $price, 'method' => 'GET', 'desc' => urlencode($payment_id . ": " . $product['title']), 'mode' => $this->config['testing'] ? 'test' : '');
        $pm = $db->get_payment($payment_id);
        $pm['data']['wm_vars'] = $vars;
        $db->update_payment($pm['payment_id'], $pm);
        $db->log_error("WebMoney SENT: " . webmoney_get_dump($vars));
        $url = "https://light.wmtransfer.com/pci.aspx";
        switch ($this->config['interface']) {
            case 'rus':
예제 #21
0
*     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' => 'egold', 'title' => $config['payment']['egold']['title'] ? $config['payment']['egold']['title'] : _PLUG_PAY_EGOLD_TITLE, 'description' => $config['payment']['egold']['description'] ? $config['payment']['egold']['description'] : sprintf(_PLUG_PAY_EGOLD_DESC, '<a href="http://www.e-gold.com" target=_blank>', '</a>'), 'public' => 1));
class payment_egold 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('PAYEE_ACCOUNT' => $this->config['merchant_id'], 'PAYEE_NAME' => $this->config['merchant_name'], 'PAYMENT_AMOUNT' => $price, 'PAYMENT_UNITS' => $this->config['units'], 'PAYMENT_METAL_ID' => 0, 'PAYMENT_ID' => $payment_id, 'STATUS_URL' => $config['root_url'] . '/plugins/payment/egold/ipn.php', 'PAYMENT_URL' => sprintf("%s/thanks.php?payment_id=%d", $config['root_url'], $payment_id), 'PAYMENT_URL_METHOD' => 'LINK', 'NOPAYMENT_URL' => $config['root_url'] . '/signup.php', 'BAGGAGE_FIELDS' => '', 'SUGGESTED_MEMO' => $product->config['title'] . ' ' . $product->config['description']);
        $vars1 = array();
        foreach ($vars as $kk => $vv) {
            $v = urlencode($vv);
            $k = urlencode($kk);
            $vars1[] = "{$k}={$v}";
        }
        $vars = join('&', $vars1);
        header("Location: https://www.e-gold.com/sci_asp/payments.asp?{$vars}");
예제 #22
0
<?php

if (!defined('INCLUDED_AMEMBER_CONFIG')) {
    die("Direct access to this location is not allowed");
}
add_paysystem_to_list(array('paysys_id' => 'stormpay', 'title' => $config['payment']['stormpay']['title'] ? $config['payment']['stormpay']['title'] : _PLUG_PAY_STORMPAY_TITLE, 'description' => $config['payment']['stormpay']['description'] ? $config['payment']['stormpay']['description'] : sprintf(_PLUG_PAY_STORMPAY_DESC, '<a href="http://www.stormpay.com" target=_blank>', '</a>'), 'public' => 1));
class payment_stormpay 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'];
        }
        $member = $db->get_user($member_id);
        $vars = array('payee_email' => $this->config['business'], 'payer_email' => $member['email'], 'transaction_ref' => $payment_id, 'return_URL' => sprintf("%s/thanks.php?member_id=%d&product_id=%d", $config['root_url'], $member_id, $product_id), 'cancel_URL' => $config['root_url'] . "/cancel.php", 'notify_URL' => $config['root_url'] . "/plugins/payment/stormpay/ipn.php", 'amount' => sprintf('%.2f', $price), 'product_name' => $product->config['title'], 'generic' => 1, 'require_IPN' => 1);
        $vars1 = array();
        foreach ($vars as $kk => $vv) {
            $v = urlencode($vv);
            $k = urlencode($kk);
            $vars1[] = "{$k}={$v}";
        }
        $vars = join('&', $vars1);
        html_redirect("https://www.stormpay.com/stormpay/handle_gen.php?{$vars}", '', 'Please wait', 'Please wait');
        exit;
예제 #23
0
*      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':
                $modul = "creditcard";
                break;
예제 #24
0
*        Web: http://www.cgi-central.net
*    Details: glo-bill 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.
*
*/
$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);
예제 #25
0
*     Author: Alex Scott
*      Email: alex@cgi-central.net
*        Web: http://www.cgi-central.net
*    Details: The installation file
*    FileName $RCSfile$
*    Release: 3.1.9PRO ($Revision: 4506 $)
*
* 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' => "free", 'title' => _PLUG_PAY_FREE_TITLE, 'description' => _PLUG_PAY_FREE_DESC, 'public' => 1));
// need to configure products in clickbank and set thanks page to ./thanks.php
class payment_free extends payment
{
    function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars)
    {
        global $config;
        if ($price > 0) {
            return _PLUG_PAY_FREE_NOTFORFREE;
        }
        $vcode = md5($payment_id . $begin_date . $member_id);
        header("Location: " . $config['root_url'] . "/plugins/payment/free/thanks.php?payment_id={$payment_id}&vcode={$vcode}");
        exit;
    }
    function validate_thanks(&$vars)
    {
예제 #26
0
<?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);
예제 #27
0
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}";
        }
예제 #28
0
<?php

if (!defined('INCLUDED_AMEMBER_CONFIG')) {
    die("Direct access to this location is not allowed");
}
add_paysystem_to_list(array('paysys_id' => 'passwordcall', 'title' => $config['payment']['passwordcall']['title'] ? $config['payment']['passwordcall']['title'] : _PLUG_PAY_PSWDCALL_TITLE, 'description' => $config['payment']['passwordcall']['description'] ? $config['payment']['passwordcall']['description'] : sprintf(_PLUG_PAY_PSWDCALL_DESC, '<a href="http://www.passwordcall.de" target=_blank>', '</a>'), 'public' => 1));
class payment_passwordcall 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'];
        }
        $member = $db->get_user($member_id);
        $vars = array('transaction_ref' => $payment_id, 'wmid' => $this->config['webmaster_id'], 'aname1' => $this->config['aname_id1'], 'aname2' => $this->config['aname_id2'], 'aname3' => $this->config['aname_id3'], 'aname4' => $this->config['aname_id4'], 'tarif1' => $this->config['tarif_id1'], 'tarif2' => $this->config['tarif_id2'], 'tarif3' => $this->config['tarif_id3'], 'tarif4' => $this->config['tarif_id4'], 'prdid1' => $this->config['product_id1'], 'prdid2' => $this->config['product_id2'], 'prdid3' => $this->config['product_id3'], 'prdid4' => $this->config['product_id4'], 'agbid1' => $this->config['angebots_id1'], 'agbid2' => $this->config['angebots_id2'], 'agbid3' => $this->config['angebots_id3'], 'agbid4' => $this->config['angebots_id4'], 'product_id' => $product_id, 'member_id' => $member_id);
        $vars1 = array();
        foreach ($vars as $kk => $vv) {
            $v = urlencode($vv);
            $k = urlencode($kk);
            $vars1[] = "{$k}={$v}";
        }
        $vars = join('&', $vars1);
        header("Location: " . $config['root_url'] . "/plugins/payment/passwordcall/passwordcall.php?" . $vars);
        exit;
예제 #29
0
*
*
*     Author: Alex Scott
*      Email: alex@cgi-central.net
*        Web: http://www.cgi-central.net
*    Details: The installation file
*    FileName $RCSfile$
*    Release: 3.1.9PRO ($Revision: 3898 $)
*
* 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' => 'multicards', 'title' => $config['payment']['multicards']['title'] ? $config['payment']['multicards']['title'] : _PLUG_PAY_MULTICARD_TITLE, 'description' => $config['payment']['multicards']['description'] ? $config['payment']['multicards']['description'] : _PLUG_PAY_MULTICARD_DESCR, 'public' => 1, 'fixed_price' => 1));
// need to configure products in clickbank and set thanks page to ./thanks.php
class payment_multicards 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->template_dir = dirname(__FILE__);
        $page_id = $this->config['page_id'];
        if (isset($vars['action']) && $vars['action'] == 'renew') {
            $page_id = $this->config['page_id2'];
        }
        $t->assign(array('header' => $config['root_dir'] . '/templates/header.html', 'footer' => $config['root_dir'] . '/templates/footer.html', 'this_config' => $this->config, 'page_id' => $page_id, 'member' => $db->get_user($member_id), 'payment' => $pm = $db->get_payment($payment_id), 'product' => $db->get_product($pm['product_id'])));
        $t->display('multicards.html');
        exit;
예제 #30
0
*/
setup_plugin_hook('hourly', 'ccbill_datalink');
setup_plugin_hook('validate_signup_form', 'ccbill_vsf');
add_paysystem_to_list(array('paysys_id' => 'ccbill', 'title' => $config['payment']['ccbill']['title'] ? $config['payment']['ccbill']['title'] : _PLUG_PAY_CC_BILL_TITLE, 'description' => $config['payment']['ccbill']['description'] ? $config['payment']['ccbill']['description'] : _PLUG_PAY_CC_BILL_DESCR, 'public' => 1, 'recurring' => 1));
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);