Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Customise PayPal Payment Page Details »»
Customise PayPal Payment Page
Version: 1.00, by zipperty zipperty is offline
Developer Last Online: Apr 2013 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 4.0.3 Rating:
Released: 04-29-2010 Last Update: Never Installs: 10
Template Edits
Re-useable Code Translations  
No support by the author.

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:


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.

Screenshots

File Type: jpg pagestyle.jpg (223.3 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 05-04-2010, 09:16 PM
turntablefood turntablefood is offline
 
Join Date: Apr 2010
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you have any samples of custom payment pages?
Reply With Quote
  #3  
Old 05-06-2010, 04:34 PM
Centrix Centrix is offline
 
Join Date: Sep 2005
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'd like to see a demo before doing all these changes
Reply With Quote
  #4  
Old 05-09-2010, 06:15 PM
zipperty zipperty is offline
 
Join Date: Mar 2010
Location: Gateshead - UK
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Images added see above post.
Reply With Quote
  #5  
Old 05-25-2010, 12:26 PM
dianna's Avatar
dianna dianna is offline
 
Join Date: Mar 2008
Location: Texas
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 05-25-2010, 01:16 PM
zipperty zipperty is offline
 
Join Date: Mar 2010
Location: Gateshead - UK
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dianna View Post
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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:52 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04419 seconds
  • Memory Usage 2,275KB
  • Queries Executed 20 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (1)postbit_attachment
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete