I've enabled instant payment notification in Paypal. It appears that Paypal is sending the notification, but it isn't being saved at my end. Here's the Paypal debug results from a transaction that I made:
PayPal IPN Results
==================
address_city = Portage
address_country = United States
address_name = Sheldon Rampton
address_state = WI
address_status = confirmed
address_street = 713 W. Carroll St.
address_zip = 53901
business = sheldon2000@tds.net
custom = first_name = Sheldon
item_name = Friends In Deed
item_number = 1
last_name = Rampton
mc_currency = USD
mc_fee = 1.08
mc_gross = 27.00
notify_version = 1.6
payer_email = sheldon@prwatch.org
payer_id = 6WH8W4GZJHECY
payer_status = unverified
payment_date = 19:43:04 Feb 13, 2005 PST
payment_fee = 1.08
payment_gross = 27.00
payment_status = Completed
payment_type = instant
quantity = 1
receipt_id = 2635-1172-3116-5037
receiver_email = sheldon@sheldonrampton.com
receiver_id = T7AVFL6NBBZDY
tax = 0.00
txn_id = 7E792480YS394352P
txn_type = web_accept
verify_sign = AM78ceOjanDCcZRQc5FDhsRGBD0dAfjj9AY26ueYmg-fUgZRud-KpTOx
In looking through the code in paypal.module, I came across the following passage in function paypal_ipn that may be the problem:
if (strstr($key, 'item_number')) {
if (strstr($value, 'txnid_')) {
$txnid = substr($value, strlen('txnid_'));
$has_txn_key = true;
$debug .= t("A Transaction ID exists and is #%key\n", array('%key' => $txnid));
}
$i[substr($key, strlen('item_number'))] = $txnid;
}
I don't know exactly what this code is doing, but it appears to be the only code that sets a transaction key, and since key item_number doesn't have a value that begins with 'txnid_', $txnid is probably not being set. This in turn would mean that the following test fails when it occurs further down in the function:
elseif ($ppid && $has_txn_key) ...
I'm a complete newbie to the ecommerce module, so maybe I just don't understand something. If so, I'd appreciate it if someone could email me an explanation of what I need to do to get this working. My email address is: sheldon@sheldonrampton.com.
Comments
Comment #1
matt westgate commentedThis has been fixed. Thanks.
Comment #2
(not verified) commented