I'm getting invalid ReturnURL
error when trying to use PayPal Express. And I'm not seeing any options for setting the return url in the Store settings page.
I've tried setting the return
parameter in the checkout-tag, but it doesn't seem to help
{exp:store:checkout return="https://www.example.no"}
{exp:store:checkout return="store/order/ORDER_HASH"}
None of the above works (the second one is the same as in the example template)
Any suggestions?
Edit: I think I found the problem. We use config-bootstrap in our EE, and there I've set up the site_url as
define('NSM_SERVER_NAME', $_SERVER['SERVER_NAME']);
define('NSM_SITE_URL', '//' . NSM_SERVER_NAME);
This is to make plugins like minimee work when we're on https and http. So the site url wil be spit out like //www.example.com, and this is the reason PayPal is getting angry at me.
I found a way around it, though, but I'm not happy about it. In merchant_paypal_express.php in the system/ee/third_party/
-folder, I changed the _build_authorize_or_purchase()
method a bit:
$request['RETURNURL'] = 'https:' . $this->param('return_url');
$request['CANCELURL'] = 'https:' . $this->param('cancel_url');
As you see, I added https
hardcoded to the url. But now it works.