Back to vBulletin 4.x Template Modifications

Customise PayPal Payment Page
Mod Version: 1.00, by zipperty

vB Version: 4.0.3 Rating: (1 vote - 5.00 average) Installs: 10
Released: 30 Apr 2010 Last Update: Never Downloads: 0
Not Supported Template Edits Re-usable Code Translations  

Your Primary page style will automatically be applied to all your payment pages unless you specify otherwise.
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.
- from PayPal

So, here is how to specify a PayPal payment page style within VB.

Search for "subscription_payment_paypal" in templates

Then customise/edit the file :

Code:
<vb:if condition="$show['recurring']">
<input type="hidden" name="cmd" value="_xclick-subscriptions" />
<vb:else />
<input type="hidden" name="cmd" value="_xclick" />
</vb:if>
<input type="hidden" name="business" value="{vb:raw settings.ppemail}" />
<input type="hidden" name="item_name" value="{vb:rawphrase x_subscription, {vb:raw subinfo.title}}" />
<input type="hidden" name="item_number" value="{vb:raw item}" />
<input type="hidden" name="currency_code" value="{vb:raw currency}" />
<vb:if condition="$show['recurring']">
<input type="hidden" name="a3" value="{vb:raw cost}" />
<input type="hidden" name="p3" value="{vb:raw timeinfo.length}">
<input type="hidden" name="t3" value="{vb:raw timeinfo.units}">
<input type="hidden" name="src" value="1">
<input type="hidden" name="sra" value="1">
<vb:else />
<input type="hidden" name="amount" value="{vb:raw cost}" />
</vb:if>
<input type="hidden" name="no_shipping" value="{vb:raw no_shipping}" />
<input type="hidden" name="shipping" value="0.00" />
<input type="hidden" name="return" value="{vb:raw vboptions.bburl}/{vb:raw vboptions.forumhome}.php" />
<input type="hidden" name="cancel_return" value="{vb:raw vboptions.bburl}/{vb:raw vboptions.forumhome}.php" />
<input type="hidden" name="notify_url" value="{vb:raw vboptions.bburl}/payment_gateway.php?method=paypal" />
<input type="hidden" name="custom" value="{vb:raw userinfo.username}" />
<input type="hidden" name="no_note" value="1" />
<vb:if condition="$show['notax']">
<input type="hidden" name="tax" value="0.00" />
</vb:if>
You should add this line of code into the above code

Code:
<input type="hidden" name="page_style" value="YOURPAGESTYLE">
I added mine after :

Code:
<vb:if condition="$show['recurring']">
<input type="hidden" name="cmd" value="_xclick-subscriptions" />
<vb:else />
<input type="hidden" name="cmd" value="_xclick" />
</vb:if>
This allows you to use any pagestyle template that you have defined on https://www.paypal.com

To find the pagestyles on PayPal first login to your paypal account then :

Click on profile (as in the picture) then "Custom Payment Pages"
Click image for larger version Name:


Then you can add a new payment page and call it what you want.

The name you choose should be used as the
Code:
<input type="hidden" name="page_style" value="YOURPAGESTYLE">
as above replacing YOURPAGESTYLE with the name you chose on paypal.

Adding this extra option to your PayPal payment page in VB allows you to to use the same email address for different payment sources. i.e. Multiple instances of VB etc.

Its a bit basic (I'm new to VB) however I hope someone finds it useful.

JUST ADDED as requested.

Here is a screen shot of the header that is show once you customer clicks through to payapl. Notice the header is not the default one from paypal.

Download

No files for download.

Screenshots

Click image for larger version
Name:	pagestyle.jpg
Views:	1529
Size:	223.3 KB
ID:	116896  


vblts.ru supports vBulletin®, 2022-2024