News:

Support the VirtueMart project and become a member

Main Menu

Multi-currency store : wrong currency on paypal interface

Started by fafiou, January 06, 2009, 02:02:50 AM

Previous topic - Next topic

ufo_hk

Came back to post that I managed to get the issue fixed and see Nded had beat me to it.

Do as Nded says visit:
http://www.gjcwebdesign.com/configuration-paypal-payment-module-virtuemart.html

and not only do you get better info on the paypal but multicurrancy issue can be fixed. Note John @ gjcwebdesign did a great job of customising this for us.

Thanks - finally happy we have a suitable fix for this.

volksman3

#31
The fix at http://www.gjcwebdesign.com/configuration-paypal-payment-module-virtuemart.html works fine for sorting out the various currency issues and a disclaimer place on the store site explaining the slight difference between the paypal total and the virtuemart total due to the different exchange rates used between ECB and Paypal allows it to be used. The problem i have is if you checkout using the primary store currency using the above paypal script i get the following error from paypal:

The amount received was: 40.19 GBP.
It should be: 40.2 GBP.

If i revert back to the original paypal code this is not the case so somewhere in the new paypal script their is a rounding error but i cannot find it - It only seams to do this when the primary currency - in my case £ is used when checking out as the other orders in Euros work fine with no error.

Has anyone else had this problem and if so is there a fix for it?

ps here is my code:

<?php

$mycash = "";
if ($_SESSION['product_currency'] == "USD" )
      {
      $mycash = "USD";
      }
elseif ($_SESSION['product_currency'] == "AUD" )
      {
      $mycash = "AUD";
      }
elseif ($_SESSION['product_currency'] == "CAD" )
      {
      $mycash = "CAD";
      }
elseif ($_SESSION['product_currency'] == "EUR" )
      {
      $mycash = "EUR";
      }
else
{$mycash = "GBP";}

$url = "https://www.paypal.com/cgi-bin/webscr";
$order_id = $db->f("order_id");
$tax_total = $db->f("order_tax") + $db->f("order_shipping_tax");
$discount_total = $db->f("coupon_discount") + $db->f("order_discount");

// Query for Order Items
$dboi = new ps_DB;
$q_oi = "SELECT * FROM #__vm_order_item ";
$q_oi .= "WHERE #__vm_order_item.order_id='$order_id'";
$dboi->query($q_oi);

$row_num = $dboi->num_rows();

//Getting Cart Items
$auth = $_SESSION['auth'];
$cart = $_SESSION['cart'];
$t_quantity = 0;
$disc_perItem = 0;
$i=1;

// Query to get User Info
$dbb = new ps_DB;
$q = "SELECT * FROM #__vm_user_info ";
$q .= "WHERE user_id ='".$my->id."' ";
$dbb->setQuery($q);
$dbb->query();

//logic for applying discounts to multiple items
$discount_totalCP = $db->f("coupon_discount") + $db->f("order_discount");

while($dboi->next_record()) {
  $t_quantity = $t_quantity + intval($dboi->f("product_quantity"));
}

$dboi = null;
$dboi = new ps_DB;
$dboi->query($q_oi);

if($t_quantity > 0)
{
  if($discount_totalCP > 0) {
    $disc_perItem = round($discount_totalCP / $t_quantity, 2);
  }
  else {
    $disc_perItem = 0;
  }
}
else {
  $disc_perItem = 0;
}
//query to optain product attributes
while($dboi->next_record()) {

  $prod_attrib = $dboi->f("product_attribute");
  $supp_var['item_name_' . $i] = strip_tags("Order #". $db->f("order_id").": ". $dboi->f

("order_item_name"));

  if($prod_attrib > ''){
    $attributes_array = explode('<br/>',$prod_attrib);
    $v = 0;
    $z = 1;
    foreach ( $attributes_array as $attributes_value){
      $attrib_name = trim(substr($attributes_value, 0, strpos($attributes_value, ':')), " ");
      $supp_var['on' . $z . '_' . $i] = $attrib_name;
      $attrib_sel = trim(substr_replace(substr_replace($attributes_value, "", 0, strrpos

($attributes_value, ':')), "", 0, 2));
      $supp_var['os' . $z . '_' . $i] = $attrib_sel;
      $v++;
      $z++;
      unset($attributes_value);
    }
  }

  $supp_var['item_number_' . $i] = $dboi->f("order_item_sku");
  $supp_var['quantity_' . $i] = $dboi->f("product_quantity");
  $supp_var['amount_' . $i] = round(($dboi->f("product_item_price") - $disc_perItem),2);
  $i++;
}


//Query used to find whether to use Bill Address or Ship to address
$dboui = new ps_DB;
$q_oui = "SELECT * FROM #__vm_order_user_info ";
$q_oui .= "WHERE #__vm_order_user_info.order_id='$order_id' ORDER BY

#__vm_order_user_info.order_info_id DESC";
$dboui->query($q_oui);

$oui_id = $dboui->f("order_info_id");

if($oui_id == $order_id){
  $first_name = $dbb->f("first_name");
  $last_name = $dbb->f("last_name");
  $address1 = $dbb->f("address_1");
  $address2 = $dbb->f("address_2");
  $city = $dbb->f("city");
  $state = $dbb->f("state");
  $address_country = $dbbt->f("country");
  $zip = $dbb->f("zip");
  $H_PhoneNumber = $dbb->f("phone_1");
}
else {
  $first_name = $dboui->f("first_name");
  $last_name = $dboui->f("last_name");
  $address1 = $dboui->f("address_1");
  $address2 = $dboui->f("address_2");
  $city = $dboui->f("city");
  $state = $dboui->f("state");
  $address_country = $dboui->f("country");
  $zip = $dboui->f("zip");
  $H_PhoneNumber = $dboui->f("phone_1");
}

// Builds array for the form
$post_variables = Array(
"cmd" => "_cart",
"upload" => "1",
"page_style" => "paypal",
"business" => PAYPAL_EMAIL,
"currency_code" => $mycash,
"amount" => round( $db->f("order_subtotal")+$tax_total-$discount_total, 2),
"handling_cart" => sprintf("%.2f", $db->f("order_shipping")),
"tax" => $tax_total,
"tax_cart" => $tax_total,
"invoice" => $db->f("order_number"),
"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",
"no_shipping" => "1",
"no_note" => "1",
"email" => $dbb->f("user_email"),
"address_override" => "1",//change this to 0 if you have - Paypal does not allow your country of residence to ship to the country you wish to - errors
"first_name" => $first_name,
"last_name" => $last_name,
"address1" => $address1,
"address2" => $address2,
"city" => $city,
"state" => $state,
"address_country" => $address_country,
"zip" => $zip,
"night_phone_b" => $H_PhoneNumber
);
//add and send the new variables
if( $page == "checkout.thankyou" ) {
  $query_string = "?";

  foreach( $post_variables as $name => $value ) {
    $query_string .= $name. "=" . urlencode($value) ."&";
  }

  if(is_array($supp_var) && count($supp_var)) {
    foreach($supp_var as $name => $value) {
      $query_string .= $name. "=" . urlencode($value) ."&";
    }
  }

  vmRedirect( $url . $query_string );
}
else {
  echo '<form action="'.$url.'" method="post" target="_blank">';

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

  if(is_array($supp_var) && count($supp_var)) {
    foreach($supp_var as $name => $value) {
      echo '<input type="hidden" name="'.$name.'" value="'.$value.'" />';
    }
  }
  echo '<input type="image" name="submit" src="https://www.paypal.com/en_US/i/btn/x-click-

but6.gif" border="0" alt="Make payments with PayPal, it is fast, free, and secure!">';
//Change the above image url for different languages and countries
  echo '</form>';
}
?>
Parachutes are like minds, they only work when they are open!
http://www.akirastudio.co.uk

riefvan

To fix this issue, i use this trick

change the line in the paypal configuration (payment method form)
"currency_code" => $db->f("vendor_currency"),
with
"currency_code" => $db->f("order_currency"),

Also apply fix by atrus
Quote from: atrus on August 02, 2009, 20:35:50 PM
Nded, for your info, i solved my problem as follows:

Replace line 1599 in file ps_checkout.php (\administrator\components\com_virtuemart\classes) as follows:

//$d['shipping_total'] = $GLOBALS['CURRENCY']->convert( $d['shipping_total'] );

This line seems to be doing the unessecary 2nd conversion which messes everything up. That's why i removed it. Now everything works like a charm.

I hope this will be rectified in the next VM release.

Just don't place your change currency module anywhere in virtuemart pages because it well mess shipping&handling fee in the cart if a buyer has passed filling out shipping informations step. Put the module inside a specific menu item. Virtuemart doesn't convert the shipping&handling fee on the fly. So that buyers have to start all over the checkout process if they want to change currency in checkout process after shipping information step done.


spottedsparrow

I've finally gotten the currencies to display correctly in PayPal thanks to the many tips and hacks on these forums.  Unfortunately, PayPal is still not displaying the correct shipping charge.  A customer orders a product and the shipping charge of $1.22 is correctly displayed on my site.  When finishing the order and going to PayPal, the shipping charge is suddenly changed to $5.22.  Where did the extra $4 come from?

Here is my PayPal configuration using the $mycash and http://www.gjcwebdesign.com/configuration-paypal-payment-module-virtuemart.html fixes :
<?php

$mycash 
"";
if (
$_SESSION['product_currency'] == "EUR" )
      {
      
$mycash "EUR";
      }
elseif (
$_SESSION['product_currency'] == "AUD" )
      {
      
$mycash "AUD";
      }
elseif (
$_SESSION['product_currency'] == "CAD" )
      {
      
$mycash "CAD";
      }
elseif (
$_SESSION['product_currency'] == "GBP" )
      {
      
$mycash "GBP";
      }
else
{
$mycash "USD";}

$url "https://www.paypal.com/cgi-bin/webscr";
$order_id $db->f("order_id");
$tax_total $db->f("order_tax") + $db->f("order_shipping_tax");
$discount_total $db->f("coupon_discount") + $db->f("order_discount");  
 
// Query for Order Items
$dboi = new ps_DB;
$q_oi "SELECT * FROM #__vm_order_item ";
$q_oi .= "WHERE #__vm_order_item.order_id='$order_id'";
$dboi->query($q_oi);
 
$row_num $dboi->num_rows();
 
//Getting Cart Items
$auth $_SESSION['auth'];
$cart $_SESSION['cart'];
$t_quantity 0;
$disc_perItem 0;
$i=1;
 
// Query to get User Info
$dbb = new ps_DB;
$q "SELECT * FROM #__vm_user_info ";
$q .= "WHERE user_id ='".$my->id."' ";
$dbb->setQuery($q);
$dbb->query();
 
//logic for applying discounts to multiple items
$discount_totalCP $db->f("coupon_discount") + $db->f("order_discount");
 
while(
$dboi->next_record()) {
  
$t_quantity $t_quantity intval($dboi->f("product_quantity"));
}
 
$dboi null;
$dboi = new ps_DB;
$dboi->query($q_oi);
 
if(
$t_quantity 0)
{
  if(
$discount_totalCP 0) {
    
$disc_perItem round($discount_totalCP $t_quantity2);
  }
  else {
    
$disc_perItem 0;
  }
}
else {
  
$disc_perItem 0;
}
//query to optain product attributes
while($dboi->next_record()) {
 
  
$prod_attrib $dboi->f("product_attribute");
  
$supp_var['item_name_' $i] = strip_tags("Order #"$db->f("order_id").": "$dboi->f("order_item_name"));
 
  if(
$prod_attrib ''){
    
$attributes_array explode('<br/>',$prod_attrib);
    
$v 0;
    
$z 1;
    foreach ( 
$attributes_array as $attributes_value){
      
$attrib_name trim(substr($attributes_value0strpos($attributes_value':')), " ");
      
$supp_var['on' $z '_' $i] = $attrib_name;
      
$attrib_sel trim(substr_replace(substr_replace($attributes_value""0strrpos($attributes_value':')), ""02));
      
$supp_var['os' $z '_' $i] = $attrib_sel;
      
$v++;
      
$z++;
      unset(
$attributes_value);
    }
  }
 
  
$supp_var['item_number_' $i] = $dboi->f("order_item_sku");
  
$supp_var['quantity_' $i] = $dboi->f("product_quantity");
  
$supp_var['amount_' $i] = round(($dboi->f("product_item_price") - $disc_perItem),2);
  
$i++;
}
 
 
//Query used to find whether to use Bill Address or Ship to address
$dboui = new ps_DB;
$q_oui "SELECT * FROM #__vm_order_user_info ";
$q_oui .= "WHERE #__vm_order_user_info.order_id='$order_id' ORDER BY #__vm_order_user_info.order_info_id DESC";
$dboui->query($q_oui);
 
/*$oui_id = $dboui->f("order_info_id");
 
if($oui_id == $order_id){
  $first_name = $dbb->f("first_name");
  $last_name = $dbb->f("last_name");
  $address1 = $dbb->f("address_1");
  $address2 = $dbb->f("address_2");
  $city = $dbb->f("city");
  $state = $dbb->f("state");
  $address_country = $dbbt->f("country");
  $zip = $dbb->f("zip");
  $H_PhoneNumber = $dbb->f("phone_1");
}
else {*/
  
$first_name $dboui->f("first_name");
  
$last_name $dboui->f("last_name");
  
$address1 $dboui->f("address_1");
  
$address2 $dboui->f("address_2");
  
$city $dboui->f("city");
  
$state $dboui->f("state");
  
$address_country $dboui->f("country");
  
$zip $dboui->f("zip");
  
$H_PhoneNumber $dboui->f("phone_1");
//}
 
// Builds array for the form
$post_variables = Array(
"cmd" => "_cart",
"upload" => "1",
"page_style" => "paypal",
"business" => PAYPAL_EMAIL,
"currency_code" => $_SESSION['product_currency'],
"amount" => round$db->f("order_subtotal")+$tax_total-$discount_total2),
"handling_cart" => sprintf("%.2f"$db->f("order_shipping")),
"tax" => $tax_total,
"tax_cart" => $tax_total,
"invoice" => $db->f("order_number"),
"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",
"no_shipping" => "1",
"no_note" => "1",
"email" => $dbb->f("user_email"),
"address_override" => "1",//change this to 0 if you have - Paypal does not allow your country of residence to ship to the country you wish to - errors
"first_name" => $first_name,
"last_name" => $last_name,
"address1" => $address1,
"address2" => $address2,
"city" => $city,
"state" => $state,
"country" => $address_country,
"zip" => $zip,
//"night_phone_b" => $H_PhoneNumber
);
//add and send the new variables
if( $page == "checkout.thankyou" ) {
  
$query_string "?";
 
  foreach( 
$post_variables as $name => $value ) {
    
$query_string .= $name"=" urlencode($value) ."&";
  }
 
  if(
is_array($supp_var) && count($supp_var)) {
    foreach(
$supp_var as $name => $value) {
      
$query_string .= $name"=" urlencode($value) ."&";
    }
  }
 
  
vmRedirect$url $query_string );

else {
  echo 
'<form action="'.$url.'" method="post" target="_blank">';
 
  foreach( 
$post_variables as $name => $value ) {
    echo 
'<input type="hidden" name="'.$name.'" value="'.$value.'" />';
  }
 
  if(
is_array($supp_var) && count($supp_var)) {
    foreach(
$supp_var as $name => $value) {
      echo 
'<input type="hidden" name="'.$name.'" value="'.$value.'" />';
    }
  }
  echo 
'<input type="image" name="submit" src="https://www.paypal.com/en_US/i/btn/x-click-but6.gif" border="0" alt="Make payments with PayPal, it is fast, free, and secure!">';
//Change the above image url for different languages and countries
  
echo '</form>';
}
?>


I've also checked my PayPal account settings for Shipping Calculations and Payment Receiving Preferences, and both seem to set up as they should be (screenshots attached).

Can anyone help?  This is really doing my head in!  With half of my customers in the US, I am desperate to have this fixed.  I thought this would have been fixed with the lastest VM update, but no such luck.

VM 1.1.4 and Joomla 1.5.15


[attachment cleanup by admin]
The Spotted Sparrow
eco-friendly, vintage inspired paper goods

spottedsparrow

Don't you hate when you've spent hours, if not days, on something and it turns out to be the simplest thing?  I just solved my own problem.

When I looked at my post, I realized that I probably have to select each currency under PayPal Shipping Calculations.  Duh!  Everything is now working, including the shipping rates!  So, for anyone having similar shipping issues, be sure to change the shipping calculations for each currency you are accepting in your shop.

Thanks again to everyone for the other hacks in this thread.  It has been a lifesaver!
The Spotted Sparrow
eco-friendly, vintage inspired paper goods

dkscompany

Hi, we have find the solution and using this and working properly.

Please try this, please replace with below script with paypal configuration textarea script:

<?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);


if(isset($_SESSION['product_currency']) && $_SESSION['product_currency']!=''){
$currency = $_SESSION['product_currency'];
}else{
$currency = $_SESSION['vendor_currency'];
}
if($currency=="USD"){
$shipping_temp = sprintf("%.2f", $db->f("order_shipping"));
$shipping =sprintf("%.2f", $GLOBALS['CURRENCY']->convert( $shipping_temp,$currency,'SGD'));
}else{
$shipping =sprintf("%.2f", $db->f("order_shipping"));
}

$url = "https://www.paypal.com/cgi-bin/webscr";
$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" => $shipping,
"currency_code" => $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",
"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" 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>';

}
?>



In this script you change the currency where you get the error, like we using default currency SGD and error in USD, then put the condition for USD
if($currency=="USD"){
$shipping_temp = sprintf("%.2f", $db->f("order_shipping"));
$shipping =sprintf("%.2f", $GLOBALS['CURRENCY']->convert( $shipping_temp,$currency,'SGD'));
}else{
$shipping =sprintf("%.2f", $db->f("order_shipping"));
}

mailon

The $my_cash worked fine for me
the http://www.gjcwebdesign.com/configuration-paypal-payment-module-virtuemart.html did not work, don't really know why

Anyway, I was trying to add Russian Rubles to the payment and just realised that Paypal does not accept these payments!!! Still, can't I checkout in Russian Rubles and at payment this amount to be converted into US$ or Euros that paypal accepts?
cause my major market is in Russia and it would be really great if I could do that...

webgobe

After I tried to apply all the above recipes to fix the problem, I put together a new code, which works for me, and which has nothing hard-coded, as some of the above solutions. It's basically the tip by "dkscompany" a bit improved.
Just replace the code in the Payment Extra Info box with the one below:
<?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);

if(isset(
$_SESSION['product_currency']) && $_SESSION['product_currency']!=''){
$currency $_SESSION['product_currency'];
}else{
$currency $_SESSION['vendor_currency'];
}
$vendor_currency $_SESSION['vendor_currency'];
if(
$currency!=$vendor_currency){
        
$shipping_temp sprintf("%.2f"$db->f("order_shipping"));
        
$shipping =sprintf("%.2f"$GLOBALS['CURRENCY']->convert$shipping_temp,$currency,$vendor_currency));
}else{
        
$shipping =sprintf("%.2f"$db->f("order_shipping"));
}

$url "https://www.paypal.com/cgi-bin/webscr";
$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_total2),
"shipping" => $shipping,
"currency_code" => $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",
"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" 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>';

}
?>

Like a fine wine... Good from the start and getting better over time.

muffin

Hi there,

I've recently encountered this problem on a site I'm working on. Can someone please tell me if the above fix posted by webgobe works, and where I am supposed to put it? What is the file that needs to be edited ?

Thanks

webgobe

VirtueMart PAyment methods>PayPal>second tab with Virtue Mart Payment extra info box. CopyPaste the above code to replace what you have there.
Like a fine wine... Good from the start and getting better over time.

jameel

Virtuemart + Joomla extensions www.itechshop.org
get Paypal extended, payza extended, moneybookers extended module that let you use 98  currencies nonsupported paypal/alertpay/mb currencies on VM 1.1.x and convert them to supported one at www.itechshop.org

220+ domain extensions www.industechnologies.co