vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Miscellaneous Hacks - Customise PayPal Payment Page (https://vborg.vbsupport.ru/showthread.php?t=241560)

zipperty 04-29-2010 10:00 PM

Customise PayPal Payment Page
 
1 Attachment(s)
Quote:

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 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:
https://vborg.vbsupport.ru/external/2010/04/1.jpg

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. :erm:

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.

https://vborg.vbsupport.ru/attachmen...1&d=1273433252

turntablefood 05-04-2010 09:16 PM

Do you have any samples of custom payment pages?

Centrix 05-06-2010 04:34 PM

I'd like to see a demo before doing all these changes

zipperty 05-09-2010 06:15 PM

Images added see above post.

dianna 05-25-2010 12:26 PM

Can you be a little more clear where to put the extra coding? Does everything go under the "subscription_payment_paypal" or just the First code.

zipperty 05-25-2010 01:16 PM

Quote:

Originally Posted by dianna (Post 2043134)
Can you be a little more clear where to put the extra coding? Does everything go under the "subscription_payment_paypal" or just the First code.

Hi dianna,

To clarify :

Just the first code like so :

Add this line of code
Code:

<input type="hidden" name="page_style" value="YOURPAGESTYLE">
in between the 5th and 6th lines of code in : template - subscription_payment_paypal

Hope this is more clear, let me know if I can be of any further assistance.


All times are GMT. The time now is 06:43 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01044 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete