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

Reply
 
Thread Tools Display Modes
  #1  
Old 02-25-2007, 07:19 PM
mambomouth mambomouth is offline
 
Join Date: May 2005
Location: NYC/NJ
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Payment_gateway.php variables

Hello All I have question I’m trying to add an affiliate program to my VB forum subscriptions.

I have Idea a few files but I think this the one to do it in.

The Affiliate software needs two variables.
1. $id_transaction // transaction id
2. $amount // the amount of the sale

VB 3.6.4 version

Payment_gateway.php
Around Line 81
// if ($apiobj->verify_payment())

My question is would these two VB calls work to give my affiliate program variables the proper
values per transaction ?

$apiobj->transaction_id
$apiobj->paymentinfo['amount']

// Affiliate Variables assigned
1. $idaff_transaction = $apiobj->transaction_id;
2. $aff_amount = $apiobj->paymentinfo['amount'];

Then inside the if condition in line number 105
// if ($apiobj->type == 1){

/* I would add the affiliate link code * /

}

And for returned funds line number 120
// if ($apiobj->type == 2){

/* I would add the affiliate link code for refund updates * /

}

If someone could please verify it would make my day.
Cheers and thank you in advance.
Brian
Reply With Quote
  #2  
Old 04-13-2007, 01:52 PM
dxguru dxguru is offline
 
Join Date: May 2005
Location: England
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That is what I had also ... not yet working completely because the payment processor triggers the payment_gateway.php, which means that the tracking token for the affiliate script is not present.

Currently I am looking at other ways including having a successful payment send the actual user back through the payment_gateway.php script.
Reply With Quote
  #3  
Old 04-13-2007, 03:17 PM
bada_bing's Avatar
bada_bing bada_bing is offline
 
Join Date: Feb 2004
Location: Michigan
Posts: 1,698
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good luck getting someone to actually answer this, I asked a simular question months ago as im trying to get idev working with the vb subscription system and cant get no response from anyone
Reply With Quote
  #4  
Old 04-13-2007, 08:26 PM
mambomouth mambomouth is offline
 
Join Date: May 2005
Location: NYC/NJ
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have been coding a ton I have not had time to implement my hack.
But I think there is an easier way to do this.

Thru the email phrase for the subscription

Any Affiliate script works by a user clicking the ad at your affiliate partner site.
That link makes a cookie and sends the user to your product page.

If the buy something you need

1. Order ID
2. Affiliate ID
3. Amount
4. If the transaction is ok or not.

All the variables needed are used in both the Phrases email body?s bellow.

So all you have to do is to make a custom email link because you are the only person who sees this email not the client. When you get a sale that is thru an affiliate you click the link in your email client approving the sale via the custom link added to the email body this would act like the trigger to give credit to the affiliate.

// Admin CP look for the Languages & Phrases > Phrase Manager

Inside the phrase ?email body ?
1. payment_ received
2. payment_ reversed

// approve the Affiliate transaction
1. payment_ received

The Var?s needed
$userid
Username : $username Subscription :
$subscription Amount: $amount
Processor: $processor
Transaction ID: $transactionid

// affiliate snippet code
{Add your affiliate script link http://www.localhost123.com?var1& var2&var3}

// If it?s a charge back take back the credit from the Affiliate.
payment_ reversed

The Var?s needed
$userid
Username : $username Subscription :
$subscription Amount: $amount
Processor: $processor
Transaction ID: $transactionid

// affiliate snippet code
{Add your affiliate script link http://www.localhost123.com?var1& var2&var3}

I have not tested it but it should work I?m going to use it soon.
I?m give back to this site because it helped me with my Vbulletin Custom code to get an Idea of what was what.

Thanks vbulletin.org and it members!

Cheers,
Brian Diaz
Media 65

P.S Guys don?t steal my credit.
bada_bing => Say hello to ?Joey Scoppetta? Hey
Reply With Quote
  #5  
Old 07-24-2008, 06:52 PM
mambomouth mambomouth is offline
 
Join Date: May 2005
Location: NYC/NJ
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have found this vbulletin affiliate integration.

http://jam.jrox.com/docs/index.php?article=187

I have not gotten it to work right but every little bit helps.

Cheers,
Brian
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 08:13 AM.


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.09712 seconds
  • Memory Usage 2,201KB
  • 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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)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_postinfo_query
  • fetch_postinfo
  • 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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete