News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

PayPal IPN Fatal Error on your Site

Started by localzuk, July 07, 2009, 13:30:49 PM

Previous topic - Next topic

localzuk

So, we recently decided to switch from Google Checkout to Paypal due to us wanting a VT (when we get PayPal Pro etc...).

We have it working in so much as people's money is taken, but it does not update the status of the order to 'Confirmed' once the money is there.

Instead, we get an email as below:

QuoteA fatal error occured while processing a paypal transaction.
        ----------------------------------
        Hostname: www.paypal.com
        URI: /cgi-bin/webscr
        Connection timed out (110)
        Status: FAILED

Our settings are as follows:

Test Mode: No

Quote<?php
$db1 = new ps_DB();
$q = "SELECT country_2_code FROM #__vm_country WHERE country_3_code='".$user->country."' ORDER BY country_2_code ASC";
$db1->query($q);

$url = "z";
$tax_total = $db->f("order_tax") + $db->f("order_shipping_tax");
$discount_total = $db->f("coupon_discount") + $db->f("order_discount");
$post_variables = Array(
"cmd" => "_ext-enter",
"redirect_cmd" => "_xclick",
"upload" => "1",
"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-$discount_total, 2),
"shipping" => sprintf("%.2f", $db->f("order_shipping")),
"currency_code" => $_SESSION['vendor_currency'],

"address_override" => "1",
"first_name" => $dbbt->f('first_name'),
"last_name" => $dbbt->f('last_name'),
"address1" => $dbbt->f('address_1'),
"address2" => $dbbt->f('address_2'),
"zip" => $dbbt->f('zip'),
"city" => $dbbt->f('city'),
"state" => $dbbt->f('state'),
"country" => $db1->f('country_2_code'),
"email" => $dbbt->f('user_email'),
"night_phone_b" => $dbbt->f('phone_1'),
"cpp_header_image" => $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?option=com_virtuemart&page=checkout.cancel&order_id=".$db->f("order_id")."&invoice=".$db->f("order_number"),

"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) ."&";
}
vmRedirect( $url . $query_string );
} else {
echo '<form action="'.$url.'" method="post" target="_blank">';
echo '<input type="image" name="submit" src="https://www.paypal.com/en_US/i/btn/x-click-but6.gif" border="0" alt="Click to pay with PayPal - it is fast, free and secure!" />';

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

}
?>

What have I missed?

localzuk

Nobody? This is an issue, as our email inbox is currently being spammed with these error messages...

localzuk


localzuk

Ok, I've figured out what the issue will be. We have a proxy server between our web server and the internet - all traffic on our network has to via it. The notify script does not do this, it tries to connect to paypal.com directly.

Does anyone have a way of getting it to send data via our proxy? We can't alter the fact it has to go out via the proxy.

AC

I am currently having the same problem. Did you ever find a solution?

stinga

G'day,

The simplest solution would be to change the firewall to allow out bound connections from you web servers IP address.

I assume it is a business, reason you need to use a proxy, usually for web filtering.
Since this is a server it does not need to be proxied and you have a sound business reason for the data to not go via the proxy.

What proxy and why do you need to use one, out of interest?
Stinga.
614869 products in 747 categories with 15749 products in 1 category.
                                             Document Complete   Fully Loaded
                Load Time First Byte Start Render   Time      Requests      Time      Requests
First View     2.470s     0.635s     1.276s          2.470s       31            2.470s      31
Repeat View  1.064s     0.561s     1.100s          1.064s       4             1.221s       4