Send "Pagestyle" To Paypal

We're upgrading our support forum. Replies are currently closed. Please view our Documentation and FAQ using the menu above.

Hi there,

I need to be able to send the pagestyle to Paypal so the payment page shows the proper logo at the top of the payment page.

I just need to add:
<inputtype="hidden"name="pagestyle"value="mystyle"/>
To the form which submits to paypal. Any easy way to do this?

Thanks

Its Ok, I sorted it…

Just so I can explain what I was trying to do: I have one paypal account but multiple email addresses attached to it (for various businesses). In Paypal it gives the option to setup “PageStyles”. This means if someone pays to my abc@me.com address the “ME.com” logo is displayed at the top of the Paypal payment page. But if someone pays me to my def@you.com email address, the “YOU.com” logo is displayed. Its useful if you only have one Paypal account.

For anyone else who would like to do this, just add:

'page_style' => 'myStyle',

to the file “paymethod_paypal.php” as part of the “paypal_redirect function” where “MyStyle” is the name of your pagestyle in Paypal.

Heres the full function:

public static function paypal_redirect($description,$amount,$user_id,$payment_id,$invoice_id,$currency_id){

$currency = module_config::get_currency($currency_id);

$url = 'https://www.'. (self::is_sandbox()? 'sandbox.' : '') . 'paypal.com/cgi-bin/webscr?';

$fields = array(
'cmd' => '_xclick',
'business' => module_config::c('payment_method_paypal_email',_ERROR_EMAIL),
'currency_code' => $currency['code'],
'item_name' => $description,
'amount' => $amount,
'page_style' => 'myStyle',
'return' => module_invoice::link_open($invoice_id),
'notify_url' => full_link(_EXTERNAL_TUNNEL.'?m=paymethod_paypal&h=ipn&method=paypal'),
'custom' => self::paypal_custom($user_id,$payment_id,$invoice_id),
);

foreach($fields as $key=>$val){
$url .= $key.'='.urlencode($val).'&';
}

echo '<a href="'.$url.'">'.$url.'</a>';exit;

// redirect_browser($url);

}

Thanks! We’ve added this in as an advanced field ‘paypal_page_style’

This advanced settings field will not display until you do a payment, so please click the pay button on an invoice first before looking for this field.

Hi there,

I cant find the additional field and Ive updated?

Hello,

Please click a pay now button on an invoice first, then check the advanced section.

It should look like this in the demo: http://ultimateclientmanager.com/demo/config.config_admin/config.config_settings/

 

Apologies,

Ive found it! 🙂 Thanks for your help.

David

The forum ‘General Support’ is closed to new topics and replies.

brownd92Send "Pagestyle" To Paypal