-
-
Notifications
You must be signed in to change notification settings - Fork 824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix missing contactID when registering for paid event from waitlist #23358
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Standard links)
|
deepak-srivastava
added a commit
to deepak-srivastava/civicrm-core
that referenced
this pull request
May 20, 2022
mattwire
pushed a commit
to mattwire/civicrm-core
that referenced
this pull request
May 22, 2022
mattwire
force-pushed
the
participantwaitlist
branch
from
May 22, 2022 20:22
629e898
to
bff6a70
Compare
@mattwire I had a client that faced this issue and the substantive part of your patch worked for me but I see for your test it is failing with
|
mattwire
force-pushed
the
participantwaitlist
branch
from
May 26, 2022 15:32
bff6a70
to
9e14239
Compare
@seamuslee001 Thankyou - tests should be passing now |
the test did it |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
See https://lab.civicrm.org/extensions/stripe/-/issues/347 but note this is not a Stripe issue and variants of this will happen with any payment processor because no contact ID is passed in when registering from the waitlist.
For a processor using payment propertyBag accessing contactID will cause CiviCRM to crash. For a payment processor using the passed in array there will at least be a PHP notice if contact_id is accessed and anything that needs the contact ID will not be setup correctly.
Before
Attempt to make a paid registration from the waitlist has no contact ID and can cause payment processors to fail.
After
Attempt to make a paid registration from the waitlist succeeds.
Technical Details
The registration code is rather complex but basically:
processPayment()
function (https://github.com/civicrm/civicrm-core/blob/master/CRM/Event/Form/Registration/Confirm.php#L1262) does not include a contact ID in the$value
array.$value
array as `$value['contact_id'].Comments
There's not much testing on register from waitlist. I found
CRM_Event_Form_Registration_RegisterTest::testDoubleWaitlistRegistration()
which could probably be extended.