Support

Home Forums Event Espresso Premium Paypal cancel registration link does not forward to cancellation page

Paypal cancel registration link does not forward to cancellation page

Posted: September 27, 2018 at 8:41 am

Viewing 4 reply threads


prepdoctors

September 27, 2018 at 8:41 am

Hi there,

All critical pages are set up, but if a user cancels from paypal, they are sent to an unstyled page:

https://prepdoctors.ca/course-registration/?uts=1538058721&step=payment_options&ee_cancel_payment=1#checkout&token=EC-0HY17793UM6517304

Instead of the cancellation page:

https://prepdoctors.ca/registration-cancelled/

Is this a configuration issue?


Tony

  • Support Staff

September 27, 2018 at 10:33 am

Hi there,

Not really, but it shouldn’t be an unstyled page either.

When you cancel the payment in PayPal your not canceling the registration, you’re canceling a payment so it should link you back to your payment options in EE.

Whilst I like the customizations you’ve made to the default steps, there are details missing from your page, for example, the e_reg_url_link hidden field is empty on your site – http://take.ms/8IcSV

That value is required for the payment options as it links the request to your session, PayPal Express doesn’t have that value so it links you back your site by then EE doesn’t know what to load for you.

How have you customized the registration steps?


prepdoctors

October 4, 2018 at 8:26 am

Can we send them to the Cancel Registration page if they cancel the payment?
i.e. if they cancel they payment this will cancel their registration, we’re ok with that


Josh

  • Support Staff

October 4, 2018 at 9:52 am

You can send them to the Cancel Registration page by adding this code snippet:

add_filter(
    'FHEE__EEG_Paypal_Express__set_redirection_info__arguments',
    'my_custom_paypal_express_cancel_url',
    10,
    2
);
function my_custom_paypal_express_cancel_url(
    $token_request_dtls,
    $object
) {
    $token_request_dtls['CANCELURL'] = get_permalink(
        EE_Registry::instance()->CFG->core->cancel_page_id
    );
    return $token_request_dtls;
}

You add the above to your custom functions plugin.

Please note though, the Cancel registration page actually cancels their registration session and it does not cancel anything that’s been recorded to the database. Which means if they still want to register, they’ll have to start over, but their original registration will persist to the database. So with that scenario you’ll potentially end up with some duplicate registrations.

Also please note that in order for any of this to work you’ll need to restore the e_reg_url_link hidden field like Tony mentioned.


prepdoctors

October 4, 2018 at 11:43 am

That’s OK we’re used to duplicate registrations, we end up with one confirmed registration after payment
I’ll try the code and keep you posted. Thanks Josh

Viewing 4 reply threads

The support post ‘Paypal cancel registration link does not forward to cancellation page’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso