Reply To: Send "Pagestyle" To Paypal

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

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 address the “” logo is displayed at the top of the Paypal payment page. But if someone pays me to my email address, the “” 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.' : '') . '';

$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);


brownd92Reply To: Send "Pagestyle" To Paypal