Jump to content
Sign in to follow this  
dynamoeffects

PayPal WPP Direct Payments & Express Checkout Support

Recommended Posts

Matt,

I think that we need to define some things first, to help you understand what is going on. DIR_FS_CATALOG is used when we need to find a file on the server. DIR_WS_CATALOG is used when we build a URL. FS references don't change between HTTP and HTTPS requests, as they are always located in the same place on the server.

 

You receive the "can't find certificate" error because the API Certificate path is not correct.

 

Set API Certificate to '/home/fhlinux134/x/XXX.com/user/htdocs/catalog/includes/paypal_wpp/cert/cert_key_pem.txt'. If you saved the key under a different name, adjust accordingly.

 

You receive the "PayPal WPP installation incomplete!" because the WPP module can't find the XML files. This search depends on the value of DIR_FS_CATALOG.

 

Set DIR_FS_CATALOG in catalog/includes/configure.php to '/home/fhlinux134/x/XXX.com/user/htdocs/catalog/'.

Note that the "PayPal WPP installation incomplete!" test occurs before the code attempts to locate the certificate, so changing DIR_FS_CATALOG doesn't fix the first error; it just masks it because we never get to the other test.

 

There is a fault in the error message that displays the proper location of the XML files. Thanks for pointing this out; we'll fix it in the next release. In the mean time, here is the fix:

 

In catalog/includes/languages/english/modules/payment/paypal_wpp.php at line 39:

Change:

 define('MODULE_PAYMENT_PAYPAL_DP_MISSING_XML', 'PayPal WPP installation incomplete!  There should be XML files located in ' . DIR_FS_CATALOG . DIR_WS_INCLUDES . 'wpp_xml/ !');

 

to

 define('MODULE_PAYMENT_PAYPAL_DP_MISSING_XML', 'PayPal WPP installation incomplete!  There should be XML files located in ' . DIR_FS_CATALOG . DIR_WS_INCLUDES . 'paypal_wpp/xml/ !');

 

Have you uploaded wpp_diagnostics.php to your catalog directory? This is a useful tool for determining whether the WPP module is installed correctly.

 

To use it, open your web browser with http://www.xxx.com/catalog/wpp_diagnostics.php

 

--Glen

Share this post


Link to post
Share on other sites

Matt,

I think that we need to define some things first, to help you understand what is going on. DIR_FS_CATALOG is used when we need to find a file on the server. DIR_WS_CATALOG is used when we build a URL. FS references don't change between HTTP and HTTPS requests, as they are always located in the same place on the server.

 

You receive the "can't find certificate" error because the API Certificate path is not correct.

 

Set API Certificate to '/home/fhlinux134/x/XXX.com/user/htdocs/catalog/includes/paypal_wpp/cert/cert_key_pem.txt'. If you saved the key under a different name, adjust accordingly.

 

You receive the "PayPal WPP installation incomplete!" because the WPP module can't find the XML files. This search depends on the value of DIR_FS_CATALOG.

 

Set DIR_FS_CATALOG in catalog/includes/configure.php to '/home/fhlinux134/x/XXX.com/user/htdocs/catalog/'.

Note that the "PayPal WPP installation incomplete!" test occurs before the code attempts to locate the certificate, so changing DIR_FS_CATALOG doesn't fix the first error; it just masks it because we never get to the other test.

 

There is a fault in the error message that displays the proper location of the XML files. Thanks for pointing this out; we'll fix it in the next release. In the mean time, here is the fix:

 

In catalog/includes/languages/english/modules/payment/paypal_wpp.php at line 39:

Change:

 define('MODULE_PAYMENT_PAYPAL_DP_MISSING_XML', 'PayPal WPP installation incomplete!  There should be XML files located in ' . DIR_FS_CATALOG . DIR_WS_INCLUDES . 'wpp_xml/ !');

 

to

 define('MODULE_PAYMENT_PAYPAL_DP_MISSING_XML', 'PayPal WPP installation incomplete!  There should be XML files located in ' . DIR_FS_CATALOG . DIR_WS_INCLUDES . 'paypal_wpp/xml/ !');

 

Have you uploaded wpp_diagnostics.php to your catalog directory? This is a useful tool for determining whether the WPP module is installed correctly.

 

To use it, open your web browser with http://www.xxx.com/catalog/wpp_diagnostics.php

 

--Glen

Hi Glen

 

I have done the following and I'm getting 'Cannot find API cert' error. The path is correct but if im running the command to look for the api cert from the secure folder (which is on a different server) I'm thinking that I would need to put the full web server address into the api cert location box?

 

And which server should it be looking for the api cert on the secure server or the standard server?

 

I ran wpp_diagnostics and the following erros came up:

Does cURL work? (Simple HTTPS test) No

SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (Error No. 60)

API Certificate installed? No

API Certificate directory protected? No

 

 

This is a shared SSL server so I do not have access to the SSL certificate nor did I install it.

 

Is there a way to configure cURL to accept any server certificate as this what the problem seems to be.

 

Thanks

Edited by matthell

Share this post


Link to post
Share on other sites

Hi Glen

 

I have done the following and I'm getting 'Cannot find API cert' error. The path is correct but if im running the command to look for the api cert from the secure folder (which is on a different server) I'm thinking that I would need to put the full web server address into the api cert location box?

 

And which server should it be looking for the api cert on the secure server or the standard server?

It's not looking for a web address. It's looking for a file system path; the place where you put it using FTP. I assume that all the files go on the server in one place; you don't have duplicate copies for HTTP and HTTPS access, even though the URL that you access them from is different.

 

I ran wpp_diagnostics and the following erros came up:

Does cURL work? (Simple HTTPS test) No

SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (Error No. 60)

Make sure that "Proxy Address" in the WPP module settings is blank. To the best of my knowledge, this test should work with shared SSL.

API Certificate installed? No

API Certificate directory protected? No

You still haven't got the API certificate path correct.

 

I'm pretty much at the end of what I can do without actually looking at your server configuration. If you would like me to have a look at it, please contact me via private message here.

 

--Glen

Share this post


Link to post
Share on other sites

It's not looking for a web address. It's looking for a file system path; the place where you put it using FTP. I assume that all the files go on the server in one place; you don't have duplicate copies for HTTP and HTTPS access, even though the URL that you access them from is different.

 

 

Make sure that "Proxy Address" in the WPP module settings is blank. To the best of my knowledge, this test should work with shared SSL.

 

You still haven't got the API certificate path correct.

 

I'm pretty much at the end of what I can do without actually looking at your server configuration. If you would like me to have a look at it, please contact me via private message here.

 

--Glen

 

 

Hi Glen

 

I have figured out what the problem is. I dont think I have been making my setup clear.

 

I have 2 versions of my site which are exact copies. 1 on my main site, and an exact copy on a secured shared server.

 

A person browsing items in my site stays on the normal www.xxx.com but as soon as they want to checkout or log in they are taken to https://www.securedsite.com/xxx/

which is on a completly different shared server and is an exact copy of the normal site.

 

so when I put in the file system path for the main site it says it cant find it because by the time someone wants to pay for something they have switched onto the secured server.

 

Changing the cert file path in admin to the secured server location works and is confirmed with wpp_diagnostics.php

 

However trying to run the module with this brings up the "PayPal WPP installation incomplete!"

 

This is because it is again looking for items in the www.xxx.com file system path.

 

Changing the Set DIR_FS_CATALOG in configure.php in the secure version of the site to the secure file system path EG '/secured/catalog/etc/' sorts this out and I am able to go through the checkout normally and can put my card details in and process the payment up until the very last page where I have entered the verified by visa code. When i enter the visa code i get forced back to the chekout_shipping page and the following error is present;

"unable to use client certificate (no key found or wrong pass phrase?) (Error No. 58)"

 

Clicking on the 'Pay with Paypal' button also produces this same error.

 

I'm thinking that the module prefers everything to stay on the same server and because of my multi server setup it is confusing everything!

 

Sorry this is getting epic now lol! Thanks.

Share this post


Link to post
Share on other sites

Hi Glen

 

I have figured out what the problem is. I dont think I have been making my setup clear.

 

I have 2 versions of my site which are exact copies. 1 on my main site, and an exact copy on a secured shared server.

 

A person browsing items in my site stays on the normal www.xxx.com but as soon as they want to checkout or log in they are taken to https://www.securedsite.com/xxx/

which is on a completly different shared server and is an exact copy of the normal site.

 

so when I put in the file system path for the main site it says it cant find it because by the time someone wants to pay for something they have switched onto the secured server.

 

Changing the cert file path in admin to the secured server location works and is confirmed with wpp_diagnostics.php

 

However trying to run the module with this brings up the "PayPal WPP installation incomplete!"

 

This is because it is again looking for items in the www.xxx.com file system path.

 

Changing the Set DIR_FS_CATALOG in configure.php in the secure version of the site to the secure file system path EG '/secured/catalog/etc/' sorts this out and I am able to go through the checkout normally and can put my card details in and process the payment up until the very last page where I have entered the verified by visa code. When i enter the visa code i get forced back to the chekout_shipping page and the following error is present;

"unable to use client certificate (no key found or wrong pass phrase?) (Error No. 58)"

 

Clicking on the 'Pay with Paypal' button also produces this same error.

 

I'm thinking that the module prefers everything to stay on the same server and because of my multi server setup it is confusing everything!

 

Sorry this is getting epic now lol! Thanks.

 

I see. This is definitely not how osCommerce is designed to run, as the session information has to be able to work back and forth between SSL and non-SSL page loads. You need to have *one* server with a single copy of your shop. Shared SSL works fine as long as the shared URL points back to the same files used by the regular shop. This is why we have two variables defined to point there; HTTP_SERVER and HTTPS_SERVER. They are two ways of looking at the same site, not two copies of the site. In your case, http://www.xxx.com/catalog/index.php and https://www.securedsite.com/xxx/catalog/index.php *must* be the same file, not two identical files. My own site has a dedicated SSL certificate, so I set my server variables to the same url and just set the scheme appropriately (http or https).

 

It's not just this module; it's the way all of osCommerce runs.

 

--Glen

Share this post


Link to post
Share on other sites

Hi Glen

 

Thanks for your help ...

 

The mirrored site method is the only way to get SSL working on Fasthosts (and this is what they recommend), I am now looking at changing hosts.

 

The only way I can get it to work currently is by disabling SSL but this is obviously not the correct way to do it!

Share this post


Link to post
Share on other sites

Hi Glen

 

Thanks for your help ...

 

The mirrored site method is the only way to get SSL working on Fasthosts (and this is what they recommend), I am now looking at changing hosts.

 

The only way I can get it to work currently is by disabling SSL but this is obviously not the correct way to do it!

 

Matt,

There is apparently a way to get osC working with fasthosts. There is a post here in the forums that describes the technique. http://forums.oscommerce.com/index.php?showtopic=232372&view=findpost&p=964638 The post is old, so if you're running RC2a, you can skip step 3, as it is already installed.

 

The certificate path might be a problem, as it may need to be accessible from both HTTP and HTTPS requests, and the path is stored in the database.

 

There may be a way to code around that problem. However, the best solution may be to find a provider that has a clue. Depending on where you are in the world, there are plenty of reasonably priced hosting services that understand how to implement shared SSL without requiring duplicate installations.

 

--Glen

Edited by SteveDallas

Share this post


Link to post
Share on other sites

Hi guys,

 

I have this error while I am trying to test to make the payment using the credit card. I have a business account with paypal.

 

The error I am getting is following

 

Your credit card was declined. Please try another card or contact your bank for more info.

 

Invalid Configuration (10501)

This transaction cannot be processed due to an invalid merchant configuration.

 

can anyone please help me to overcome this issue. I can see that many people had this problem but can't find any solution to it and one of the user said you have to pay $20 a month to be able to accept credit card payments from the website. Please help!

 

Thank you

Edited by sahilsaid

Share this post


Link to post
Share on other sites

Hi guys,

 

I have this error while I am trying to test to make the payment using the credit card. I have a business account with paypal.

 

The error I am getting is following

 

Your credit card was declined. Please try another card or contact your bank for more info.

 

Invalid Configuration (10501)

This transaction cannot be processed due to an invalid merchant configuration.

 

can anyone please help me to overcome this issue. I can see that many people had this problem but can't find any solution to it and one of the user said you have to pay $20 a month to be able to accept credit card payments from the website. Please help!

 

Thank you

 

According to here: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_errorcodes

 

the problem is:

 

10501

 

Invalid Configuration

 

This transaction cannot be processed due to an invalid merchant configuration.

 

Occurs when the billing agreement is disabled or inactive.

 

 

I would guess there's something in PayPal that you need to activate.

Share this post


Link to post
Share on other sites

Hi guys,

 

I have this error while I am trying to test to make the payment using the credit card. I have a business account with paypal.

 

The error I am getting is following

 

Your credit card was declined. Please try another card or contact your bank for more info.

 

Invalid Configuration (10501)

This transaction cannot be processed due to an invalid merchant configuration.

 

can anyone please help me to overcome this issue. I can see that many people had this problem but can't find any solution to it and one of the user said you have to pay $20 a month to be able to accept credit card payments from the website. Please help!

 

Thank you

 

You need to apply for and be approved for Website Payments Pro. This feature is not available in all countries. Currently, it is available for PayPal business accounts in the US, Canada, and the UK. If you are not in one of these countries, check the PayPal home page for the country where your account is located to see if Website Payments Pro is offered. There is a monthly fee for Website Payments Pro; it is currently $30 USD for US accounts, $35 CAD for Canadian accounts, and 20 GBP for UK accounts.

 

--Glen

Share this post


Link to post
Share on other sites

This does Not work with maestro cards im am getting calls every day about this card not being accepted i am also getting this error everytime a Maestro card is used. Has anybody actually used a maestro card sucessfully in the uk?

 

-------------------------------FINAL_REQ-----------------------------

-------------------This is the response from PayPal------------------

---------------------------------------------------------------------

Array

(

[security] =>

[RequesterCredentials] => Array

(

[0] => Array

(

[Credentials] => Array

(

[0] => Array

(

[username] => XXXXXXXXXXXXXXXXXXXXXXXXXXXX

[Password] => XXXXXXXXXXXXXXXX

[subject] =>

)

 

)

 

)

 

)

 

[faultcode] => SOAP-ENV:Client

[faultstring] => Data type '' mismatch in element 'CreditCardType'

)

 

 

---------------------------------------------------------------------

---------------------------------TS_REQ------------------------------

--------Results of the transaction search if it was executed---------

---------------------------------------------------------------------

Array

(

[security] =>

[RequesterCredentials] => Array

(

[0] => Array

(

[Credentials] => Array

(

[0] => Array

(

[username] =>

[Password] =>

[subject] =>

)

 

)

 

)

 

)

 

[TransactionSearchResponse] => Array

(

[0] => Array

(

[Timestamp] => 2010-03-22T19:05:53Z

[Ack] => Success

[CorrelationID] => afe58ca8af103

[Version] => 2.0

[build] => 1214948

)

 

)

 

)

Share this post


Link to post
Share on other sites

First and foremost a very big thanks to Brian and Glen (DynamoEffects and SteveDallas) for keeping this fantastic contribution active with posts and regular bugfix updates.

 

I have two questions:

 

Can someone please explain the pros/cons of using this PayPal WPP contribution over the newly released official PayPal WPP one:

http://addons.oscommerce.com/info/7280

 

Also, can someone please explain if the either of these PayPal WPP contributions are supporting the Advanced Fraud Management Filters add-on. To add this feature costs £20 per month per 5p per transactions on top of the £20 per month WPP and 3.4%-1.4% and 20p per transaction fees but it seems like a good thing to have as an extra security measure.


Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Share this post


Link to post
Share on other sites

First and foremost a very big thanks to Brian and Glen (DynamoEffects and SteveDallas) for keeping this fantastic contribution active with posts and regular bugfix updates.

 

I have two questions:

 

Can someone please explain the pros/cons of using this PayPal WPP contribution over the newly released official PayPal WPP one:

http://addons.oscommerce.com/info/7280

 

Also, can someone please explain if the either of these PayPal WPP contributions are supporting the Advanced Fraud Management Filters add-on. To add this feature costs £20 per month per 5p per transactions on top of the £20 per month WPP and 3.4%-1.4% and 20p per transaction fees but it seems like a good thing to have as an extra security measure.

 

Does this work for Maestro Cards for you in the Uk ?

 

im getting errors from customers who say it does not work and debug emails with card mismatch errors .

Have you seen any sucessful Maestro card sales since this was introduced

Share this post


Link to post
Share on other sites

:( :(

Brian, does the 3D Secure support in this contribution work with DynamoCheckout?

 

 

i have that DynamoCheckout checkout and it does "not" work i have had to go back to using the old checkout, paid for it and got about 3 weeks use out of it before 3d secure came into play , been a nightmare trying to get support for it, the emails just keep getting ignored. :(

Share this post


Link to post
Share on other sites

This does Not work with maestro cards im am getting calls every day about this card not being accepted i am also getting this error everytime a Maestro card is used. Has anybody actually used a maestro card sucessfully in the uk?

 

 

Dave,

It appears that there may be an error in PayPal's documentation in that the card type 'Maestro' is not accepted, but 'Switch' must be used instead.

 

Here is an untested bit of code that should resolve the issue:

 

In catalog/includes/modules/payment/paypal_wpp.php, around line 1583:

 

Change:

       $order_info['PAYPAL_CC_TYPE'] = $cc_type;

To:

       if ($cc_type == 'Maestro') {
         $order_info['PAYPAL_CC_TYPE'] = 'Switch';
       } else {
         $order_info['PAYPAL_CC_TYPE'] = $cc_type;
       }

 

Please try this and let me know if it resolves your issue. If it does, I'll incorporate it into the next release.

Share this post


Link to post
Share on other sites

First and foremost a very big thanks to Brian and Glen (DynamoEffects and SteveDallas) for keeping this fantastic contribution active with posts and regular bugfix updates.

 

I have two questions:

 

Can someone please explain the pros/cons of using this PayPal WPP contribution over the newly released official PayPal WPP one:

http://addons.oscommerce.com/info/7280

 

Also, can someone please explain if the either of these PayPal WPP contributions are supporting the Advanced Fraud Management Filters add-on. To add this feature costs £20 per month per 5p per transactions on top of the £20 per month WPP and 3.4%-1.4% and 20p per transaction fees but it seems like a good thing to have as an extra security measure.

 

PayPal has a long history of creating payment modules and dumping them into the contribution archive with little to no support. There also seems to be no 'institutional memory' at PayPal, so they create a new contribution for major releases, rather than treating them as updates to prior contributions. Their old "official" release was based on an earlier version of this module, but the new one referenced is not. The new one appears to have been written by an outside contract developer.

 

PayPal's version provides support for the advanced fraud management filters and subscriptions, though I haven't installed it to see how these features work. It appears that their support for Maestro cards may be broken as well, as the usage of the strings 'Maestro' and 'Switch' seems inconsistent.

 

--Glen

Edited by SteveDallas

Share this post


Link to post
Share on other sites

For some time now 'Switch' has been rebranded as Maestro, maybe that has something to do with it?

 

 

Dave,

It appears that there may be an error in PayPal's documentation in that the card type 'Maestro' is not accepted, but 'Switch' must be used instead.

 

Here is an untested bit of code that should resolve the issue:

 

In catalog/includes/modules/payment/paypal_wpp.php, around line 1583:

 

Change:

       $order_info['PAYPAL_CC_TYPE'] = $cc_type;

To:

       if ($cc_type == 'Maestro') {
         $order_info['PAYPAL_CC_TYPE'] = 'Switch';
       } else {
         $order_info['PAYPAL_CC_TYPE'] = $cc_type;
       }

 

Please try this and let me know if it resolves your issue. If it does, I'll incorporate it into the next release.


Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Share this post


Link to post
Share on other sites

For some time now 'Switch' has been rebranded as Maestro, maybe that has something to do with it?

 

The PayPal documentation says that the card type should be Maestro, but another user reports that PayPal told him to use Switch instead and his "Card Type Mismatch" errors went away. I don't have the code that he used, but the above will leave the consumer branding as Maestro but send "Switch" to PayPal.

 

--Glen

Share this post


Link to post
Share on other sites

Glen I agree with you about PayPal contributions not being supported. I have used this one on demo mode (sandbox) for a long time and now am going live with a store and just wanted a comparator.

 

Once PayPal approve the application and the store goes live I will test out the "switch/maestro" issue on the live store and see if I can replciate the problems that have been mentioned and then update here.

 

Thank you for supporting this fantastic contribution.


Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Share this post


Link to post
Share on other sites

Hi, I have recently tried to implement the Paypal Express Checkout on my website but not sure what the correct process is.

 

The following are the steps I undertake:

 

1. Select Product

2. Add to Cart

3. Select Shopping Cart

4. I then have Checkout OR Checkout with Paypal Button

5. I click on Checkout with Paypal

6. (if sandbox is selected in settings, i get a security header is not valid error) not sure why

7. In Live, I go to Paypal Page and Login

8. Then asks me to review my info and Continue

9. (This is where i think its not going to the right page) I get redirected back to my checkout_payment.php?error_message=Please+select+a+payment+method+for+your+order.

 

with the Please select a payment method for your order.

 

Could somebody please tell me how to resolve this issue, also just to clarify, I do only have the Paypal Express Checkout and the Website Payment Standard setup on the website, so don't know if this error appears as i have no other payment method.

 

Hope that makes sense.

 

If somebody could please help, would really appreciate it. Thanks in advance.

Share this post


Link to post
Share on other sites

@aftabn10: Are you using the DynamoEffects Website Payments Pro contribution? That is the module supported in this topic.

 

It sounds as though you may be using the Express Checkout module that is supplied with osC RC2a, which I am not very familiar with. A quick search of the forums shows that this post may be on point for your problem.

 

--Glen

Share this post


Link to post
Share on other sites

SteveDallas, thanks for your reply.

 

I am using the Express Checkout module that was supplied with OsC RC2a. Will have a look at the post and try and see if this changes anything.

 

Thanks once again.

 

Btw, any ideas where i can find out the difference it makes with having the Express Checkout on the website in terms of process?

Share this post


Link to post
Share on other sites

SteveDallas, thanks for your reply.

 

I am using the Express Checkout module that was supplied with OsC RC2a. Will have a look at the post and try and see if this changes anything.

 

Thanks once again.

 

Btw, any ideas where i can find out the difference it makes with having the Express Checkout on the website in terms of process?

 

SteveDallas,

 

I didnt need to make the changes as this is how the file was already written, but I reuploaded the file and this worked! So thanks!

 

Btw, any ideas where i can find the changes i have to make to allow users to use paypal express but without the user having an account on my website?

 

thanks once again. Currently I have the RC2a version, but when clicking on Express Checkout the user has to login or create an account on my website bbefore it goes to the Paypal page.

Share this post


Link to post
Share on other sites

Glen,

 

If you are able to, please PM or email me as I'd like to ask you a question off-line. I tried to PM you but it didn't go through.

 

Thank you very much!

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  

×