Thanks Ray,
my ipn inserts into the database correctly. The item_number and memo are the two things that are not going from PayPal to quickbooks when the accountant connects to his PayPal account.
I am not familiar with quickbooks. Based on your statement i can get the ipn to insert into quickbooks at the same time?. What do i need to get that to work?
Here is my ipn code
<?php
// set the default timezone to use. Available since PHP 5.1
date_default_timezone_set('America/Chicago');
?>
<?php require_once('Connections/conn_nwfgal.php'); ?>
<?php require_once('webassist/mysqli/queryobj.php'); ?>
<?php
require "paypal_integration_class/paypal.class.php";
require "config.php";
$p = new paypal_class;
$p->paypal_url = $payPalURL;
if ($p->validate_ipn()) {
if($p->ipn_data['payment_status']=='Completed')
{
$amount = $p->ipn_data['mc_gross'] - $p->ipn_data['mc_fee'];
?>
<?php
if (true) {
$InsertQuery = new WA_MySQLi_Query($conn_nwfgal);
$InsertQuery->Action = "insert";
$InsertQuery->Table = "registration_paypal";
$InsertQuery->bindColumn("transaction_ID", "s", "".$p->ipn_data['txn_id'] ."", "WA_DEFAULT");
$InsertQuery->bindColumn("first_name", "s", "".$p->ipn_data['first_name'] ."", "WA_DEFAULT");
$InsertQuery->bindColumn("last_name", "s", "".$p->ipn_data['last_name'] ."", "WA_DEFAULT");
$InsertQuery->bindColumn("email1", "s", "".$p->ipn_data['payer_email'] ."", "WA_DEFAULT");
$InsertQuery->bindColumn("address_street", "s", "".$p->ipn_data['address_street'] ."", "WA_DEFAULT");
$InsertQuery->bindColumn("address_city", "s", "".$p->ipn_data['address_city'] ."", "WA_DEFAULT");
$InsertQuery->bindColumn("address_state", "s", "".$p->ipn_data['address_state'] ."", "WA_DEFAULT");
$InsertQuery->bindColumn("address_zip", "s", "".$p->ipn_data['address_zip'] ."", "WA_DEFAULT");
$InsertQuery->bindColumn("amount", "d", "".$amount ."", "WA_DEFAULT");
$InsertQuery->bindColumn("payment_gross", "s", "".$p->ipn_data['mc_gross'] ."", "WA_DEFAULT");
$InsertQuery->bindColumn("payment_fee", "s", "".$p->ipn_data['mc_fee'] ."", "WA_DEFAULT");
$InsertQuery->bindColumn("program", "s", "".$p->ipn_data['item_number'] ."", "WA_DEFAULT");
$InsertQuery->bindColumn("special_requests", "s", "".$p->ipn_data['memo'] ."", "WA_DEFAULT");
$InsertQuery->bindColumn("original_request", "s", "".http_build_query($_POST) ."", "WA_DEFAULT");
$InsertQuery->saveInSession("");
$InsertQuery->execute();
$InsertGoTo = "";
if (function_exists("rel2abs")) $InsertGoTo = $InsertGoTo?rel2abs($InsertGoTo,dirname(__FILE__)):"";
$InsertQuery->redirect($InsertGoTo);
}
?>
<?php
}
} else {
die("invalid");
}
?>