Jump to content
Sign in to follow this  
dynamoeffects

PayPal WPP Direct Payments & Express Checkout Support

Recommended Posts

http://github.com/DynamoEffects/paypal-pro-for-oscommerce/commit/55b0100d73ee5fa19c84fc8b1040e4c61aa8d057

 

Hi,

 

Sorry if this has been answered before, but is the code in this github update OK to install? I'm hoping to get my site ready

for PHP 5.3 in case my host requires it, but I'm not of the status of this update since the comment says that it's not

complete.

 

Thanks

 

I've installed the commit even more recent than the one you linked to and it's worked well, 'cept I'm encountering a problem with Paypal Express Checkout payments (see posting before yours). I've been actively combing through the code to ensure the module itself is working; assuming the problem is with my configuration and not the module itself.

Share this post


Link to post
Share on other sites

Hey Guys, I have had this module installed for many months with great success. No all the sudden the checkout system does not work. When a customer attempts to complete the checkout via paypal express or the cart itself, when they go to submit the information it immediately redirects them to the cart contents never finishing payment.

 

I have talked with paypal and they show no records of the api credentials ever being sent. So its something with my site, but nothings been changed so I'm stumped.

 

Any ideas?

Share this post


Link to post
Share on other sites

Utterly lost with this module. Paypal Express Checkout simply refuses to work. Finally hacked my way around enough to 'resolve' 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 (by forcing $payer_info['PayerCountry'] into both ship_country & bill_country if they do not exist, which they never do).

So supposedly the transaction goes through, but all I'm left with is a screen that reads "You're currently checking out with PayPal Express Checkout! Click Here to choose another payment method." Nothing more, nothing is debited from my Paypal account, the item is still in the shopping cart, literally /nothing/ is happening when using Paypal Express Checkout with this module.

 

Either something is really broken, or I'm totally missing something here.

Thoughts? Anyone?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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.

Share this post


Link to post
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) {

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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)) {

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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?

Share this post


Link to post
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??

Share this post


Link to post
Share on other sites

when i try and purchase using paypal express from checkout or cart i get this error couldn't connect to host (Error No. 7)

someone please help

Share this post


Link to post
Share on other sites

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

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  

×