vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   help with PayPal processing and affiliate tracking (https://vborg.vbsupport.ru/showthread.php?t=243473)

kobitriki 05-28-2010 01:15 PM

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


All times are GMT. The time now is 05:11 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.00920 seconds
  • Memory Usage 1,720KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)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