PayPal Express Checkout Problem
I am using eCart 5.
I am logged in using the PayPal sandbox userid
I add a product item to the cart.
I click the Checkout button on cart.php
It goes to checkout.php
and displays the billing address.
On checkout.php:
I click the PayPal Express Checkout button
It goes to pp_checkout_failure.php
Displaying the following message:
Transaction Not Completed
We're sorry
Your PayPal transaction could not be completed.
Is there a way that I can see what is causing this failure?
I think the following code is what executes when the PayPal Express Checkout button is clicked.
if (($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])) > 0) && isset($_POST)) {
$WA_PP_ECO_Set_params = array();
$WA_PP_ECO_Set_params[0] = array();
$WA_PP_ECO_Set_params[1] = array();
$nextIndex = count($WA_PP_ECO_Set_params[0]);
$WA_PP_ECO_Set_params[0][$nextIndex] = "Username";
$WA_PP_ECO_Set_params[1][$nextIndex] = "tstbuy_1275694241_per@alltexan.com";
$nextIndex = count($WA_PP_ECO_Set_params[0]);
$WA_PP_ECO_Set_params[0][$nextIndex] = "System";
$WA_PP_ECO_Set_params[1][$nextIndex] = "WPPro";
$nextIndex = count($WA_PP_ECO_Set_params[0]);
$WA_PP_ECO_Set_params[0][$nextIndex] = "Currency";
$WA_PP_ECO_Set_params[1][$nextIndex] = "USD";
$nextIndex = count($WA_PP_ECO_Set_params[0]);
$WA_PP_ECO_Set_params[0][$nextIndex] = "OrderTotal";
$WA_PP_ECO_Set_params[1][$nextIndex] = "".$SaleCo->GrandTotal() ."";
$nextIndex = count($WA_PP_ECO_Set_params[0]);
$WA_PP_ECO_Set_params[0][$nextIndex] = "ReturnURL";
$WA_PP_ECO_Set_params[1][$nextIndex] = "http://www.alltexan.com/saleco/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] = "http://www.alltexan.com/saleco/pp_cancel.php";
$nextIndex = count($WA_PP_ECO_Set_params[0]);
$WA_PP_ECO_Set_params[0][$nextIndex] = "PaymentAction";
$WA_PP_ECO_Set_params[1][$nextIndex] = "Authorization";
$nextIndex = count($WA_PP_ECO_Set_params[0]);
$WA_PP_ECO_Set_params[0][$nextIndex] = "UseSandbox";
$WA_PP_ECO_Set_params[1][$nextIndex] = "true";
$WA_PP_ECO_SetResult = WA_PP_ECO_Set_Post($WA_PP_ECO_Set_params);
if ($WA_PP_ECO_SetResult->isError) {
if ("pp_checkout_failure.php" != "") {
header("Location: ". "pp_checkout_failure.php");
exit;
}
}
else {
$SaleCo->redirStr = $WA_PP_ECO_SetResult->ECOServer;
}
}
After looking at another thread I saw the echo var_dump($_SESSION); command.
When pp_checkout_failure.php runs with this code inserted, I get:
array(11) {
["ProductImagesPath"]=> string(15) "product_images/"
["CompanyName"]=> string(6) "SaleCo"
["UserID"]=> string(2) "95"
["UserLevel"]=> string(1) "3"
["WADbSearch1_test_products_Results"]=> string(0) ""
["SaleCo_Items"]=> string(438) "7|WAECART|Yard Lights|WAECART|This 12 Piece Solar LED 2 Tier Mini Stake Walk Light is made of plastic with a dark brown finish. The light lens is plastic. High efficiency LED. Rechargeable lithium battery included. Plastic Body with Dark Brown Finish Clear Fluted Plastic Len |WAECART||WAECART|1|WAECART|1|WAECART|0.09|WAECART|95|WAECART|7777777|WAECART|7|WAECART|1|WAECART|0.09|WAECART|1 Yard Lights (7)"
["WAEC_ContinueRedirect"]=> string(123) "/saleco/cust_products_Results.php?S_ProductSKU=&S_ProductName=&S_ProductPrice=&S_ProductCategoryID=&Search.x=62&Search.y=10"
["eCart_PPECO_System"]=> string(2) "US"
["PayPal_ECO_Token"]=> string(0) ""
["ECO_Auth_Request"]=> string(1088) "tstbuy_1275694241_per@alltexan.com60.0http://www.alltexan.com/saleco/pp_confirm.phphttp://www.alltexan.com/saleco/pp_cancel.phpAuthorization0.09"
["ECO_Auth_Result"]=> string(2102) "2010-06-12T14:22:55ZFailure584bf13b41c96Authentication/Authorization FailedYou do not have permissions to make this API call10002Error60.01349298"
}
Can you see any problems here? If I go through the standard instead og the express path with this same info it works fine with no problems.