VirtueMart Forum

VirtueMart 1.1.x [ Old version - no longer supported ] => Payment VM 1.1 => PayPal / PayPal Pro VM 1.1 => Topic started by: ReJigged on March 27, 2009, 14:01:59 PM

Title: Custom Payment Page for PayPal
Post by: ReJigged on March 27, 2009, 14:01:59 PM
Hi All,

I've set up a custom payment page within my paypal account so that customers see the site logo and colours when they pay.

I have several sites and want visitors from each site to see a customised page.

However, I cannot see a way of telling VM to use this custom page?

Does the option exist?

Many thanks,

Tim

VM 1.1.3
J!1.5.9
Title: Re: Custom Payment Page for PayPal
Post by: ajredding on March 29, 2009, 23:33:37 PM
So I understand your wants on this.  You have several sites, we'll call these site1 site2

And for each of those sites you want each one to show a different customized paypal page?  or just to use the same customized paypal page?

If you want them all to use the same one just make it the primary customized page in paypal.  If you want them to be different per site, I'll have to work that one out to see if paypal supports that kind of information passing.
Title: Re: Custom Payment Page for PayPal
Post by: ReJigged on April 09, 2009, 10:36:13 AM
Hi,

Thanks for replying. Somehow I managed to have 'auto notify' turned off so was not aware of your reply. Sorry about that.

You are correct in that you can say I have site 1, site 2, site 3 and so on.

PayPal now has the option to specify custom payment pages that can be branded. Log into Paypal - Click on Profile and you will see 'Custom Payment Pages' in the right hand column under selling preferences.

At the moment site 1 & 2 have their own individual payment pages within PayPal. Site 3 is virtuemart driven and goes to the default PayPal payment page.

From what I can tell, the custom page needs to be specified in the 'page_style' variable. This would be very handy in Virtuemart. I'm sure I could figure out how to do this but the community might find this handy too.

From PayPal:

Custom Payment Page Styles

Give your customers a smooth payment experience by customising PayPal's payment pages to match the look and feel of your website.

The Primary page style applies to all of your payment pages, unless specified otherwise for a particular button or link.

To apply a different page style, select the one you want when creating your Buy Now Button, Donate button, PayPal Shopping Cart button, or PayPal Website Payments button. Just click Add More Options on the button creation page, and choose a page style from the Custom Payment Page Style menu.

To change the page style for a button you have already created, you can modify the button's HTML code. Replace the value of the "page_style" variable with the Page Style Name of the style you wish to apply. The next time the button is clicked, its payment pages will appear in the new style. Specifying the "cs" and "image" variables in the button code will also override your Primary page style.
Title: Re: Custom Payment Page for PayPal
Post by: Mizpah on April 09, 2009, 12:59:41 PM
This is on my to do list as well! (but hasnt reached the top yet)

Would it be as simple as adding somthing like:

"page_style" => "YOURSTYLE",

To the array on the notify script ?  or am I just thinking too simplisticly here!
Title: Re: Custom Payment Page for PayPal
Post by: ajredding on April 09, 2009, 19:34:16 PM
You are right on that, in my latest code (from a different topic) I have added that to the array.  Just simply re-place the page style with the name you gave it in paypal.  In theory that should work I haven't had a chance to check it out myself. 

This information is based on PayPal's IPN guide. 

Give it a try let us know how it works out.
Title: Re: Custom Payment Page for PayPal
Post by: ReJigged on April 09, 2009, 20:15:35 PM
Hi,

Do you mean in the 'payment extra info' within the PayPal configuration page?

If so, this is not affecting the payment page. Unless there is a specific place I need to put this line?

Thanks

Tim
Title: Re: Custom Payment Page for PayPal
Post by: ajredding on April 09, 2009, 21:40:26 PM
Yes it does go into the "Payment Extra Info" area.  You will need to place it in with the "Array"
I've posted some sample code below, depending on what code you are using now this will vary slightly. 


// Builds array for the form
$post_variables = Array(
"cmd" => "_cart",
"upload" => "1",
"page_style" => "paypal",
"business" => PAYPAL_EMAIL,


If you add the "page_style" code to the end of the array make sure that they line before it has a comma at the end.  If you inject it in the middle of the array make sure you put a comma at the end.
Title: Re: Custom Payment Page for PayPal
Post by: kleinbaas on June 03, 2011, 15:11:18 PM
Hi.

This does not seem to be working. I have the following:

$post_variables = Array(
"cmd" => "_ext-enter",
"redirect_cmd" => "_xclick",
"upload" => "1",
"page_style" => "BFT_Page_Style",
"business" => PAYPAL_EMAIL,


But I still see the primary paypal page style used when users check out. Any ideas?
This is for http://www.bannerfieldtools.com (http://www.bannerfieldtools.com)