Invalid exit URI for proxied server configurations
The exit URI is incorrectly determined to be http
rather than https
in some situations - e.g. if the site is behind a proxy.
This prevents users from completing payment. They are not sent to GoCardless but instead see the following error message:
Sorry there was an error contacting the payment processor GoCardless.
Your browser session has expired and we are unable to complete your form submission....
This is the error in the CiviCRM log:
CRM_Core_Payment_GoCardless::getBillingRequestFlowURL exception: Validation failed (exit_uri must use HTTPS in production)
In our case the site was running in a docker container behind a proxy so $_SERVER[REQUEST_SCHEME]
returned http
rather than https
.
Edited by wmortada