Jump to content
Sign in to follow this  
Barbie97

Unable to process payment due to shipping address?

Recommended Posts

Hi Everybody!

 

I'm getting so close to getting this to work I can almost taste it! :)

 

I've set up the PayPal Website Payments Standard and it looked like everything was going good... but then I got this error and have no idea what this means. Does anyone else?

 

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.

 

Thanks in advance for any help you can give me! :)

Share this post


Link to post
Share on other sites

I FOUND THE ANSWER! WOOOO HOOOOOO!!!

 

Found the error in another post. Here it is:

 

I also faced the same problem. Here is the solution. Open paypal_standard.php file in ctalog/includes/modules/payment folder.

Comment the line number 297 i.e.:

 

if (is_numeric($sendto) && ($sendto > 0)) {

// $parameters['address_override'] = '1';

$parameters['first_name'] = $order->delivery['firstname'];

$parameters['last_name'] = $order->delivery['lastname'];

$parameters['address1'] = $order->delivery['street_address'];

$parameters['city'] = $order->delivery['city'];

$parameters['state'] = tep_get_zone_code($order->delivery['country']['id'], $order->delivery['zone_id'], $order->delivery['state']);

$parameters['zip'] = $order->delivery['postcode'];

$parameters['country'] = $order->delivery['country']['iso_code_2'];

} else

Share this post


Link to post
Share on other sites

I had the exact same error. The only difference I saw was that mine had an extra ( after else. Removing it gave me an error. I put it back and now I have another error: Parse error: syntax error, unexpected ';' in /home/reedso9/public_html/includes/modules/payment/paypal_standard.php on line 307 (307 is the 'no shipping' line below ") else ("

 

Can someone look at this and tell me how to fix it so that I don't get the error that barbie received and I don't get the new error?? THANKS!

 

if (is_numeric($sendto) && ($sendto > 0)) {

$parameters['address_override'] = '1';

$parameters['first_name'] = $order->delivery['firstname'];

$parameters['last_name'] = $order->delivery['lastname'];

$parameters['address1'] = $order->delivery['street_address'];

$parameters['city'] = $order->delivery['city'];

$parameters['state'] = tep_get_zone_code($order->delivery['country']['id'], $order->delivery['zone_id'], $order->delivery['state']);

$parameters['zip'] = $order->delivery['postcode'];

$parameters['country'] = $order->delivery['country']['iso_code_2'];

} else (

 

$parameters['no_shipping'] = '1';

$parameters['first_name'] = $order->billing['firstname'];

$parameters['last_name'] = $order->billing['lastname'];

$parameters['address1'] = $order->billing['street_address'];

$parameters['city'] = $order->billing['city'];

$parameters['state'] = tep_get_zone_code($order->billing['country']['id'], $order->billing['zone_id'], $order->billing['state']);

$parameters['zip'] = $order->billing['postcode'];

$parameters['country'] = $order->billing['country']['iso_code_2'];

Share this post


Link to post
Share on other sites

Nevermind. I uploaded a new paypal_standard.php file

 

I still had the same error as Barbie, by my fix was different. My php file was already correct. I had to go to oscommerce admin and then to customer details: There I had to have state set to true and everything else to false. It may be different in your situation, but this fixed it for me.

Share this post


Link to post
Share on other sites

While disabling the line of code that verifies the address is a way around, that's not how to deal with this problem unless you're okay with sending products to unverified addresses and eating revenue. I just figured out that the reason why this error occurs can be caused by two things.

 

1) In the Admin area > Customer Details > State must be set to True.

2) Use a REAL address. Paypal is verifying the address before taking payment and it will fail if the address you're testing with is incorrect.

 

This was my problem when running a test. I put in an address of 1234 Main Street, Fakeplace, GA 12345 and Paypal rejected it because it wasn't a valid address. Once I put in my real address, the error went away.

Share this post


Link to post
Share on other sites

Sorry for reviving an old thread, but I had to search a good bit to find this, and I'm updating the thread with the error message I got in OSCommerce, in hopes that the next person won't have to search around quite as much. Daddyslipdisk's solution WORKED. THANK YOU!

 

The error message I was getting was:

 

The field Shipping Address State is required

 

This was using the PayPal Express Checkout module.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×