Page MenuHomePhabricator

Ingenico Connect: need new ct_id after successful donation
Closed, ResolvedPublic2 Estimate Story Points

Description

/contact/view/contribution?reset=1&id=29387310&cid=6720613 and
/contact/view/contribution?reset=1&id=29387114&cid=6720613

have the same ct_id.

Details

Related Gerrit Patches:
mediawiki/extensions/DonationInterface : masterIngenico ct_id fix.

Event Timeline

Ejegg created this task.Mar 27 2018, 8:01 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 27 2018, 8:01 PM
jgleeson added a subscriber: jgleeson.EditedMar 29 2018, 2:20 PM

I am not able to replicate this locally. (up to the point of the donation messages being dropped on the queue with shared ct ids)

I ran through two donations using the following test card details:
4012000033330026
10/20 - 123

Both completed successfully and the messages ended up in the donations queue with unique ct ids:

  1. "{\"gateway_txn_id\":\"000000293000000003300000100001\",\"response\":\"Original Response Status (pre-SET_PAYMENT): 600\",\"gateway_account\":null,\"fee\":0,\"contribution_tracking_id\":\"2136047852\",\"utm_source\":\"..cc\",\"language\":\"en\",\"email\":\"me@jackgleeson.co.uk\",\"first_name\":\"Jack\",\"last_name\":\"Gleeson\",\"street_address\":\"123 Street\",\"city\":\"Alablaster\",\"state_province\":\"AL\",\"country\":\"US\",\"postal_code\":\"12345\",\"gateway\":\"ingenico\",\"order_id\":\"2136047852\",\"recurring\":\"\",\"payment_method\":\"cc\",\"payment_submethod\":\"visa\",\"currency\":\"USD\",\"gross\":35,\"user_ip\":\"10.0.2.2\",\"gateway_session_id\":\"f73b6aed-150c-4e8d-a03c-6384e04f60ec\",\"date\":1522236772,\"source_name\":\"DonationInterface\",\"source_type\":\"payments\",\"source_host\":\"mwdebian9\",\"source_run_id\":5631,\"source_version\":\"unknown\",\"source_enqueued_time\":1522236772}"
  2. "{\"gateway_txn_id\":\"000000293000000003310000100001\",\"response\":\"Original Response Status (pre-SET_PAYMENT): 600\",\"gateway_account\":null,\"fee\":0,\"contribution_tracking_id\":\"2136047855\",\"utm_source\":\"..cc\",\"language\":\"en\",\"email\":\"jgleeson@wikimedia.org\",\"first_name\":\"Joe\",\"last_name\":\"Jones\",\"street_address\":\"Jones Street\",\"city\":\"Alablaster\",\"state_province\":\"AL\",\"country\":\"US\",\"postal_code\":\"54321\",\"gateway\":\"ingenico\",\"order_id\":\"2136047855\",\"recurring\":\"\",\"payment_method\":\"cc\",\"payment_submethod\":\"visa\",\"currency\":\"USD\",\"gross\":35,\"user_ip\":\"10.0.2.2\",\"gateway_session_id\":\"c080fc03-b055-4639-8dd6-ec89fefd5fc2\",\"date\":1522238515,\"source_name\":\"DonationInterface\",\"source_type\":\"payments\",\"source_host\":\"mwdebian9\",\"source_run_id\":5630,\"source_version\":\"unknown\",\"source_enqueued_time\":1522238515}"
jgleeson claimed this task.Mar 29 2018, 2:40 PM
jgleeson added a comment.EditedMar 29 2018, 2:44 PM

OK, I have now been able recreate this:

Tested for a third time using the previous submission input/session by just refreshing the form post donation, and got the following:

  1. "{\"gateway_txn_id\":\"000000293000000003310000100001\",\"response\":\"Original Response Status (pre-SET_PAYMENT): 600\",\"gateway_account\":null,\"fee\":0,\"contribution_tracking_id\":\"2136047855\",\"utm_source\":\"..cc\",\"language\":\"en\",\"email\":\"jgleeson@wikimedia.org\",\"first_name\":\"Joe\",\"last_name\":\"Jones\",\"street_address\":\"Jones Street\",\"city\":\"Alablaster\",\"state_province\":\"AL\",\"country\":\"US\",\"postal_code\":\"54321\",\"gateway\":\"ingenico\",\"order_id\":\"2136047855\",\"recurring\":\"\",\"payment_method\":\"cc\",\"payment_submethod\":\"visa\",\"currency\":\"USD\",\"gross\":35,\"user_ip\":\"10.0.2.2\",\"gateway_session_id\":\"c080fc03-b055-4639-8dd6-ec89fefd5fc2\",\"date\":1522238515,\"source_name\":\"DonationInterface\",\"source_type\":\"payments\",\"source_host\":\"mwdebian9\",\"source_run_id\":5630,\"source_version\":\"unknown\",\"source_enqueued_time\":1522238515}"
  2. "{\"gateway_txn_id\":\"000000293000000003320000100001\",\"response\":\"Original Response Status (pre-SET_PAYMENT): 600\",\"gateway_account\":null,\"fee\":0,\"contribution_tracking_id\":\"2136047855\",\"utm_source\":\"..cc\",\"language\":\"en\",\"email\":\"jgleeson@wikimedia.org\",\"first_name\":\"Joe\",\"last_name\":\"Jones\",\"street_address\":\"Jones Street\",\"city\":\"Alablaster\",\"state_province\":\"AL\",\"country\":\"US\",\"postal_code\":\"54321\",\"gateway\":\"ingenico\",\"order_id\":\"2136047855\",\"recurring\":\"\",\"payment_method\":\"cc\",\"payment_submethod\":\"visa\",\"currency\":\"USD\",\"gross\":35,\"user_ip\":\"10.0.2.2\",\"gateway_session_id\":\"83c71aa9-a9ea-4b1f-96e6-8a263b2b4bea\",\"date\":1522240137,\"source_name\":\"DonationInterface\",\"source_type\":\"payments\",\"source_host\":\"mwdebian9\",\"source_run_id\":670,\"source_version\":\"unknown\",\"source_enqueued_time\":1522240137}"
jgleeson changed the task status from Open to Stalled.EditedApr 3 2018, 9:46 AM

I managed to track down the duplicate ct_id bug you discovered and put some notes on the ticket. However, I haven't patched it yet as I'm not sure on how to proceed. I chatted briefly to XenoRyet on how to patch it but he and I weren't 100% sure on the desired behaviour post a successful donation. I see three potential fixes:

  1. save the ct_id (without sequence appended) and DO clear session values after successful donation
  2. save the ct_id (with sequence appended) and DO clear session values after successful donation
  3. save the ct_id (with sequence appended) and DO NOT clear session values after successful donation.

The current bug is due to the ct_id being saved without the sequence increment being appended.

XenoRyet claimed this task.Apr 6 2018, 4:19 PM

Change 431676 had a related patch set uploaded (by XenoRyet; owner: XenoRyet):
[mediawiki/extensions/DonationInterface@master] WIP: Ingenico ct_id fix.

https://gerrit.wikimedia.org/r/431676

Change 431676 merged by jenkins-bot:
[mediawiki/extensions/DonationInterface@master] Ingenico ct_id fix.

https://gerrit.wikimedia.org/r/431676

XenoRyet closed this task as Resolved.May 11 2018, 5:03 PM
XenoRyet set the point value for this task to 2.May 30 2019, 7:55 PM