Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal IPN encrypted mode not working


robfor

Recommended Posts

I finally got my sandbox set-up to work. First I had to work through an additional error from Paypal, something about "email address for the business is not present in the encrypted blob. " Here's some of the changes I had to make to get oscommerce IPN to work with Paypal:

 

1. Certificate generation exactly according to PayPal instruction

- either API certificate, or openssl

->Private key: genrsa -out privkey.pem 1024 (I believe there is still a way to get the instructions at the top of this thread to work, but for me it will take a little more digging)

->Public key: req -new -key privkey.pem -509 -days 365 -out cacert.pem

- I believe the customer service email address specified in your paypal account needs to be used in the certificate generation

 

*IMPORTANT* To protect your private key you will need to store it in a non-browser accessible area of your server. You can actually put all the certs as well as the temp folder in a non-browser folder and it will still work.

 

2. After uploading the Public key make sure to copy your Paypal certificate id.

3. Update references in Oscommerce IPN admin (use the full path to your server/folder)

- ensure the same email as in the key is referenced

 

Good luck!

 

Have done exactly as it says in the PayPal IPN setup article:

 

http://oscdox.com/index.php?op=modload&nam...PaypalIpnOscmax

 

and it works fine when I choose to run without encrytion but when I set encryted to true in the paypal modul it wont work.

 

Error: Warning: fread(): Length parameter must be greater than 0. in /catalog/includes/modules/payment/paypal_ipn.php on line 388

 

Do any of you know what this error depends on?

 

just above the checkout button, if I insist on checking out anyway the paypal page says that it has encountered an error and that information is missing. Turn off encrytion and everything works fine again.

 

When the guy in the article testet it he didnt have encryption on so there are probably a thing or two still to say on the subject. I.e if you are to give people advice on how to configure paypal encrypted payments, be sure that you have gotten it to work yourself first.

 

But you can still follow the advice in the article for non-encrypted payments with paypal and of course skip all the make your certs instrutions since it wont work in encrypted mode anyway.

Edited by robfor
Link to comment
Share on other sites

Have done exactly as it says in the PayPal IPN setup article:

 

http://oscdox.com/index.php?op=modload&nam...PaypalIpnOscmax

 

and it works fine when I choose to run without encrytion but when I set encryted to true in the paypal modul it wont work.

 

Error: Warning: fread(): Length parameter must be greater than 0. in /catalog/includes/modules/payment/paypal_ipn.php on line 388

 

Do any of you know what this error depends on?

 

just above the checkout button, if I insist on checking out anyway the paypal page says that it has encountered an error and that information is missing. Turn off encrytion and everything works fine again.

 

When the guy in the article testet it he didnt have encryption on so there are probably a thing or two still to say on the subject. I.e if you are to give people advice on how to configure paypal encrypted payments, be sure that you have gotten it to work yourself first.

 

But you can still follow the advice in the article for non-encrypted payments with paypal and of course skip all the make your certs instrutions since it wont work in encrypted mode anyway.

 

 

The funny thing is that on my test store at home on Win XP I dont get the fread() error at all but I still get the paypal error (Sandbox mode) that some information seems to be missing but what information?

 

Is there somthing wrong with the certs? I have done it by the book so... fread() tries to read a file called encrypted.txt from the opensll working directory wich is defined in the settings for the paypal IPN, I have set the rights to 777 for that directory, wich is catalog/temp b.t.w.

 

My live store is located on a linux host machine so it might be something that differs, the path to opensll? Rights or?

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