Event Registration Confirmation from waitlist crashes payment processors that expect to be able to pull contact information from the doPayment parameters (Stripe via PropertyBag)
Overview
When a participant returns to the site after moving from the waitlist to a pending status, the contactID parameter is not passed through to the payment processor.
On Stripe in particular, this causes the form to crash, payment to not be made, the Participant record to remain in pending from waitlist state, and any additional details entered into the form to be lost. There's the potential for this to cause problem with other payment processors where contactID is expected to be passed through also.
It seems like this information should be set by the Confirmation form before handing off to the payment processor, so filing as a core bug.
Reproduction steps
- Enable waitlist statuses in CiviCRM
- Create an Event with Waitlist enabled, setting the payment processor to Stripe
- Register a "Pending From Waitlist" attendee (e.g. fill the waitlist then try to register one more)
- Attempt to use the generated link /civicrm/event/register/confirm?reset=1&participantId={id}&cs={checksum}
- Note that the previously filled details are loaded
- Fill in all details and confirm the registration
Current behaviour
The Form throws up the unfriendly yellow error box with Property 'contactID' has not been set.
Trace also appears in CiviCRM.HASH.log:
$Fatal Error Details = array:3 [
"message" => "Property 'contactID' has not been set."
"code" => null
"exception" => BadMethodCallException {#12711
#message: "Property 'contactID' has not been set."
#code: 0
#file: "/.../httpdocs/wp-content/plugins/civicrm/civicrm/Civi/Payment/PropertyBag.php"
#line: 291
trace: {
/.../httpdocs/wp-content/plugins/civicrm/civicrm/Civi/Payment/PropertyBag.php:291 {
› }
› throw new \BadMethodCallException("Property '$prop' has not been set.");
› }
}
/.../httpdocs/wp-content/plugins/civicrm/civicrm/Civi/Payment/PropertyBag.php:625 { ...}
/.../httpdocs/wp-content/plugins/civicrm/civicrm/ext/com.drastikbydesign.stripe/CRM/Core/Payment/Stripe.php:556 { ...}
/.../httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Event/Form/Registration/Confirm.php:1264 { ...}
/.../httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Event/Form/Registration/Confirm.php:533 { ...}
/.../httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php:565 { ...}
/.../httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/StateMachine.php:144 { ...}
/.../httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php:43 { ...}
/.../httpdocs/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php:203 { ...}
/.../httpdocs/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php:103 { ...}
/.../httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php:353 { ...}
/.../httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:319 { ...}
/.../httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69 { ...}
/.../httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36 { ...}
/.../httpdocs/wp-content/plugins/civicrm/civicrm.php:1170 { ...}
/.../httpdocs/wp-content/plugins/civicrm/includes/civicrm.basepage.php:366 { ...}
/.../httpdocs/wp-includes/class-wp-hook.php:307 { ...}
/.../httpdocs/wp-includes/class-wp-hook.php:331 { ...}
/.../httpdocs/wp-includes/plugin.php:522 { ...}
/.../httpdocs/wp-includes/class-wp.php:771 { ...}
/.../httpdocs/wp-includes/functions.php:1310 { ...}
/.../httpdocs/wp-blog-header.php:16 { ...}
/.../httpdocs/index.php:17 { ...}
}
}
]
Expected behaviour
Event registration is confirmed, Payment is received, email is sent, and so on
Environment information
- Browser: Any browser
- CiviCRM: 5.46.2 (Did not see any relevant changes in 5.47.0)
- PHP: 7.4
- CMS: WordPress 5.9.1
- Database: MariaDB 10.3
- Web Server: Apache 2.4, Nginx latest docker
Comments
Note that everything works up until the confirmation step.
Agileware Ref: CIVICRM-1935