Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
  #1  
Old 05-28-2010, 01:15 PM
kobitriki kobitriki is offline
 
Join Date: Feb 2009
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default help with PayPal processing and affiliate tracking

Hello,

I am trying to integrate affiliate tracking to with VB paid subscription using PayPal.

I added this code to /includes/paymentapi/class_paypal.php right after :
Code:
function verify_payment()
	{
the code I added:
Code:
    $papch = curl_init();
    curl_setopt($papch, CURLOPT_URL, "http://www.myaffsite.com/plugins/PayPal/paypal.php");
    curl_setopt($papch, CURLOPT_POST, 1);
    curl_setopt($papch, CURLOPT_POSTFIELDS, $_POST);
    curl_exec($papch);
 
    $separator = '||';
    if ($_POST['custom'] != '') {
      $explodedCustomValue = explode($separator, $_POST['custom'], 2);
          if (count($explodedCustomValue) == 2) {
            $_REQUEST['custom'] = $_POST['custom'] = $explodedCustomValue[0];   
      }
    }
and now when user try to pay for subscription, he sent to PayPal, pay, and go back to VB but the system do not set his subscription.

in this time I get email from VB script that says:
Quote:
Database error in vBulletin 4.0.3:

Invalid SQL:

### INSERT QUERY GENERATED BY fetch_query_sql() ###
INSERT INTO paymenttransaction
(`state`, `dateline`, `paymentapiid`, `request`)
VALUES
('0', '1275055526', '1', 'a:3:{s:13:\"vb_error_code\";s:22:\"authentication _failure\";s:3:\"GET\";s:32:\"a:1:{s:6:\"method\"; s:6:\"paypal\";}\";s:4:\"POST\";s:1107:\"a:29:{s:1 9:\"transaction_subject\";s:0:\"\";s:12:\"payment_ date\";s:25:\"07:05:23 May 28, 2010 PDT\";s:8:\"txn_type\";s:14:\"subscr_payment\";s:9 :\"subscr_id\";s:14:\"I-KCEV6RWAYM9R\";s:9:\"last_name\";s:6:\"Family\";s: 17:\"residence_country\";s:2:\"IL\";s:9:\"item_nam e\";s:35:\" mysite.com Subscription\";s:13:\"payment_gross\";s:0:\"\";s:1 1:\"mc_currency\";s:3:\"USD\";s:8:\"business\";s:1 9:\"myemail@gmail.com\";s:12:\"payment_type\";s:7: \"instant\";s:22:\"protection_eligibility\";s:10:\ "Ineligible\";s:11:\"verify_sign\";s:56:\"AfQicOwL GZ5BuSSd1DN43BpPyAXnIJQgdoWxUl3xgKsYJF-JQnOJc\";s:12:\"payer_status\";s:8:\"verified\";s: 11:\"payer_email\";s:19:\"user@gmail.com\";s:6:\"t xn_id\";s:17:\"8PD84195D024U\";s:14:\"receiver_ema il\";s:19:\"myemail@gmail.com\";s:10:\"first_name\ ";s:3:\"Name\";s:8:\"payer_id\";s:13:\"K592Z7HKMN\ ";s:11:\"receiver_id\";s:13:\"KM9BFN4F8U\";s:11:\" item_number\";s:32:\"472d279217b6493e8c346a37ec\"; s:14:\"payment_status\";s:9:\"Completed\";s:11:\"p ayment_fee\";s:0:\"\";s:6:\"mc_fee\";s:4:\"0.10\"; s:8:\"mc_gross\";s:4:\"0.10\";s:6:\"custom\";s:9:\ "username\";s:7:\"charset\";s:12:\"windows-1255\";s:14:\"notify_version\";s:3:\"3.0\";s:3:\"t ax\";N;}\";}');

MySQL Error : MySQL server has gone away
Error Number : 2006
Request Date : Friday, May 28th 2010 @ 05:05:26 PM
Error Date : Friday, May 28th 2010 @ 05:05:43 PM
Script : http://www.mysite.com/forum/payment_...?method=paypal
Referrer :
IP Address :
Username :
Classname : vB_Database
MySQL Version :
any help will be appreciated,

Thx
Reply With Quote
Reply

Thread Tools
Display Modes

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 01:24 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.03193 seconds
  • Memory Usage 2,163KB
  • 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
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)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