Welcome to WebmasterWorld Guest from 54.158.51.150

Forum Moderators: buckworks

Message Too Old, No Replies

paypal - shopping cart - directed to 'Return to Merchant' page

     
11:10 am on Dec 16, 2009 (gmt 0)

5+ Year Member



when proceed to make payment in the shopping cart component of my site the page 'Return to Merchant' is always displayed.

The 'Return to Merchant' page contains the following error message:

"We have detected a problem with this shopping cart. If the problem persists, please contact the merchant."

Please help to find out the bug. thanks in advance!

The following is my code -

<?php
session_start();
$session_id = session_id();

include("includes/Database.php");
include("includes/functions.php");

$paypal_business="business_email_goes_here@gmail.com";
$paypal_site_url="http://www.test.com.au/";
$paypal_image_url=$paypal_site_url."images/logo.png";
$paypal_success_url="cart/paypal/success.php";
$paypal_cancel_url="cart/paypal/error.php";
$paypal_notify_url="cart/paypal/ipn.php";
$paypal_return_method="2"; //1=GET 2=POST
$paypal_currency_code="GBP"; //USD,GBP,JPY,CAD,EUR

//$paypal_url="https://www.paypal.com/cgi-bin/webscr";
$paypal_url="https://www.sandbox.paypal.com/cgi-bin/webscr";
$paypal_cmd="_cart";

//Payment Page Settings
$paypal_continue_button_text="Click here to return to the web site.";

$order_id = get_order_id($session_id);
?>
<html>
<head>
</head>
<body onLoad="document.paypal_form.submit()">
<form method="post" name="paypal_form" action="<?php print $paypal_url?>">
<!--GENERAL -->
<input type="hidden" name="cmd" value="<?php print $paypal_cmd?>">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="business" value="<?php print $paypal_business?>">
<input type="hidden" name="currency_code" value="<?php print $paypal_currency_code?>">

<!--RETURN-->
<input type="hidden" name="return" value="<?php print $paypal_site_url.$paypal_success_url?>">
<input type="hidden" name="notify_url" value="<?php print $paypal_site_url.$paypal_notify_url?>">
<input type="hidden" name="cancel_return" value="<?php print $paypal_site_url.$paypal_cancel_url?>">
<input type="hidden" name="rm" value="<?php print $paypal_return_method?>">

<!--PAYPAL UI-->
<input type="hidden" name="cbt" value="<?php print $paypal_continue_button_text;?>">
<input type="hidden" name="image_url" value="<?php print $paypal_image_url;?>">

<!-- CUSTOM-->
<input type="hidden" name="custom" value="<?php print $order_id;?>">

<!-- USER AND PURCHASE DETAILS : There's no error here -->

<?php print show_purchaced();?>
<?php print show_customer();?>
</form>
</body>
</html>

11:20 am on Dec 16, 2009 (gmt 0)

5+ Year Member



replaced evrything within the form except for <?php print show_purchaced();?>
<?php print show_customer();?> with the following at it works fine.

<input type="hidden" name="cmd" value="<?php print $paypal_cmd?>">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="business" value="<?php print $paypal_business?>">
<input type="hidden" name="currency_code" value="<?php print $paypal_currency_code?>">
<!--RETURN URL -->
<input type="hidden" name="return" value="<?php print $paypal_site_url.$paypal_success_url?>">
<input type="hidden" name="notify_url" value="<?php print $paypal_site_url.$paypal_notify_url?>">
<input type="hidden" name="cancel_return" value="<?php print $paypal_site_url.$paypal_cancel_url?>">
<input type="hidden" name="rm" value="<?php print $paypal_return_method?>">

<!-- CUSTOM-->
<input type="hidden" name="custom" value="<?php print $order_id;?>">
<input type="hidden" name="image_url" value="<?php print $paypal_image_url;?>">
<input type="hidden" name="cbt" value="<?php print $paypal_continue_button_text;?>">

 

Featured Threads

Hot Threads This Week

Hot Threads This Month