Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal WPP Direct Payments & Express Checkout Support


dynamoeffects

Recommended Posts

I'm encountering a problem that was previously discussed: the "Unfortunately the country of the address you selected is not currently one that we offer service to. If you have any questions, please feel free to contact us." error when using Paypal Express.

 

I've installed the latest commit of the Paypal WPP module from github, which appears to be v1.1.2 according to paypal_wpp.php. Everything seems to be configured properly. The site has a valid SSL certificate & the IPN URL is set to https://www.mysite.com/buy/checkout_process.php.

 

I've examined the response array returned from wpp_execute_transaction around line 799 and it is only returning the customer name, no shipping address information is being returned at all, which is subsequently causing the error.

 

Any thoughts what may be causing this problem?

 

I've got the same problem, i've been using the contribution for a long time without any problem and then a customer has contacted me today saying he's having problems checking out with paypal. I dont know how long the problem has been there as this is the 1st customer to let me know.

Any help would be greatly appreciated!

 

Thanks

Scott

Link to comment
Share on other sites

I've got the same problem, i've been using the contribution for a long time without any problem and then a customer has contacted me today saying he's having problems checking out with paypal. I dont know how long the problem has been there as this is the 1st customer to let me know.

Any help would be greatly appreciated!

 

Thanks

 

Glad to hear it's not just me having this problem. ProdigyMotorsport, which version of the module are you using? Should tell you near the top of paypal_wpp.php. It just stopped working without making any changes on your site? I've been digging through this for a few weeks & am thinking the problem could be with the PayPal API as Express Checkout was recently updated. I'm continuing to dig & need a solution SOON. I'll post results once I have something.

Link to comment
Share on other sites

the last transaction i received through express checkout was 20th September, did you have the problems before or after that?

 

I received an Express Checkout transaction on Friday, 1st October. I'm fairly certain that I'm using the latest code, as I'm one of the maintainers. I do use WPP a little differently than most, as I use Authorization and Capture, rather than immediate sale, because some of my products sometimes take several days before they are ready to ship. I wouldn't think that this will cause a difference as to whether payments are accepted, though.

 

--Glen

Link to comment
Share on other sites

Hi Glen,

 

I use authorisation/capture same as you so i think we can safely rule that out.

 

Let me give some details as i've only given them on GitHub.

 

on 1st October i was emailed by a customer saying they couldn't check out using paypal (this is the day you last received a payment so i'd like to ask if you've checked to see if you can check out), i checked the process myself in IE an sure enough there was a problem. I was sent to the paypal login page, logged in fine and then clicked continue and was redirected to the store login page. I checked a CC payment and that worked fine.

 

So i checked GitHub to see if there were any changes that may fix the problem, there was an update i hadn't made this one so i made the changes and tried again.....same problem.

 

I left it a bit to see if the problem was with paypal and would resolve itself, tested it again this time in firefox and got the following error.

 

Warning: preg_match() [function.preg-match]: Unknown modifier '-' in /xxxx/xxxx/public_html/catalog/includes/modules/payment/paypal_wpp.php on line 773

 

Warning: Cannot modify header information - headers already sent by (output started at /xxxx/xxxx/public_html/catalog/includes/modules/payment/paypal_wpp.php:773) in /xxxx/xxxx/public_html/catalog/includes/functions/general.php on line 33

 

I checked in IE as well and it just redirected to login again as it had been doing, no error message shown.

 

the line thats causing the error was 1 of the changes made in the update i did so i changed it back to how it was originally

//Make sure the token is in the correct format

if (!ereg("([C-E]{2})-([A-Z0-9]{17})", $_SESSION['paypal_ec_token'])) {

$this->away_with_you(MODULE_PAYMENT_PAYPAL_DP_INVALID_RESPONSE, true);

}

 

Tested again in firefox and the error had gone away and i was left with the "Unfortunately the country of the address you selected is not currently one that we offer service to " message, checked in IE and redirected to login, no error messages.

 

I checked the last modified date of all files on the live site, the only files modified after 20th September (the last date i received an express payment) were

catalog/includes/modules/payment/paypal_wpp.php

catalog/includes/paypal_wpp/xml/setExpressCheckout.xml

 

these are the 2 files that i updated as detailed above in an attempt to fix the issue.

 

As the changes made to these files are related to the address, my next stage is to revert back to the originals (always backup :) ) and test in firefox as thats something i never did.

Scott

Link to comment
Share on other sites

ok i'm back to my original files now, gotkube i think your issue is with the 2010-07-09 update if you're using it, revert to previous code and i think your problem may go away.

 

I tested the express checkout process with my backup files, in firefox everything works great, i was able to check out perfectly without any issues at all.

I then tested in IE and surprise suprise i got directed back to login page. I'm using IE 8, i'd really appreciate it if other WPP users could check their express checkout using IE 8 and see if you're able to checkout.

 

Thanks

 

EDIT: Scrap that i've found the problem, compatibility view was on in the browser for whatever reason, i tried turning it off and was able to checkout, turned it back on and tried again and was redirected to login so this is the problem.

Obviously the problem with the latest code added to GitHub still remains though.

Edited by ProdigyMotorsport

Scott

Link to comment
Share on other sites

PayPal Express Payments issues:

 

I have had a store running since March and PayPal Express never worked for downloadble files. It works fine for shippable products. I updated to version 1.1.2, but still have the same problems everyone else is having. The problem appears to be an IPN related issue. It comes back from PayPal to my site saying that the payment selection is not available to the country I reside in, the USA. Another issue is the use of coupon codes doesn't seem to work when using PayPal Express. I am missing lots of MP3 orders since people seem to trust PayPal more than me. ;)

 

Does anyone know of a solution to this yet???? I have been quite patiently waiting. The once great support for this add-on seems to have disappeared.

Link to comment
Share on other sites

  • 2 weeks later...

Paypal "Checkout with paypal" vs."Review your information" screens

 

I have upgraded my osCommerce site from a much earlier version of WPP to the latest version.

 

Credic card transactions work correctly. However, in my previous release when users chose to pay through they Paypal account ("checkout with paypal") they were taken to the paypal "Review your payment" screen which showed the amount that they were confirming to pay. In the upgraded release they are now presented with the paypal "Review your information" screen. The issue here is that my customers cannot see the actual amount that they are about to pay from this screen, which I am concerned is confusing for my customers.

 

Any advice anyone can provide on how to direct the payment to the "Review your payment" screen would be much appreciated.

Link to comment
Share on other sites

ok i'm back to my original files now, gotkube i think your issue is with the 2010-07-09 update if you're using it, revert to previous code and i think your problem may go away.

 

Doesn't seem like. Reverted to the 2010-05-28 commit (6b3594e39e917610a968) and still encountered the same problem. I'm getting the impression the problem is related to Paypal's recent Express Checkout updates that broke something in the module. Tracing through the transactions, it looks like the address info is sent to Paypal, but Paypal doesn't send it back, which means the Country shipping error is triggered because a field it is looking for is empty.

Link to comment
Share on other sites

Peter,

I believe that this is fixed in the latest build on Github, but the correct fix is to move the pass by reference indication to the function definition. The Cardinal Centinel features are useful to UK shopowners who accept Maestro cards.

 

--Glen

 

For anyone wanting to see the code changes (line numbers will be different):

 

1697c1697
<         $this->cardinal_centinel_before_process(&$order_info);
---
>         $this->cardinal_centinel_before_process($order_info);
2266c2266
<     function cardinal_centinel_before_process($order_info = '') {
---
>     function &cardinal_centinel_before_process($order_info = '') {
2301c2301
<           $this->cardinal_centinel_lookup($auth_info, &$order_info);
---
>           $this->cardinal_centinel_lookup($auth_info, $order_info);
2303c2303
<           $this->cardinal_centinel_authenticate($auth_info, &$order_info);
---
>           $this->cardinal_centinel_authenticate($auth_info, $order_info);
2308c2308
<     function cardinal_centinel_lookup($auth_info, $order_info) {
---
>     function &cardinal_centinel_lookup($auth_info, $order_info) {
2383c2383
<     function cardinal_centinel_authenticate($auth_info) {
---
>     function &cardinal_centinel_authenticate($auth_info) {

Link to comment
Share on other sites

Since last Monday 18th October all my US transactions are being declined with the error code of "[ErrorCode] => 10505" and then this relates to the AVS Code returning the following "[AVSCode] => C" - according to the Paypal AVS Error Codes document it is saying that it is being returned as "International 'N'" and therefore it is being declined and I just dont understand why.

 

Before this time we were making US transactions no problem and now they are ALL declined with this same error - any ideas? Please note when I speak to the customers whose cards are declined they have spoken to their bank and they have all been authorised by their bank and I have had over 20 different customers this week all with the exact same problem. All other countries dont seem to have a problem its just my US customers.

 

If anyone can help it would be greatly appreciated as I am at a loss now.

 

Chris

Founder & Director at CSC Tours Ltd

Link to comment
Share on other sites

Since last Monday 18th October all my US transactions are being declined with the error code of "[ErrorCode] => 10505" and then this relates to the AVS Code returning the following "[AVSCode] => C" - according to the Paypal AVS Error Codes document it is saying that it is being returned as "International 'N'" and therefore it is being declined and I just dont understand why.

 

Before this time we were making US transactions no problem and now they are ALL declined with this same error - any ideas? Please note when I speak to the customers whose cards are declined they have spoken to their bank and they have all been authorised by their bank and I have had over 20 different customers this week all with the exact same problem. All other countries dont seem to have a problem its just my US customers.

 

If anyone can help it would be greatly appreciated as I am at a loss now.

 

Chris

Chris,

This happened for US accounts (non-US transactions were being rejected) a few years ago when PayPal implemented Risk Controls, which changed the default behaviour of their risk management system. The Risk Controls feature, which usually carries a monthly fee, enables the account holder to manage certain aspects of the PayPal risk management filters.

 

I was able to get them to enable Risk Controls on my account when I complained loudly enough. It may be a limited version, rather than the version that they charge for. Check your PayPal profile to see whether Risk Controls is available to you, then check the settings for AVS under "Risk Controls - Direct Payment and Virtual Terminal payments". There are three filters for AVS; "no match", "partial match", and "service unavailable/unsupported". I have them all set to "accept" and review each transaction before shipping. "Accept and report" is also available, which generates a flag and an email notification. My guess is that one of your filters is set to "decline".

 

--Glen

Link to comment
Share on other sites

I was able to get them to enable Risk Controls on my account when I complained loudly enough. It may be a limited version, rather than the version that they charge for. Check your PayPal profile to see whether Risk Controls is available to you, then check the settings for AVS under "Risk Controls - Direct Payment and Virtual Terminal payments". There are three filters for AVS; "no match", "partial match", and "service unavailable/unsupported". I have them all set to "accept" and review each transaction before shipping. "Accept and report" is also available, which generates a flag and an email notification. My guess is that one of your filters is set to "decline".

 

Thanks Glen! This is is exactly the info that I am looking for but I dont seem to have AVS Settings under my profile. Can you advise where I go to find this and if I dont have it how I can get it. At the moment I am looking under "Profile" and the only option I have is "Payment receiving preferences" under "Security and risk settings" but I cant find AVS there, the only Risk Controls I can find are "Country Monitor" and "Maximum Ammount".

 

Thanks again. Chris

Founder & Director at CSC Tours Ltd

Link to comment
Share on other sites

Thanks Glen! This is is exactly the info that I am looking for but I dont seem to have AVS Settings under my profile. Can you advise where I go to find this and if I dont have it how I can get it. At the moment I am looking under "Profile" and the only option I have is "Payment receiving preferences" under "Security and risk settings" but I cant find AVS there, the only Risk Controls I can find are "Country Monitor" and "Maximum Ammount".

 

Thanks again. Chris

 

At the top of my Profile page, I have a blue box labeled Services. In it, appear three entries related to my WPP subscription, "Website Payments Pro", "Virtual Terminal", and "PayPal Express Checkout". Below that, appears an entry labeled "Risk Controls". Inside "Risk Controls", I have "Risk Controls - All Payments", with "Country Monitor" and "Maximum Amount" (which you have), and a second area entitled "Risk Controls - Direct Payment or Virtual Terminal Payments". You don't have this.

 

You must contact PayPal tech support to get them to enable it for you. Note that PayPal features vary from country to country and the best approach may be to tell them that you started receiving the 10505 errors on orders from US customers and complain that they changed something that is negatively impacting your business. Tell them that you believe that they changed the default risk control behaviour and that you need the tools to restore the previous settings. They should be able to enable the appropriate Risk Controls options to allow you to control AVS handling.

 

--Glen

Link to comment
Share on other sites

Okay, so Paypal arent being very helpful. I need to provide them with the XML Request and Response back from Paypal - any ideas where I can find this? I have tried to find it - but either I am looking in the wrong place or its not there.

 

If anyone can point me in the right direction it would be much appreciated. I ha a load more declines last night with the same error and I am losing a lot of business and in the current climate I cannot afford it.

 

Regards,

Chris

Founder & Director at CSC Tours Ltd

Link to comment
Share on other sites

Okay, so Paypal arent being very helpful. I need to provide them with the XML Request and Response back from Paypal - any ideas where I can find this? I have tried to find it - but either I am looking in the wrong place or its not there.

 

If anyone can point me in the right direction it would be much appreciated. I ha a load more declines last night with the same error and I am losing a lot of business and in the current climate I cannot afford it.

 

Regards,

Chris

 

Enable "Debug Mode" in the module control panel. You will receive the XML request and response (with password and card information redacted) in an email to the "Store Owner's Email" address for each failed transaction.

 

--Glen

Link to comment
Share on other sites

I've got the same problem, i've been using the contribution for a long time without any problem and then a customer has contacted me today saying he's having problems checking out with paypal. I dont know how long the problem has been there as this is the 1st customer to let me know.

Any help would be greatly appreciated!

 

Thanks

 

 

The following fixed "PayPal returned invalid or incomplete data to complete your order. Please try again or select an alternate payment method."

<       if (!preg_match("([C-E]{2})-([A-Z0-9]{17})", $_SESSION['paypal_ec_token'])) {
---
>       if (!preg_match("/([C-E]{2})-([A-Z0-9]{17})/", $_SESSION['paypal_ec_token'])) {

 

The following fixed "Unfortunately the country of the address you selected is not currently one that we offer service to. If you have any questions, please feel free to contact us." $billing_address is being set to FALSE if no billing address is returned, so the statement will always be true.

<         if (isset($billing_address)) {
---
>         if (is_array($billing_address) &! empty($billing_address)) {

Link to comment
Share on other sites

  • 2 weeks later...

I'm trying to install this but I'm having a strange error.

 

When I click on the pay with paypal button from the shopping cart it goes to paypal and has me login. Then it goes to the review your information page on paypal. Then when I click continue it shoots me back to our site to the shipping page.

 

What is causing this? Surely this is not correct?

Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Link to comment
Share on other sites

The following fixed "PayPal returned invalid or incomplete data to complete your order. Please try again or select an alternate payment method."

<       if (!preg_match("([C-E]{2})-([A-Z0-9]{17})", $_SESSION['paypal_ec_token'])) {
---
>       if (!preg_match("/([C-E]{2})-([A-Z0-9]{17})/", $_SESSION['paypal_ec_token'])) {

 

The following fixed "Unfortunately the country of the address you selected is not currently one that we offer service to. If you have any questions, please feel free to contact us." $billing_address is being set to FALSE if no billing address is returned, so the statement will always be true.

<         if (isset($billing_address)) {
---
>         if (is_array($billing_address) &! empty($billing_address)) {

 

 

I made the preg_match change a few months ago and it worked. The Address error, however, doesn't resolve itself on my site by making this change. Still getting the same shipping error. Lack of a working solution is becoming VERY frustrating.

I've dumped the data going to and from the Paypal servers in the SOAP transaction, and despite that we sent the correct address in ec_step1, Paypal sends nothing back for shipping or billing info EXCEPT that the 'AddressOwner' field is set to "PayPal", which seems odd to me, but perhaps this is normal? The payer_status comes back 'verified', but the shipping & billing info are blank.

As a result of paypal_ec_payer_info.ship_country & .bill_country being empty, the subsequent SQL where condition fails, resulting in the shipping address error.

I thought the suggested changes above would resolve the problem, but apparently it didn't. Something's still missing.

Thoughts?

Link to comment
Share on other sites

Hacked at ec_step2() a little this evening. Added a condition where if address data isn't returned from Paypal, to create an order object & retrieve the required iso_code_2 value from $order->customer['country']['iso_code_2'] to "force" it through. It worked, but now I'm left with a screen telling me I'm "currently checkout out with PayPal Express Checkout" (which is what I want) but forces me to select another checkout method. Why??

Link to comment
Share on other sites

  • 2 weeks later...

Uninstalled. Wasted enough time debugging the module myself & waiting endlessly for the developer to assist with a solution. PayPal Website Payments Pro & PayPal Express Checkout modules worked fine the 1st time.

 

(edit: seems I have 2 accts on this board & posted from the wrong one. oops

- gotkube)

Edited by skubik
Link to comment
Share on other sites

I need some advice and help....

 

I was using a payflow pro module until I needed to become PCI compliant. I went the easy route 3 months ago and changed to Payflow link and had the module working (including the silent post so if the person didn't click the final link the order still would get recorded). But in the last two months the silent post option quit working......

 

So I am again looking back at other modules.

 

So what I am looking for is information.... A while back I was using payflow pro. Then changed to link so credit card info wouldn't be collected on my site but paypals.... Is this contrib able to be used for payflow link or pro, or is it just for the normal paypal processing?

 

I am sorry if I am asking questions that may have been answered but I have just spent 7 days working on the payflow link contrib trying to figure out why it quite working and I am brain dead and now looking for other solutions.

 

Mike

Edited by cheapo
Link to comment
Share on other sites

  • 2 months later...

I'm going a little crazy here. My primary OSC server died so I am trying to get a backup site running on another box. All is well except for the WPP module - it gets a blank screen and generates an error:

 

curl_exec error 52 GnuTLS recv error (-9): A TLS packet with unexpected length was received.

 

This error appears in a file in the /tmp directory on the server. I actually get four when testing the site during checkout:

 

Feb 09 01:41:05 my_paypal_username [info] DoDirectPayment, Elapsed: 389ms

Feb 09 01:41:05 my_paypal_username [error] curl_exec error 52 GnuTLS recv error (-9): A TLS packet with unexpected length was received.

Feb 09 01:41:06 my_paypal_usernam [info] TransactionSearch, Elapsed: 300ms

Feb 09 01:41:06 my_paypal_usernam [error] curl_exec error 52 GnuTLS recv error (-9): A TLS packet with unexpected length was received.

 

I checked my certificate and other PP credentials. Curl is installed. The PEAR modules are installed. No suhosin patch is loading. No error logs are generated by Apache.

 

Thank you in advance for any advice!

 

Dennis McEntire

Link to comment
Share on other sites

Solved it -- If anyone else comes across this problem just adding one line fixes it.

 

Edit /catalog/includes/modules/payment/paypal_wpp.php

 

Around line 330:

 

$caller->setOpt('curl', CURLOPT_SSL_VERIFYPEER, 0);

$caller->setOpt('curl', CURLOPT_TIMEOUT, 180);

$caller->setOpt('curl', CURLOPT_SSL_VERIFYHOST, 0);

 

// Dennis McEntire Feb 2011 - Fixes curl_exec error 52 problem

$caller->setOpt('curl', CURLOPT_SSLVERSION, 3);

 

Just adding that last line solves the problem.

 

Hope this helps someone else.

 

Dennis McEntire

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...