Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-23-2008, 01:24 PM
jasculs jasculs is offline
 
Join Date: Jun 2007
Posts: 217
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Jrox Affiliate Program Integration Help

I posted a message on the Jorx Jam Affiliate site for help also but no response yet. This is an affiliate software that is suppose to allow me to give out commission to members who refer other for paid subscriptions. However their instructions seem to be a bit flawed. Here they are:

Code:
JAM can be integrated with VBulletin when you use VBulletin for Paypal Subscriptions.
 To integrate JAM with VBulletin, follow these steps:
  1. Open up the payment_gateway.php file in your vbulletin folder.
  2. Add the following lines near the top of the file, just change the DOMAIN.COM/AFFILIATES to point to your JAM install and if you use the refund module, change YOURSECRETWORD to your ASM secret word : // ####################### SET PHP ENVIRONMENT ########################### error_reporting(E_ALL & ~E_NOTICE); // ############################### // ## SET JAM INTEGRATION FIRST ## // ############################### if (!empty($_POST['mc_gross'])) { if ($_POST['payment_status'] == 'Completed') { $jrox_integrate = file_get_contents("http://www.DOMAIN.COM/AFFILIATES/sale.php?amount=".$_POST['mc_gross']."&trans_id=".$_POST['txn_id']."&custom_mid=".$_REQUEST['jrox']); } elseif ($_POST['payment_status'] == 'Refunded') { $jrox_integrate = file_get_contents(http://www.DOMAIN.COM/AFFILIATES/refund.php?trans_id=".$_POST['parent_txn_id']."&secret=YOURSECRETWORD); } } // #################### DEFINE IMPORTANT CONSTANTS ####################### define('THIS_SCRIPT', 'payment_gateway'); define('SKIP_SESSIONCREATE', 1); // #################### PRE-CACHE TEMPLATES AND DATA ######################
  3. Save the file.
  4. You now have to edit the paypal subscription template in your VBulletin templates table inside your VBulletin database. This is the table that holds your paypal subscription form template.
  5. Find the entry for subscription_payment_paypal.
  6. Edit the template record to have the following. Make sure to backup this data first! ".(($show['recurring']) ? (" <input type=\"hidden\" name=\"cmd\" value=\"_xclick-subscriptions\" /> ") : (" <input type=\"hidden\" name=\"cmd\" value=\"_xclick\" /> "))." <input type=\"hidden\" name=\"business\" value=\"$settings[ppemail]\" /> <input type=\"hidden\" name=\"item_name\" value=\"$subinfo[title] Subscription\" /> <input type=\"hidden\" name=\"item_number\" value=\"$item\" /> <input type=\"hidden\" name=\"currency_code\" value=\"$currency\" /> ".(($show['recurring']) ? (" <input type=\"hidden\" name=\"a3\" value=\"$cost\" /> <input type=\"hidden\" name=\"p3\" value=\"$timeinfo[length]\"> <input type=\"hidden\" name=\"t3\" value=\"$timeinfo[units]\"> <input type=\"hidden\" name=\"src\" value=\"1\"> <input type=\"hidden\" name=\"sra\" value=\"1\"> ") : (" <input type=\"hidden\" name=\"amount\" value=\"$cost\" /> "))." <input type=\"hidden\" name=\"no_shipping\" value=\"$no_shipping\" /> <input type=\"hidden\" name=\"shipping\" value=\"0.00\" /> <input type=\"hidden\" name=\"return\" value=\"" . $GLOBALS['vbulletin']->options['bburl'] . "/" . $GLOBALS['vbulletin']->options['forumhome'] . ".php\" /> <input type=\"hidden\" name=\"cancel_return\" value=\"" . $GLOBALS['vbulletin']->options['bburl'] . "/" . $GLOBALS['vbulletin']->options['forumhome'] . ".php\" /> <input type=\"hidden\" name=\"notify_url\" value=\"" . $GLOBALS['vbulletin']->options['bburl'] . "/payment_gateway.php?method=paypal&amp;jrox=" . $_COOKIE['jrox']."\" /> <input type=\"hidden\" name=\"custom\" value=\"$userinfo[username]\" /> <input type=\"hidden\" name=\"no_note\" value=\"1\" /> ".(($show['notax']) ? (" <input type=\"hidden\" name=\"tax\" value=\"0.00\" /> ") : (""))."
  7. Save the database record.
  8. Test the paypal subscription and affiliate commissions.
  9. You now have JAM integrated with VBulletin and Paypal Subscriptions
This part seems to be messing me up:
Code:
Edit the template record to have the following.  Make sure to backup this data first!

".(($show['recurring']) ? ("
<input type=\"hidden\" name=\"cmd\" value=\"_xclick-subscriptions\" />
") : ("
<input type=\"hidden\" name=\"cmd\" value=\"_xclick\" />
"))."
<input type=\"hidden\" name=\"business\" value=\"$settings[ppemail]\" />
<input type=\"hidden\" name=\"item_name\" value=\"$subinfo[title] Subscription\" />
<input type=\"hidden\" name=\"item_number\" value=\"$item\" />
<input type=\"hidden\" name=\"currency_code\" value=\"$currency\" />
".(($show['recurring']) ? ("
<input type=\"hidden\" name=\"a3\" value=\"$cost\" />
<input type=\"hidden\" name=\"p3\" value=\"$timeinfo[length]\">
<input type=\"hidden\" name=\"t3\" value=\"$timeinfo[units]\">
<input type=\"hidden\" name=\"src\" value=\"1\">
<input type=\"hidden\" name=\"sra\" value=\"1\">
") : ("
<input type=\"hidden\" name=\"amount\" value=\"$cost\" />
"))."
<input type=\"hidden\" name=\"no_shipping\" value=\"$no_shipping\" />
<input type=\"hidden\" name=\"shipping\" value=\"0.00\" />
<input type=\"hidden\" name=\"return\" value=\"" . $GLOBALS['vbulletin']->options['bburl'] . "/" . $GLOBALS['vbulletin']->options['forumhome'] . ".php\" />
<input type=\"hidden\" name=\"cancel_return\" value=\"" . $GLOBALS['vbulletin']->options['bburl'] . "/" . $GLOBALS['vbulletin']->options['forumhome'] . ".php\" />
<input type=\"hidden\" name=\"notify_url\" value=\"" . $GLOBALS['vbulletin']->options['bburl'] . "/payment_gateway.php?method=paypal&amp;jrox=" . $_COOKIE['jrox']."\" />
<input type=\"hidden\" name=\"custom\" value=\"$userinfo[username]\" />
<input type=\"hidden\" name=\"no_note\" value=\"1\" />
".(($show['notax']) ? ("
<input type=\"hidden\" name=\"tax\" value=\"0.00\" />
") : (""))."
Because my template is different...it doesn't hav all of the extra slashes, periods, quotes, etc...

I mainly need to be able to get the cookie in the link somehow. (See the bold red in the code above). You'll notice that it has extra periods and slashes. When I just add that section I get errors in my template.

Here is my template code:

Code:
<if condition="$show['recurring']">
<input type="hidden" name="cmd" value="_xclick-subscriptions" />
<else />
<input type="hidden" name="cmd" value="_xclick" />
</if>
<input type="hidden" name="business" value="$settings[ppemail]" />
<input type="hidden" name="item_name" value="<phrase 1="$subinfo[title]">$vbphrase[x_subscription]</phrase>" />
<input type="hidden" name="item_number" value="$item" />
<input type="hidden" name="currency_code" value="$currency" />
<if condition="$show['recurring']">
<input type="hidden" name="a3" value="$cost" />
<input type="hidden" name="p3" value="$timeinfo[length]">
<input type="hidden" name="t3" value="$timeinfo[units]">
<input type="hidden" name="src" value="1">
<input type="hidden" name="sra" value="1">
<else />
<input type="hidden" name="amount" value="$cost" />
</if>
<input type="hidden" name="no_shipping" value="$no_shipping" />
<input type="hidden" name="shipping" value="0.00" />
<input type="hidden" name="return" value="$vboptions[bburl]/$vboptions[forumhome].php" />
<input type="hidden" name="cancel_return" value="$vboptions[bburl]/$vboptions[forumhome].php" />
<input type="hidden" name="notify_url" value="$vboptions[bburl]/payment_gateway.php?method=paypal" />
<input type="hidden" name="custom" value="$userinfo[username]" />
<input type="hidden" name="no_note" value="1" />
<if condition="$show['notax']">
<input type="hidden" name="tax" value="0.00" />
</if>
Thanks for any help
Jason
Reply With Quote
 


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 02:38 PM.


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.03798 seconds
  • Memory Usage 2,329KB
  • Queries Executed 13 (?)
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
  • (3)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)showthread_list
  • (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_threadedmode.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_threaded
  • showthread_threaded_construct_link
  • 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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete