Automatic discount lost after clicking cancel on Paypal Standard
Created by: davejenx
Description
I have CiviDiscount set to offer a discount to members on an event price set. This is working fine.
However if the event registration uses Paypal Standard and the user goes through to the Paypal payment form but then clicks the Cancel link there, when they return to the event registration form, it shows full price: the discount is no longer automatically applied. The user has to go to the registration form afresh, losing their edits, in order to get the discount back.
Not sure whether this will need fixing in CiviDiscount or in core.
CiviCRM 5.13.4, CiviDiscount 3.1, 3.3 or 3.7, Drupal 7 Also replicated on current dmaster.
Steps to replicate
- Set up Paypal Standard.
- Set up an event price set - a single field & option will do, with an event fee > 0.
- Create an event using this price set, allowing online registration, payment by Paypal Standard + Pay Later.
- Give your test user a current membership.
- Set up a discount code: I used fixed amount, for above price set/field, for any event, auto discount for existing members of above type in any current status.
- As the test user, go to event registration page.
- Verify that the discount is applied to the above event price field.
- Select this event price field, fill in other required fields, select Paypal, click Continue here & on confirm page.
- On Paypal payment page, click the link "Cancel and return to (My Shop)".
Expected result
Return to registration form with auto discount applied.
Actual result
Return to registration form with auto discount not applied.