Support the VirtueMart project and become a member

Main Menu

PayPal module not working??

Started by stuart forrest, November 23, 2006, 14:32:50 PM

Previous topic - Next topic

stuart forrest

Hi there, just had a customer tring to process an order on the company's virtuemart shop, when they click 'confirm order' it goes back to index.php, having a look through the php code I can't see anything obviously wrong, anybody got any ideas?

Here's the code:

$url = "";
$tax_total = $db->f("order_tax") + $db->f("order_shipping_tax");
$post_variables = Array(
"cmd" => "_xclick",
"business" => PAYPAL_EMAIL,
"receiver_email" => PAYPAL_EMAIL,
"item_name" => $VM_LANG->_PHPSHOP_ORDER_PRINT_PO_NUMBER.": ". $db->f("order_id"),
"order_id" => $db->f("order_id"),
"invoice" => $db->f("order_number"),
"amount" => round( $db->f("order_subtotal")+$tax_total, 2),
"shipping" => sprintf("%.2f", $db->f("order_shipping")),
"currency_code" => $_SESSION['vendor_currency'],
"image_url" => $vendor_image_url,
"return" => SECUREURL ."index.php?option=com_virtuemart&page=checkout.result&order_id=".$db->f("order_id"),
"notify_url" => SECUREURL ."administrator/components/com_virtuemart/notify.php",
"cancel_return" => SECUREURL ."index.php",
"undefined_quantity" => "0",
"test_ipn" => PAYPAL_DEBUG,
"pal" => "NRUBJXESJTY24",
"no_shipping" => "1",
"no_note" => "1"
if( $page == "checkout.thankyou" ) {
$query_string = "?";
foreach( $post_variables as $name => $value ) {
$query_string .= $name. "=" . urlencode($value) ."&";
mosRedirect( $url . $query_string );
} else {

echo '<form action="'.$url.'" method="post" target="_blank">';
echo '<input type="image" name="submit" src="" border="0" alt="Make payments with PayPal, it is fast, free, and secure!">';

foreach( $post_variables as $name => $value ) {
echo '<input type="hidden" name="'.$name.'" value="'.$value.'" />';

echo '</form>';


Thanks i advance people!


did you ever find out the cause ?


Has anyone else come across this behavior?

My scenario is similar but not identical; the setup payment is for PayPal, and when the Checkout gets to the Confirm Order button, it redirects to a HTML version of the Invoice / Purchase Order page..

URL: index.php?page=account.order_details&order_id=151&option=com_virtuemart&Itemid=69

Odd, and frustrating. Can someone please kindly suggest some steps to identify this issue?

Thank you,

Ed Cox


Problem in not working and error occur(please select the payment method)


Quote from: jackd on December 10, 2009, 18:59:58 PM
Problem in not working and error occur(please select the payment method)