The /paypal/ipn page is logging some quite bad SQL errors.

For testing purposes i've got my subscription expiring every 1 day. During testing i've created many subscriptions for the same user and same paypal account. I just went through and killed of f three of them by cancelling the subscription from the PayPal account/website end.

I'm not familiar with the Paypal interaction but i'm assuming something from paypal must have contacted the drupal module to say that a new payment has been taken?

Anyway, this causes the following error to be logged in watchdog (for every subscription i cancel):

Duplicate entry '' for key 1 query: INSERT INTO paypal_log (txn_type, receiver_email, payer_id, payer_email, item_name, mc_currency, item_number, verify_sign, notify_version) VALUES ("subscr_cancel", "payments@example.co.uk", "XUECFQKMKVGB4", "mike@example.co.uk", "GREEN Subscription", "GBP", "2000", "AaVJ6GsNy5OCeLQYVg1dKffuZ889ARFPDY0EuUqkx8rABUHD0oWkQc2A", "1.7") in /var/www/html/includes/database.mysql.inc on line 66.

I would be suprised if this has not been noticed before. Maybe i mis-configured something?

Comments

budda’s picture

Further to the SQL error when a subscription is cancelled I forgot to report that an email is sent to the user, which is logged as "sent welcome email to xxxxx". Welcome email upon a cancellation request?! I think this should send the "goodbye" email instead.

cyberlot’s picture

Priority: Critical » Minor

Your paypal subscription was not given a txn_id you must have a diffrent txn_id for each subscription for it to record it.