News:

Looking for documentation? Take a look on our wiki

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:

<?php
$url = "https://www.paypal.com/cgi-bin/webscr";
$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="http://images.paypal.com/images/x-click-but6.gif" 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!

agentblueuk

did you ever find out the cause ?

edwardcox

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
edward.cox02@gmail.com

jackd

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

PRO

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


what?