Print

PayPal - shipping address provided by the merchant is invalid

A client was recently trying their initial checkouts using a Website Payments Standard account and encountered the following error once they reached PayPal:

"Unable to process payment. Please contact the merchant as the shipping address provided by the merchant is invalid, and the merchant has requested that your order must be shipped to that address."

The issue was traced back to the PayPal payment module file located here:

/public_html/plugins/vmpayment/paypal/paypal.php

The state was being passed as the whole state name instead of just the state abbreviation.

At around line 197 you will see the following:

  1. "country" => ShopFunctions::getCountryByID ($address->virtuemart_country_id),
"country" => ShopFunctions::getCountryByID ($address->virtuemart_country_id),


This function is designed to take a second parameter which specifies what field to return that by default is "state_name"

Change it to:

  1. "country" => ShopFunctions::getCountryByID ($address->virtuemart_country_id, 'country_2_code'),
"country" => ShopFunctions::getCountryByID ($address->virtuemart_country_id, 'country_2_code'),

Problem solved! Now PayPal will be able to validate the address.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

VirtueMart Admin Menu Not Showing After Update

After running a Joomla and VirtueMart update in place the admin menu dissappears, and this is a...

VirtueMart Show Cart Links not going to SSL

Recently updated a site to VirtueMart 3.0.18.  Had SSL for sensitive areas turned on in the...

Hide the Shopper Information Fields in VirtueMart

Open the file: components/com_virtuemart/views/user/tmpl/edit_shopper.phpor corresponding...

Adding Shopper Group Based Discount in VirtueMart 2

Calculation rules can be added using the instructional located here:...

Setting Payment Module Order

This can be done via the Joomla plugins section on the admin side.  Adjust the order there.