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