Problems With PayPal Checkout
This has been working but for some reason it doesn't anymore. If the customer pays by credit card it all works fine. But if they select PayPal it fails. I've traced the problem to the confirm.php file where the ReturnURL & CancelURL values are set. If I have them set like so:
$WA_PP_ECO_Set_params[0][$nextIndex] = "ReturnURL";
$WA_PP_ECO_Set_params[1][$nextIndex] = "https://www.championnutrition.net.nz/pp_confirm.php";
$nextIndex = count($WA_PP_ECO_Set_params[0]);
$WA_PP_ECO_Set_params[0][$nextIndex] = "CancelURL";
$WA_PP_ECO_Set_params[1][$nextIndex] = "https://www.championnutrition.net.nz/cart.php?ppcancel=1";
$nextIndex = count($WA_PP_ECO_Set_params[0]);
I get a "Not Found" error because the eCart is trying to go to the following URL:
https://www.championnutrition.net.nz/https://www.paypal.com/checkoutnow?token=
If I have ReturnURL & CancelURL values set like this:
$WA_PP_ECO_Set_params[0][$nextIndex] = "ReturnURL";
$WA_PP_ECO_Set_params[1][$nextIndex] = "pp_confirm.php";
$nextIndex = count($WA_PP_ECO_Set_params[0]);
$WA_PP_ECO_Set_params[0][$nextIndex] = "CancelURL";
$WA_PP_ECO_Set_params[1][$nextIndex] = "cart.php?ppcancel=1";
You are redirected to the "Transaction Failed" page and the following error messages:
Transaction refused because of an invalid argument.
ReturnURL is invalid.
CancelURL is invalid.
I can't seem to win either way.