FluxCP
FluxCP copied to clipboard
Redirect after a succesful paypal donation
I am talking about the intended redirect to the "?module=donate&action=complete
page.
It seems to not work no matter what. Adding the page to paypal's automatic redirection does nothing either.
After a donation is made, you're just sent to ?module=main
, there isn't any attempt to reach the intended page.
I've played around for a bit and I think the issue might be coming from this bit in preprocess.php:
if ($params->get('merchant_return_link')
It seems like merchant_return_link isn't being sent by paypal during the IPN confirmation, although even removing that check doesn't help either.
Only usage of donate complete page is here: https://github.com/rathena/FluxCP/blob/4ea0eef562d824e5032ae9c31c7bc3c854e0e869/modules/main/preprocess.php#L63-L68 Not sure is actually ever triggered or not. But anyway seems useless, there is no any actions or logic on that page.
But return url by default is module main https://github.com/rathena/FluxCP/blob/master/data/paypal/button.php#L20 So you can change it here.