Setting up hosted recurring payments with WPP results in an "unexpected error" page when completed. The transactions DO appear correctly in Paypal and an email is generated. The error in the logs is due to a missing transaction ID:
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'txn_id' cannot be null: INSERT INTO {uc_payment_paypal_ipn} (order_id, txn_id, txn_type, mc_gross, status, receiver_email, payer_email, received) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7); Array ( [:db_insert_placeholder_0] => 368 [:db_insert_placeholder_1] => [:db_insert_placeholder_2] => web_accept [:db_insert_placeholder_3] => [:db_insert_placeholder_4] => Completed [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => dan@XXXX.XXX [:db_insert_placeholder_7] => 1353412139 ) in uc_recurring_hosted_paypal_wpp_process() (line 889 of /home/XXXX/public_html/sites/all/modules/uc_recurring/modules/uc_recurring_hosted/uc_recurring_hosted.module).
I debugged the $nvp_response array we get back from Paypal and can see that there is no TRANSACTIONID, the value that should go into the txn_id column. Is this an API change on Paypal's end maybe?
Array
(
[PROFILEID] => I-XXXXXXXXXXXC
[PROFILESTATUS] => ActiveProfile
[TIMESTAMP] => 2012-11-20T11:49:13Z
[CORRELATIONID] => fXXXXXXXXXXX3
[ACK] => Success
[VERSION] => 63.0
[BUILD] => 4181146
)
Sandbox vs live does not seem to make a difference.
Comment | File | Size | Author |
---|---|---|---|
#1 | uc_recurring-paypal_wpp_fixes-1845694-1.patch | 2.3 KB | dafeder |
Comments
Comment #1
dafederHere is a patch of some hacks I did to get this module functional. I don't expect they'll be committed as is because they likely sidestep some functionality we want back but if you're having the same problem I was this should get your WPP recurring fees working with no errors visible to the user. Perhaps critical was an overstatement but I do think this is a major issue since it breaks the checkout process for one of the most popular gateways.
Comment #1.0
dafederJust redacting email address and home dir name.
Comment #2
jbulcher CreditAttribution: jbulcher commentedPlease correct me if I'm wrong, but I don't think PayPal uses a transaction ID (anymore?):
the documentation:
I have significantly more errors than you had, dafeder, and I'm working on a fix that I'm hoping "does things right". I'll post again when things are working.
Comment #3
jbulcher CreditAttribution: jbulcher commented#1683004 has this problem too (as well as others).
Comment #3.0
jbulcher CreditAttribution: jbulcher commentedRedacting paypal Ids