Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal WPP Direct Payments & Express Checkout Support


dynamoeffects

Recommended Posts

Ok. i changed the timeout in http.php to 60 and that fixed it.

 

Thanks for the help dyna & bfcase, you guys are a big help!

 

Well this didn't work for me. I have the same problem with card transactions going through on PayPal but an error coming back to my site. I increased the timeout to 300 and still a problem. Also set Verified Accounts and Confirmed address to 'no'. The transaction is not timing out as it comes back within the 300 seconds.

 

I am using the latest version of the module and did a 'clean' install.

 

Any more ideas?

Link to comment
Share on other sites

Well this didn't work for me. I have the same problem with card transactions going through on PayPal but an error coming back to my site. I increased the timeout to 300 and still a problem. Also set Verified Accounts and Confirmed address to 'no'. The transaction is not timing out as it comes back within the 300 seconds.

 

I am using the latest version of the module and did a 'clean' install.

 

Any more ideas?

 

Sorry, just fixed - I closed down IE and then restarted and it works.

Link to comment
Share on other sites

 

 

Brian

 

Thank you for this. Subsequent to my last post IU have spent the time "sniffiing" round the web and I think I am a little wiser (dangerous?)

 

Paypal have issued me with an API certificate which I presume can be used for the "sandbox" and I understand they communicate further by email if you are ok to use on a live site

 

Question do I still need to generate my own certificate or is it the case that Paypal have issued me with a "public key" and they also have generated a secure private key as well for use at their end?

 

Thank you

 

Nossum

Link to comment
Share on other sites

Paypal have issued me with an API certificate which I presume can be used for the "sandbox" and I understand they communicate further by email if you are ok to use on a live site

 

Question do I still need to generate my own certificate or is it the case that Paypal have issued me with a "public key" and they also have generated a secure private key as well for use at their end?

 

Sorry but having done further investigation, to avoid confusion for those that might read this

 

Paypal will issue an authorisation which on opening appears to be a certificate and public key for both the live site (subject one presumes to an approval process) and when you apply to the Developer Central area an authorisation for the "sandbox" test area

 

I note that Paypal makes pointed reference to the code pointing to the right area. Presume this will need to be modded in the contribution code?

 

Am I correct Brian that subject to the other requirements that is everything that is required? (o and correctly installing the code!)

 

Cheers

 

Nossum

Link to comment
Share on other sites

The API certificate is just for connecting to their servers. It's like a key so they know you are who you say you are. You need an SSL certificate in order to accept responses from Paypal over https.

 

I'm not understanding what you think needs to be modded. Have you installed the contribution yet?

Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Link to comment
Share on other sites

All I can say is WOW.

 

I have been trying to decide on what payment modules to install to my new site and this is definately going to be it! I downloaded the WPP contrib by pbreit and was about to begin modding. Then I looked at his support thread (:'( thank God!). It appears that he supported his contrib for 2 weeks then disappeared.

 

I am not speaking poorly of him - a contribution is just that. I am only trying to make the point that your dedication to this community is extraordinary. I wanted to see how stable this contrib was going to be for me so I read the first 12 pages :blink: of this support thread before deciding to hit the last page button...

 

It really looks like this one is getting ironed out well. I guess I would just like to ask - as of today, what is the status of this contrib? Are there any technical bugs you are still hunting? Any cosmetic issues you plan on working on for the next release? Assuming I get it all coded correctly, are there any issues I can expect to be dealing with? What does your TODO list look like?

 

The reason I ask is I have a heavily customized store and I really only want to add a WPP contrib once. I could handle a patch here and there, I just don't want to start over for future versions and I cannot overwrite any of my files.

 

If it is only minor nitpicking that needs yet to be done, I will go ahead and install ASAP. I know I cannot thank you enough for all you have done. Talk is cheap - we should all send you a beer! :thumbsup:

Link to comment
Share on other sites

The API certificate is just for connecting to their servers. It's like a key so they know you are who you say you are. You need an SSL certificate in order to accept responses from Paypal over https.

 

I'm not understanding what you think needs to be modded. Have you installed the contribution yet?

 

Hi Brian

 

I have installed this evening.

 

Before I go any further, having looked at a large chunk of the code - "RESPECT"! This contribution required a very large amount of knowledge & knowhow

 

As far as I can tell at this time everything installed ok. Administration seems ok - assume my answers to path, API name are correct (Example does API usename = something like API Account name eg "bert_api1.berty.plus.net"). Plusnet sandbox has allocated API cert & name. PHP reports SSI enabled

 

On doing first test, red error message "an error occurred when we tried to contact paypal servers". Assume this to be reference the need to have my own certificate and/or incorrect use of SSL. Will check further and report back

 

Thank you

 

Nossum

Link to comment
Share on other sites

All I can say is WOW.

 

I have been trying to decide on what payment modules to install to my new site and this is definately going to be it! I downloaded the WPP contrib by pbreit and was about to begin modding. Then I looked at his support thread (:'( thank God!). It appears that he supported his contrib for 2 weeks then disappeared.

 

I am not speaking poorly of him - a contribution is just that. I am only trying to make the point that your dedication to this community is extraordinary. I wanted to see how stable this contrib was going to be for me so I read the first 12 pages :blink: of this support thread before deciding to hit the last page button...

 

It really looks like this one is getting ironed out well. I guess I would just like to ask - as of today, what is the status of this contrib? Are there any technical bugs you are still hunting? Any cosmetic issues you plan on working on for the next release? Assuming I get it all coded correctly, are there any issues I can expect to be dealing with? What does your TODO list look like?

 

I can't speak for Brian, but as a user, I can say that this contrib has been quite usable since 0.1. I was one of the early adopters of it.

 

By reading only the first 12 pages and the last, you missed this post from Brian, in which he announces his plan for 0.6.

http://www.oscommerce.com/forums/index.php?s=&...ndpost&p=781246

 

I have tweaked my installation a little bit, most notably by blanking out the state field when sending non-US addresses to PayPal. That fixes many of the problems with getting foreign cards authorized.

Link to comment
Share on other sites

Hi Brian and Team

I recently ( couple of days ago) installed this contrib.

 

I am perplexed why I keep getting this error with every card I use :

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

 

()

 

As you can see the, area between the parenthesis (that should hold the error code) is empty. I do not understand why.

 

I have tried both the live and sandbox modes. I get the same error, regardless. Also, I modified the $timeout to be 60, 120 and even 300. That did not change anything, except that I had to wait longer before the error msg popped up.

 

I have verified everything, API username, password, location of cert file. I did use the correct cert file for both live and sandbox modes.

 

I called Paypal today and tried to do a live transaction. They told me they do not even see my account being pinged. At which point, I checked to see if the code is correctly sending the API username and pwd etc. I verified that the database has the correct information for those fields as well.

 

I was hoping to get the email that contained the error details, but that did not happen either (even though I changed the enableDebugging to 1. Out of desperation, I inserted the var_dump($final_req) inside the error string.

 

Here are the first few lines of the output I get :

object(soap_fault)(8) { ["error_message_prefix"]=> string(0) "" ["mode"]=> int(1) ["level"]=> int(1024) ["code"]=> string(4) "HTTP" ["message"]=> string(39) "curl_exec error 28 connect() timed out!" ["userinfo"]=> string(0) "" ["backtrace"]=> array(10) { [0]=> array(6) { ["file"]=> string(75) "/home/content/v/r/t/vrtack/html/catalog/pear/Services/PayPal/SOAP/Fault.php" ["line"]=> int(48) ["function"]=> string(10) "pear_error" ["class"]=> string(10) "pear_error" ["type"]=> string(2) "::" ["args"]=> array(5) { [0]=> string(39) "curl_exec error 28 connect() timed out!" [1]=> string(4) "HTTP" [2]=> NULL [3]=> NULL [4]=> string(0) "" } } [1]=> array(6) { ["file"]=> string(74) "/home/content/v/r/t/vrtack/html/catalog/pear/Services/PayPal/SOAP/Base.php" ["line"]=> int(208) ["function"]=> string(10) "soap_fault" ["class"]=> string(10) "soap_fault" ["type"]=> string(2) "->" ["args"]=> array(6) { [0]=> string(39) "curl_exec error 28 connect() timed out!" [1]=> string(4) "HTTP" [2]=> string(0) "" [3]=> string(0) "" [4]=> NULL [5]=> NULL } } [2]=> array(6) { ["file"]=> string(84) "/home/content/v/r/t/vrtack/html/catalog/pear/Services/PayPal/SOAP/Transport/HTTP.php" ["line"]=> int(605) ["function"]=> string(15) "_raisesoapfault" ["class"]=> string(19) "soap_transport_http" ["type"]=> string(2) "->" ["args"]=> array(1) { [0]=> string(39) "curl_exec error 28 connect() timed out!" } } [3]=> array(6) { ["file"]=> string(84) "/home/content/v/r/t/vrtack/html/catalog/pear/Services/PayPal/SOAP/Transport/HTTP.php" ["line"]=> int(154) ["function"]=> string(10) "_sendhttps" ["class"]=> string(19) "soap_transport_http" ["type"]=> string(2) "->" ["args"]=> array(2)

 

 

I noticed the curl_exec error 28 connect() timed out! in the big chunk of text above. Does anyone know what that means???

 

 

If you can suggest anything, that will be much appreciated. I do not know what else to do. The credit card number, expiration, billing address all look correct in the var_dump() output.

 

I hope someone has some tips or pointers. I have been fighting with this for over 2 days straight now.

 

Thanks,

Amit

Link to comment
Share on other sites

Hi, firstly, this contribution is amazing. I am very impressed by the coding and the level of support/enthusiasm. I've installed on my store and have two questions. I appreciate any help:

 

1) In express checkout, when a customer selects his address and gets routed back to my store from PayPal for the first time, everything is fine with his address. Then, if he tries to change his address, he gets routed to PayPal but his changes are not reflected on the checkout_shipping.php or checkout_confirmation.php pages when he returns to my store. I have seen posts that relate to this but was unable to find an answer. Is there a way that the newest address a customer selects from PayPal can be the one that shows up on those two pages?

 

2) In direct checkout, if a customer puts in a billing address that isn't actually the billing address on his credit card account, the transaction is still processed, he is billed, and my site goes to checkout_success.php. Is this how it's supposed to work? I thought that a customer would be rejected if his billing address in osCommerce did not process properly with PayPal. Just wondering if I should be worried about this.

 

Thanks for any help!

Amit

Link to comment
Share on other sites

I noticed the curl_exec error 28 connect() timed out! in the big chunk of text above. Does anyone know what that means???

 

Yes, it means that you're server can't connect to Paypal. Some hosts require that curl transactions go through their proxy, so ask you host if that's a requirement. Looking at the file paths in your output, it looks like you're using godaddy who has such requirements. Search this thread for a block of code to put into the paypal_init() function that will make the module "proxy aware."

Edited by dynamoeffects

Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Link to comment
Share on other sites

1) In express checkout, when a customer selects his address and gets routed back to my store from PayPal for the first time, everything is fine with his address. Then, if he tries to change his address, he gets routed to PayPal but his changes are not reflected on the checkout_shipping.php or checkout_confirmation.php pages when he returns to my store. I have seen posts that relate to this but was unable to find an answer. Is there a way that the newest address a customer selects from PayPal can be the one that shows up on those two pages?

I'll take a look at the address bug.

 

Like I mentioned earlier, I'll try to make it an option for 0.6. It might be a bad idea, though. What if the address in paypal is an old address or they've opened an account on your store for their business, but pay with their personal paypal account, they might not want it shipped to their house. It'll need to allow the customer to choose whether they want to use the address from paypal or a new one, which makes it more complex.

 

2) In direct checkout, if a customer puts in a billing address that isn't actually the billing address on his credit card account, the transaction is still processed, he is billed, and my site goes to checkout_success.php. Is this how it's supposed to work? I thought that a customer would be rejected if his billing address in osCommerce did not process properly with PayPal. Just wondering if I should be worried about this.

 

Is the zip code still correct or completely different? In the sandbox, it'll take just about anything you enter. Live transactions should be a little more selective, but it's up to Paypal whether they accept a card or not.

Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Link to comment
Share on other sites

On doing first test, red error message "an error occurred when we tried to contact paypal servers". Assume this to be reference the need to have my own certificate and/or incorrect use of SSL. Will check further and report back

 

 

This is proving to be a difficult jasper.....

 

Brian

 

I have researched the certificate/public key item and I have managed to generate a private key and self certificate/public key using the follwing code

 

@echo off

set OPENSSL_CONF=./bin/openssl.cnf

 

 

bin\openssl genrsa -out privkey.pem 2048

bin\openssl req -new -x509 -nodes -subj /C=UK/ST=UKcounty/L=UKtown/CN=www.localhost.com -key privkey.pem -out cacert.pem -days 1095

 

set OPENSSL_CONF=

 

move /y privkey.pem .\conf\ssl.key

move /y cacert.pem .\conf\ssl.crt

 

echo.

echo -----

echo The private key has been created

echo The certificate and public key has been created!

echo.

pause

 

 

I have altered the ssl.conf file to recognise those files

 

I have stopped and started the apache

 

Unfortunatley I still get this error

 

Error An error occured when we tried to contact PayPal's servers.

 

In all other respects the contribution and OSC seems to be perfectley happy (eg the contribution paypal button comes up. In administration it seems ok)

 

Just to recap this is a development site on a local machine running on windows XP (not pro) with the xammp combination of apache etc connected to the web on broadband

 

I would be very very grateful for any guidance on how I might start to resolve this

 

Regards

 

Nossum

Link to comment
Share on other sites

An SSL certificate would have nothing to do with connecting to PayPal. Either your pear modules are not installed or the path is wrong, your timeout in HTTP.php is set too low, or curl is not installed.

Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Link to comment
Share on other sites

Yes, it means that you're server can't connect to Paypal. Some hosts require that curl transactions go through their proxy, so ask you host if that's a requirement. Looking at the file paths in your output, it looks like you're using godaddy who has such requirements. Search this thread for a block of code to put into the paypal_init() function that will make the module "proxy aware."

 

Brian

You are 100% correct. After I posted this last night, I searched on google for this error and amazingly enough, found the answer here in this thread, on page 12. Once I fixed the proxy settings, everything worked fine. I was able to complete a live transaction.

 

Kudos for this excellent contrib. Great work. And to top it off, you have established a great thread that contains all the answers.

 

Thanks again for a job well done.

 

Amit

Link to comment
Share on other sites

I'll take a look at the address bug.

 

Thanks! I agree with your point, but I think it might be confusing that the customer can select "change address" and then "ship to" address in PayPal and that address not show up as the shipping address on my site.

 

Like I mentioned earlier, I'll try to make it an option for 0.6. It might be a bad idea, though. What if the address in paypal is an old address or they've opened an account on your store for their business, but pay with their personal paypal account, they might not want it shipped to their house. It'll need to allow the customer to choose whether they want to use the address from paypal or a new one, which makes it more complex.

Is the zip code still correct or completely different? In the sandbox, it'll take just about anything you enter. Live transactions should be a little more selective, but it's up to Paypal whether they accept a card or not.

 

Actually, I'm in live mode and PayPal just accepted a transaction with a zip code that isn't even in the state I sent it. That is a little disturbing, but I suppose I have to deal with PayPal's discretion?

Link to comment
Share on other sites

I'll take a look at the address bug.

 

Like I mentioned earlier, I'll try to make it an option for 0.6. It might be a bad idea, though. What if the address in paypal is an old address or they've opened an account on your store for their business, but pay with their personal paypal account, they might not want it shipped to their house. It'll need to allow the customer to choose whether they want to use the address from paypal or a new one, which makes it more complex.

:)

 

My two cents has been put down on this one already, but I figured I'd jump in anyway (what's a discussion forum for, right?). If they check out with PayPal, there is an "add address" option (I imagine this is only visible when you check "no" for the confirmed address option) in the event the address they want to ship to isn't configured in their account. It's up to the customer to choose where to ship their order to, and if they provide the wrong information then that's too bad for them.

 

As far as complexity, I don't know, I'm not sure what has to happen in order for the address sent from PayPal to actually be successfully imported into osC, but as it is right now it's pretty close, just a little buggy.

 

Cheers

Stew

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Link to comment
Share on other sites

I'll take a look at the address bug.

 

I decided to make an attempt at getting the PayPal Ship To address carried through as the default shipping address. I changed the section where if the customer is in Express Checkout, and he already has an account, he is just sent back to the store, by basically just updating his address book:

 

		if (tep_session_is_registered('customer_first_name') && tep_session_is_registered('customer_id')) {
	  //They're logged in, so forward them straight to checkout_shipping.php -- AChat987 -- Actually, add a new address and set it as default
	  $order->customer['id'] = $customer_id;

	  //Add current PayPal address
		$sql_data_array = array('customers_id' => $customer_id,
								'entry_firstname' => $paypal_ec_payer_info['payer_firstname'],
								'entry_lastname' => $paypal_ec_payer_info['payer_lastname'],
								'entry_street_address' => $paypal_ec_payer_info['ship_street_1'],
								'entry_suburb' => $paypal_ec_payer_info['ship_street_2'],
								'entry_city' => $paypal_ec_payer_info['ship_city'],
								'entry_zone_id' => $state_id,
								'entry_postcode' => $paypal_ec_payer_info['ship_postal_code'],
								'entry_country_id' => $country_id);

		tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array);

		$address_id = tep_db_insert_id();
	   //Set as default
		tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int)$address_id . "' where customers_id = '" . (int)$customer_id . "'");


	  if (!tep_session_is_registered('sendto')) tep_session_register('sendto'); 
	  $_SESSION['sendto'] = $address_id;
	  $_SESSION['paypal_ec_temp'] = false;
	  $this->user_login($paypal_ec_payer_info['payer_email']);
	  //$this->away_with_you();

	} else {
	  //They're not logged in.  Create an account if necessary, and then log them in.
	  //First, see if they're an existing customer

 

This works for the address shown on the checkout_shipping.php page. But then on the checkout_confirmation.php page, the delivery address is once again the first address added by the customer. Does this have to do with the:

 

//For some reason, $order->billing gets erased between here and checkout_confirmation.php

 

Thanks for any help!

Amit

Link to comment
Share on other sites

I'm just about done with v0.6.

-Debug code's fixed. It now dumps a big formatted blob of info.

-A transaction search is in place if Paypal returns a blank response

-Store owner can now be emailed the card information if a transaction fails

-Debug mode and proxy setup is now done in the module's admin panel

 

I'm still working on the shipping address mess. Stew, do you use a contrib for your gift address thing?

 

No- I referred to it as a "gift address" because I seem to remember PayPal using that term at some point.

 

The customer can choose a shipping address and a billing address from their address book during checkout. Neither one of these addresses needs to be the same as the customer's default address, or as each other (ie there can be three addresses associated with one order: one for the customer, one for billing, and one for shipping). As far as I know that's a function of a stock osC install.

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Link to comment
Share on other sites

Need help big time, this is holding me up from opening up my store! Here is my store:

 

http://www.tunernetwork.com/onlineshop

 

Ok, i installed everything as the directions specified. Now, when i am logged in, and I add something to my cart, and I go to My Cart, I see the paypal checkout image etc. However, when I click on it, I get this error:

 

"(2030) Unable to find API certificate file."

 

Now, I put the certificate file exactly where it says to put it. I am assuming in the admin section, under modules/payment where you can edit the module, when it asks for the API Certificate user name it is asking for exactly what it gives you, what I mean is, mine is: paypal_api3.tunernetwork.com. I have "paypal_api3.tunernetwork.com" posted where it asks for my api certificate username, and the appropiate password I gave it.

 

I looking to see if anyone can help me with this, or had a similar problem and was able to work it out. I need help ASAP, thank you!

 

The only thing I can think of is this....where you can edit the particulars for this module:

 

API Certificate File

Enter your API certificate file name and path from catalog/

 

Now, my store is not named "catalog", it is onlineshop, could it be the path is set up so the store should be named "catalog" instead of "onlineshop", and I need to change this?

 

bah, im getting aggravated, please help,lol

Edited by TunerNetwork
Link to comment
Share on other sites

Hey man, I had some similar stuff happening to me. Here's what I check when I get that error to fix it:

 

Catalog is just the generic placeholder for your shop's directory. So you should keep that in mind whenever you see it. I've replaced it with "onlineshop" here.

 

1) Make sure your file is in onlineshop\includes\modules\payment\wpp_cert\cert_key_pem.txt

 

2) Make sure the path to that file is set properly in the Admin tool. (make sure that you actually have cert_key_pem.txt in the path to the file).

 

3) Make sure you're in the right mode (sandbox or live). The certificate has to match your live or sandbox account.

 

4) Make sure your API username and pw are correct.

 

Might help to just generate a new certificate and make sure everything is proper.

 

One of those things always fixed it for me. Good luck, bro.

 

Best,

Amit

 

Need help big time, this is holding me up from opening up my store! Here is my store:

 

http://www.tunernetwork.com/onlineshop

 

Ok, i installed everything as the directions specified. Now, when i am logged in, and I add something to my cart, and I go to My Cart, I see the paypal checkout image etc. However, when I click on it, I get this error:

 

"(2030) Unable to find API certificate file."

 

Now, I put the certificate file exactly where it says to put it. I am assuming in the admin section, under modules/payment where you can edit the module, when it asks for the API Certificate user name it is asking for exactly what it gives you, what I mean is, mine is: paypal_api3.tunernetwork.com. I have "paypal_api3.tunernetwork.com" posted where it asks for my api certificate username, and the appropiate password I gave it.

 

I looking to see if anyone can help me with this, or had a similar problem and was able to work it out. I need help ASAP, thank you!

 

The only thing I can think of is this....where you can edit the particulars for this module:

 

API Certificate File

Enter your API certificate file name and path from catalog/

 

Now, my store is not named "catalog", it is onlineshop, could it be the path is set up so the store should be named "catalog" instead of "onlineshop", and I need to change this?

 

bah, im getting aggravated, please help,lol

Link to comment
Share on other sites

1) Make sure your file is in onlineshop\includes\modules\payment\wpp_cert\cert_key_pem.txt

 

Thanks for the fast response, but is that the correct path, i thought the cert_key_pem.txt goes here

"onlineshop/paypal_wpp/certs/cert_key_pem.txt"

 

correct me if im wrong, im working on this right now. Thanks!!!

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...