vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Jrox Affiliate Program Integration Help (https://vborg.vbsupport.ru/showthread.php?t=176934)

jasculs 04-23-2008 01:24 PM

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

bada_bing 04-23-2008 02:34 PM

Who makes Jrox Affiliate Program ?

jasculs 04-23-2008 05:15 PM

<a href="http://jam.jrox.com/" target="_blank">http://jam.jrox.com/</a>

Any help would be appreciate...I'm trying to try the demo version right now...you are allowed up to 50 free affiliates.


All times are GMT. The time now is 03:28 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.01733 seconds
  • Memory Usage 1,742KB
  • 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
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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