Closed (fixed)
Project:
e-Commerce
Version:
5.x-3.x-dev
Component:
paypal
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Mar 2007 at 15:23 UTC
Updated:
16 Apr 2008 at 09:10 UTC
While testing my store with paypal sandbox I noticed that if I bought the same item twice (two seperate transactions) I did not receive the invoice email the second time. I have found it is to do with the $is_new boolean in the paypal_ipn function. I cannot figure out why it does not work however, as each transaction does have a new ppid.
Comments
Comment #1
bones commentedFound the problem.
Line 336:
$is_new = (db_result(db_query('SELECT COUNT(txnid) FROM {ec_paypal} WHERE ppid = %d', $ppid))) ? false : true;Should be:
$is_new = (db_result(db_query("SELECT COUNT(txnid) FROM {ec_paypal} WHERE ppid = '%s'", $ppid))) ? false : true;Because the paypal id is alpha numeric.
Comment #2
Bevan commentedGreat spotting. I'm testing this out now...
Comment #3
skelly commentedI'm pretty sure this is still a problem with all the current 3.x source trees and the above fix does seem warranted from my testing...
Comment #4
skelly commentedMy bad. Accidentally changed version in last post.
Comment #5
Bevan commentedWorks for me on EC 4
Comment #6
gordon commentedFixed in ec4
Comment #7
(not verified) commentedComment #8
Bevan commentedDamn! I've just spent hours RE-debugging this one. Renaming to something that I will find next time. Grumble.