示例#1
0
 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";
     }
 }
示例#2
0
 function init()
 {
     parent::init();
     add_payment_field('epayeu_subscription_id', 'Epay.eu subscription ID', 'hidden', '');
 }
            // Nothing to bill just validate CC
            $vars['AMT'] = $vars['L_AMT0'] = 1;
            $vars['PAYMENTACTION'] = 'Authorization';
        }
        $resp = $paypal_pro_pl->paypalAPIRequest($invoice, $vars, 1);
        $error = $paypal_pro_pl->get_errors($resp);
        if ($error) {
            return array(CC_RESULT_DECLINE_PERM, $error, "", $log);
        } else {
            if ($vars['PAYMENTACTION'] == 'Authorization') {
                $paypal_pro_pl->doVoid($invoice, $resp['TRANSACTIONID']);
            }
            $paypal_pro_pl->createRecurringBillingProfiles($invoice, "", $cc_info, "");
            return array(CC_RESULT_SUCCESS, "", $resp['TRANSACTIONID'], $log);
        }
    }
}
function paypal_pro_cc_get_member_links($user)
{
    return cc_core_get_member_links('paypal_pro_cc', $user);
}
function paypal_pro_cc_rebill()
{
    // Nothing to rebill
    return;
    //     return cc_core_rebill('paypal_pro_cc');
}
cc_core_init('paypal_pro_cc');
add_payment_field("PAYPAL_PROFILE_ID", "PayPal recurring profileID", "text");
add_payment_field("PAYPAL_TXN_ID", "PayPal TXN_ID", "text");
 function init()
 {
     parent::init();
     add_product_field('paypal_mobile_currency', 'PayPal Mobile Currency', 'select', 'valid only for PayPal Mobile processing.<br /> You should not change it<br /> if you use
         another payment processors', '', array('options' => array('USD' => 'U.S. Dollar', 'EUR' => 'Euro', 'GBP' => 'Pound Sterling', 'CAD' => 'Canadian Dollar', 'AUD' => 'Australian Dollar', 'CHF' => 'Swiss Franc', 'CZK' => 'Czech Koruna', 'DKK' => 'Danish Krone', 'HKD' => 'Hong Kong Dollar', 'HUF' => 'Hungarian Forint', 'JPY' => 'Japanese Yen', 'NOK' => 'Norwegian Krone', 'NZD' => 'New Zealand Dollar', 'PLN' => 'Polish Zloty', 'SEK' => 'Swedish Krona', 'SGD' => 'Singapore Dollar')));
     add_payment_field('token', 'PayPal Mobile Token', 'readonly', 'internal');
 }
示例#5
0
}
/*
*
*
*     Author: Alex Scott
*      Email: alex@cgi-central.net
*        Web: http://www.cgi-central.net
*    FileName $RCSfile$
*    Release: 3.1.8PRO ($Revision: 2256 $)
*
* Please direct bug reports,suggestions or feedback to the cgi-central forums.
* http://www.cgi-central.net/forum/
                                                                     *
*/
add_paysystem_to_list(array('paysys_id' => 'migs_r', 'title' => $config['payment']['migs_r']['title'] ? $config['payment']['migs_r']['title'] : _PLUG_PAY_24eKOUT_TITLE, 'description' => $config['payment']['migs_r']['description'] ? $config['payment']['migs_r']['description'] : _PLUG_PAY_24eKOUT_DESC, 'public' => 1));
add_payment_field('transaction_no', 'A unique number generated by the Payment Server for the transaction', 'readonly', 'internal');
class payment_migs_r extends payment
{
    function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars)
    {
        global $config;
        global $db;
        $product =& get_product($product_id);
        $varsx = array('vpc_Version' => '1', 'vpc_Command' => 'pay', 'vpc_MerchTxnRef' => $payment_id, 'vpc_AccessCode' => $this->config['access_code'], 'vpc_Merchant' => $this->config['merchant_id'], 'vpc_OrderInfo' => $payment_id, 'vpc_Amount' => intval($price * 100), 'vpc_Locale' => 'en', 'vpc_ReturnURL' => $config['root_url'] . "/plugins/payment/migs_r/thanks.php");
        $securehash = $this->config['secure_secret'];
        ksort($varsx);
        foreach ($varsx as $k => $v) {
            $securehash .= $v;
        }
        $securehash = strtoupper(md5($securehash));
        $varsx['vpc_SecureHash'] = $securehash;
 function init()
 {
     parent::init();
     add_product_field('tripledeal_currency', 'TripleDeal Currency', 'select', 'valid only for TripleDeal processing.<br /> You should not change it<br /> if you use
         another payment processors', '', array('options' => array('USD' => 'USD', 'EUR' => 'EUR')));
     add_payment_field('tripledeal_cluster_id', 'TripleDeal Payment Cluster Id', 'readonly', 'internal');
     add_payment_field('tripledeal_cluster_key', 'TripleDeal Payment Cluster Key', 'readonly', 'internal');
 }
*      Email: alex@cgi-central.net
*        Web: http://www.cgi-central.net
*    Details: beanstream_remote payment plugin
*    FileName $RCSfile$
*    Release: 3.2.3PRO ($Revision: 5012 $)
*
* 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;
add_product_field('is_recurring', 'Recurring Billing', 'select', 'should user be charged automatically<br />
             when subscription expires', '', array('options' => array('' => 'No', 1 => 'Yes')));
add_payment_field('beanstream_rbaccountid', 'Beanstream recugging billing account id', 'hidden', 'integer value');
add_paysystem_to_list(array('paysys_id' => 'beanstream_remote', 'title' => $config['payment']['beanstream_remote']['title'] ? $config['payment']['beanstream_remote']['title'] : _PLUG_PAY_BEANSTREAM_TITLE, 'description' => $config['payment']['beanstream_remote']['description'] ? $config['payment']['beanstream_remote']['description'] : _PLUG_PAY_BEANSTREAM_REM_DESC, 'recurring' => 1, 'public' => 1, 'built_in_trials' => 0));
class payment_beanstream_remote extends payment
{
    function get_period($orig_period)
    {
        if (preg_match('/^\\s*(\\d+)\\s*([y|Y|m|M|w|W|d|D]{0,1})\\s*$/', $orig_period, $regs)) {
            $period = $regs[1];
            $period_unit = $regs[2];
            if (!strlen($period_unit)) {
                $period_unit = 'd';
            }
            $period_unit = strtoupper($period_unit);
            switch ($period_unit) {
                case 'Y':
                    if ($period < 1 or $period > 5) {