Paypal plugin - can I send customers to custom payment pages?

Discussion in 'Integration' started by acrimon, Feb 25, 2009.

  1. acrimon

    acrimon New Member

    Joined:
    Feb 18, 2009
    Messages:
    18
    Is there any way for amember to send someone to a custom payment page?
  2. zenpig66

    zenpig66 aMember Pro Customer

    Joined:
    Jan 1, 2009
    Messages:
    72
    PayPal requires the buyer to make payment on the PayPal site but I believe their PayFlow Pro option(kind of spendy) allows you to create your own custom payment pages. If someone here uses that they might be able to elaborate but PayPal has a pretty good help section on the different options available.
  3. Sergei

    Sergei aMember Pro Customer

    Joined:
    Mar 6, 2006
    Messages:
    96
    Yes its possible.
  4. jgilbert

    jgilbert New Member

    Joined:
    Apr 23, 2008
    Messages:
    6
    In plugins/payment/paypal_r/paypal_r.inc (if you're using regular paypal payments, not pro) there are two places to add code.

    1. Find the function: do_recurring_bill and add the page_style variable (2nd to last line in each below) that you want visitors to see when they get to paypal.

    Partial code example...
    PHP:
    function do_recurring_bill($amount$title$products$u$invoice){
            global 
    $db$config;
            
    $vars = array(
                
    'cmd'         => '_xclick-subscriptions',
                
    'business'    => $this->config['business'],
                
    'return'      =>
                   
    "$config[root_url]/thanks.php?payment_id=$invoice",
                
    'notify_url'  =>
                   
    $this->notify_url $this->notify_url :
                   
    "$config[root_url]/plugins/payment/paypal_r/ipn.php",
                
    'item_name'   => $title,


                
    'page_style'  => 'yourcustompaypalpage',


                
    'no_shipping' => 1,
               
    2. Find the do_not_recurring_bill function and add there.
    Partial code example...
    PHP:
    function do_not_recurring_bill($amount$title$products$u$invoice){
            global 
    $config;

            
    $vars = array(
                
    'cmd'         => '_xclick',
                
    'business'    => $this->config['business'],
                
    'return'      =>
                   
    "$config[root_url]/thanks.php?payment_id=$invoice",
                
    'notify_url'  =>
                   
    $this->notify_url $this->notify_url :
                   
    "$config[root_url]/plugins/payment/paypal_r/ipnr.php",
                
    'cancel_return' =>
                   
    "$config[root_url]/cancel.php?payment_id=$invoice",
                
    'item_name'   => $title,
                
    'shipping'    => '0.0',


                
    'page_style'  => 'yourcustompaypalpage',


                
    'no_shipping' => 1,
  5. acrimon

    acrimon New Member

    Joined:
    Feb 18, 2009
    Messages:
    18
    Thank you a lot. So do I use the name of the paypal custom payment page or a URL for it? Like if under paypal I call my payment page 'pay2' would I just switch the name in that php to 'pay2'?
  6. appthemes

    appthemes New Member

    Joined:
    Dec 23, 2009
    Messages:
    9
    Thanks for this. I was looking to add a custom page to this as well. Worked like a charm!

    ~David

    http://appthemes.com
  7. bryceyoung

    bryceyoung aMember Pro Customer

    Joined:
    Apr 12, 2010
    Messages:
    9

Share This Page