Incorrect membership status on payment failure
Overview
If there is an active membership A and the user selects & renews for a different membership B, then on payment failure membership B retain the old membership status (current/new) instead of pending.
Reproduction steps
- A user has active membership A
- User made a live donation for membership B (that belongs to the same membership org)
- Payment fails due to some reason.
Current behaviour
The user has an active membership B linked with a Pending (Incomplete transaction) contribution.
Expected behaviour
The membership status should be set to Pending
Environment information
- Browser: Firefox 59.0.1/Chrome 78.0.3904/Safari 13
- CiviCRM: Master
- PHP: _8.0
- CMS: Drupal 8
- Database: MariaDB 10.4
- Web Server: Apache 2.4