Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Official PayPal IPN Support Thread


Mark Evans

Recommended Posts

Has anyone been able to solve the problem of the order never been updated from the premature preparing status? I have been troubleshooting this for a while and have not been able to solve the problem yet. We are anxious to get this working as about 10% of our paypal orders are failing!

Link to comment
Share on other sites

Ha ha, I think it won't be that hard IF you can get your own public key the easy way. Wish you good luck and don't sweat too much  :D

 

 

I discovered that I can generate a certificate on my host's cPanel. I used it to submit to PayPal.

 

After some tinkering with the paths to the PayPal cert and key files, I now have no errors showing in osC. However, I do get an error from PayPal that they can not unencrypt what I am sending.

 

Not sure if the problem is my cert, or not. It's name is like this: mydomain.com.crt

Rik Rasmussen

Link to comment
Share on other sites

I discovered that I can generate a certificate on my host's cPanel. I used it to submit to PayPal.

 

After some tinkering with the paths to the PayPal cert and key files, I now have no errors showing in osC. However, I do get an error from PayPal that they can not unencrypt what I am sending.

 

Not sure if the problem is my cert, or not. It's name is like this: mydomain.com.crt

 

Hello Rik,

 

Or maybe Paypal ? I don't think so but you never know. I tried to find what causes your problem but for me I couldn't get that error and went normally to the Paypal checkout screen. How did you get your cert_key_perm.txt ? I assume just as I did but while trying to find your error I found another way to get a cert_key_perm.txt and that is through your Paypal Sandbox profile also but taking the AP Call route.

That one is different from the one I got through the encrypted payment settings and it gives me another Cert ID when I add it. When I try this one however I already receive an error on the last checkout page of the shop:

Warning: openssl_pkcs7_sign(): error creating PKCS7 structure! in /home/httpd/vhosts/wheeloftime.nl/httpdocs/catalog/includes/modules/payment/paypal_ipn.php

 

I am pretty lost on this one as I don't understand the difference and/or use of these cert_key_perm.txt files ? Also what are those wdsl files for you see after logging in into the development center ? I can view them but not download apart from the fact I wouldn't know what to do with them ?

The first way I took works perfectly as it seems but this second route gives trouble.

 

There also seems a problem with the Sandbox testing non_Paypal users. I want to test for buyers without Paypal account but the Sandbox test users and their fictive credit cards you are forced to login to their Paypal account and using a real credit card only works once after which it gets blocked from some reason.

Link to comment
Share on other sites

Hey guys I need some help.

 

I just started testing osc paypal ipn on the sandbox.

I select my product(s), go thru check out, then hit confirm order. It goes to paypal, but I get an error page that states error this order has already been processed, click continue and i am back at my site check out process.

 

I go to admin area and the order is there with a status of Preparing [Paypal IPN]

 

what is going on here?????????

 

I get the order in the shop, but people can't pay????

 

Please help!!

 

RW

Link to comment
Share on other sites

Hi,

I also need some help or better a clear statement about the compatibility of the PayPal_IPN and OSCommerce 2.2 MS1.

Is it possible to run this contribution with MS1 or and how much effort does it take.

 

I can't even see it in the administration tool.

 

Thank you for any hint.

 

Kobold

Link to comment
Share on other sites

Has anyone been able to solve the problem of the order never been updated from the premature preparing status? I have been troubleshooting this for a while and have not been able to solve the problem yet. We are anxious to get this working as about 10% of our paypal orders are failing!

 

 

It seems that this contriubution is not that well supported after all. I have been asking this question for about a month and nobody has got back to me. If you manage to get the answer will you PM me and vice versa.

 

Cheers

Link to comment
Share on other sites

Ravenwulf,

 

I was trying to apply the change's to checkout_payment, with the code on page 1.

 

You said you got it to work! Would give me a hand?

 

Did that code work for ya or do you have to do some changing? I put credit card explain in and gif images.

 

any help would be great

 

mike

Link to comment
Share on other sites

Well I found out the problem is not paypal ipn...there is something wrong when you create an accout. After you select continue from the create account success page it takes you back to the main page but not logged in. hmmmmm

 

Wonder what I did this time LOL

 

RW

 

Hey guys I need some help.

 

I just started testing osc paypal ipn on the sandbox.

I select my product(s), go thru check out, then hit confirm order. It goes to paypal, but I get an error page that states error this order has already been processed, click continue and i am back at my site check out process.

 

I go to admin area and the order is there with a status of Preparing [Paypal IPN]

 

what is going on here?????????

 

I get the order in the shop, but people can't pay????

 

Please help!!

 

RW

Link to comment
Share on other sites

bigbuck,

 

Sure thing on the help, pm me your problem and what code you are using (or post here) and I'll take a look at it.

 

RW

 

Ravenwulf,

 

I was trying to apply the change's to checkout_payment, with the code on page 1. 

 

You said you got it to work!  Would give me a hand? 

 

Did that code work for ya or do you have to do some changing?  I put credit card explain in and gif images.

 

any help would be great

 

mike

Link to comment
Share on other sites

If you look at the contents of the two versions of the cert_key_perm.txt files, one contains a certficate only, the other contains a key and a certificate. PayPal certailnly confuses things by giving both files the same name.

 

I have been unable to get the encrypted portion of the PayPal IPN contrib to work.

Rik Rasmussen

Link to comment
Share on other sites

In my wonderings on this subject I believe I read on the paypal site that you need to use openssl to "break" apart the key and cert before using them.

 

RW

 

If you look at the contents of the two versions of the cert_key_perm.txt files, one contains a certficate only, the other contains a key and a certificate. PayPal certailnly confuses things by giving both files the same name.

 

I have been unable to get the encrypted portion of the PayPal IPN contrib to work.

Link to comment
Share on other sites

Success!! :thumbsup:

 

I just completed my first successful encrypted transaction.

 

My problem was, I was using a key I got from PayPal.

 

I switched to the key generated by the SSL certificate generator on my host's cPanel.

 

So for the three files required I am using:

 

my own key file - twowayradiodirectory.com.key

 

My own certificate file - twowayradiodirectory.com.crt

 

PayPal's public certificate - paypal_cert_pem.txt

 

These are the names I am using.

 

Uploaded my certificate to PayPal and got the PayPal Public Certificate ID from the PayPal Sandbox.

 

Works now.

 

 

:D

Rik Rasmussen

Link to comment
Share on other sites

Success!!    :thumbsup:

 

I just completed my first successful encrypted transaction.

 

My problem was, I was using a key I got from PayPal.

 

I switched to the key generated by the SSL certificate generator on my host's cPanel.

 

So for the three files required I am using:

 

my own key file - twowayradiodirectory.com.key

 

My own certificate file - twowayradiodirectory.com.crt

 

PayPal's public certificate - paypal_cert_pem.txt

 

These are the names I am using.

 

Uploaded my certificate to PayPal and got the PayPal Public Certificate ID from the PayPal Sandbox.

 

Works now.

  :D

 

Can you explain how you got the .key file and the .crt file ?

I only get a .pem file from my host panel which is identical to the cert_key_perm.txt I get through Paypal when only using the encrypted payment portion of them. Both files have a private key and a certifcate portion inside and they work.

So I have two Paypal files and one of my own and it works and you have one Paypal file and two of your own and it also works. This is getting stranger by the post :blink:

 

Could you test for a non-Paypal customer with a fictive creditcard number ? I can't find any information of which number you can use besides the one assigned to your Paypal test-user.

Link to comment
Share on other sites

In my host's cPanel there is an "SSL Manager".

 

I used it to create the certificate and the key. They were created in a directory "SSL"

 

I added a "pp" directory to my catalog directory and copied the .key and .crt file to the "pp" directory I have the path to the pp directory files in the settings of the IPN module. Using this pp directory may not be necessary. This was mostly for my own thought processes.

 

I have been testing in the Sandbox by pretending to be a customer who has no PayPal account. I have been paying with a credit card. I just type in a credit card number each time.

Rik Rasmussen

Link to comment
Share on other sites

In my host's cPanel there is an "SSL Manager".

 

I used it to create the certificate and the key. They were created in a directory "SSL"

 

I added a "pp" directory to my catalog directory and copied the .key and .crt file to the "pp" directory I have the path to the pp directory files in the settings of the IPN module. Using this pp directory may not be necessary. This was mostly for my own thought processes.

 

I have been testing in the Sandbox by pretending to be a customer who has no PayPal account. I have been paying with a credit card. I just type in a credit card number each time.

 

Hello Rik,

 

Thanks for your reply ! I will have to look into this later today. I had the same thing on my old server where there was a SSL directory with the seperate files but on the new Plesk server I can't find such directory and/or the files, I can just download the one combined private key/certificate file through the panel. So I might have to split that myself possibly.

It still puzzles me why both setups work but probably it is just having the right combination of files...

 

I understand you just type 'some' number and it works ? Strange, as I constantly get the warning my creditcard number is incorrect when I do that. Only after using a real one it worked for once and then got blocked somehow. I'll have to look again into that later also.

 

Cheers,

Howard

Link to comment
Share on other sites

I'm working with OsCommerce PayPal IPN Module v1.1 For 2.2MS2. I was hoping someone could provide an example of what you expect to see in the following input blocks.

 

Your Private Key:

Your Public Certificate:

PayPals Public Certificate:

Your PayPal Public Certificate ID:

Working Directory:

OpenSSL Location:

 

Just looking for examples, doesn't need to be real entries. I've been on sandbox, setup a personal account and a business account. Verified. Have a certificate for one of the account's. But am lost as to what to put in for the above blocks. I know this is asking for alot, but I sure could use the help. Thanks.

MurphyDM722

Link to comment
Share on other sites

A few messages back I shared what I have entered.

 

The "Your PayPal Public Certificate ID:" is just a number that PayPal provides after you upload your Public Certificate to them.

 

I left the Working Directory: and OpenSSL Location: as is.

Rik Rasmussen

Link to comment
Share on other sites

It seems that this contriubution is not that well supported after all. I have been asking this question for about a month and nobody has got back to me. If you manage to get the answer will you PM me and vice versa.

 

Cheers

 

 

...I thought Team Member answered your question.....

 

This is the way it is setup. Most people wanted it this way. If you read the documentation, you will see that before ..... people would receive a payment from paypal for an order but did not know what the order was because people did not click on the last 'Continue' button to return back to the store to finalize the process....

 

...many people had to call customers to ask them what their order was...

 

..now if people dont click on that last button ... you have a copy of that order..

 

..in the documentation it is explained that it is up to you to double-check...but that is why an order place but not payed for yet comes up with a different 'status' etc....

 

hope that clears it up for you

Link to comment
Share on other sites

...I thought Team Member answered your question.....

 

This is the way it is setup.  Most people wanted it this way.  If you read the documentation, you will see that before ..... people would receive a payment from paypal for an order but did not know what the order was because people did not click on the last 'Continue' button to return back to the store to finalize the process....

 

...many people had to call customers to ask them what their order was...

 

..now if people dont click on that last button ... you have a copy of that order..

 

..in the documentation it is explained that it is up to you to double-check...but that is why an order place but not payed for yet comes up with a different 'status' etc....

 

hope that clears it up for you

 

 

I understand all that perfectly and yes i agree it is a good idea that the order is processed even if the customer does not click on continue.

 

The problem is I have completed about 5 payments in full using sandbox and waited and waited and waited and the status does not change. This then means i still have to go into paypal to make sure payment has been recieved which then makes this contribution a little pointless, because that is what i do now.

 

Im not bitchin or anything as i think this oscommerce is the t*ts, but the suport on this contribution is not the best i have experienced.

 

I have noticed other people with the same problem and they have not got the answer to there questions either.

 

Anyway thank you for your response. It is much appreciated...

Link to comment
Share on other sites

@PandA.nl

(http://www.oscommerce.com/forums/index.php?sho...ic=124298&st=60)

 

Hi bmhoma,

 

here are the changes I made.  You should remove the original module first, and re?nstal after you made the changes. It added as an option to the admin (default set to true), so it's very easy to switch back to the original behaviour of the IPN module if needed.

 

The changes below describe how to modify the osCommerce PayPal IPN Module v1.0 For 2.2MS2 so that the total amount including tax is transferred to PayPal as discussed earlyer at this support thread (http://www.oscommerce.com/forums/index.php?showtopic=124298&st=0#).

 

I'm using it myself and it works fine, but please test carefully before using on a live shop!

 

I tested your changings in the paypal sandbox because I got the same problems with german tax.

I was astonished, that now paypal started to add the tax (after user login) - so that the tax now was added twice.

 

Before I was setting the standard taxrate inside paypal on the german taxrate 16 %. This is possible over Merchant tools>Buy Now-Button. (Following the integration-guide, it should be possible in Profile > Selling Preferences, but I didn't found it there :angry: )

 

The solution: the amount of tax must be formatted with a komma, not with a dot ("0,00" instead of "0.00") - at least for germany. Compare hidden-fields "tax" in the following links, so you will see that there is a difference.

https://www.paypal.com/de/cgi-bin/webscr?cm...des-outside#tax

https://www.paypal.com/cgi-bin/webscr?cmd=p...des-outside#tax

 

It's a bit crazy, isn't it? :'(

 

I think that instead of your changings this two changings must do it:

 

# Step 1

change this code (line 345)

        while (list($key, $value) = each($parameters)) {
         $data .= $key . '=' . $value . "\n";
       }

 

to

        while (list($key, $value) = each($parameters)) {
         if (substr($key,0,3) == "tax")
           $value = str_replace(".",",",$value);
         $data .= $key . '=' . $value . "\n";
       }

 

#Step 2

change this code (line 400)

        while (list($key, $value) = each($parameters)) {
         echo tep_draw_hidden_field($key, $value);
       }

 

to

        while (list($key, $value) = each($parameters)) {
         if (substr($key,0,3) == "tax")
           $value = str_replace(".",",",$value);
         echo tep_draw_hidden_field($key, $value);
       }

 

so long

Frank

Link to comment
Share on other sites

The problem is I have completed about 5 payments in full using sandbox and waited and waited and waited and the status does not change. This then means i still have to go into paypal to make sure payment has been recieved which then makes this contribution a little pointless, because that is what i do now.

 

If you are not receiveing the paypal IPN updates then its a setting on your store somewhere...

 

Have you got the store password protected using htaccess?

Have you enabled the debug email?

Mark Evans

osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops)

 

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

Software is like sex: It's better when it's free. (Linus Torvalds)

Link to comment
Share on other sites

If you are not receiveing the paypal IPN updates then its a setting on your store somewhere...

 

Have you got the store password protected using htaccess?

Have you enabled the debug email?

 

Oh my! I am such a fool. I had my entire test webpage password protected as it is simply the devcart. I worked perfectly once I removed the password protection! Thank you SO much, this will be so nice!

Link to comment
Share on other sites

I have been reading the threads about PayPal IPN not passing attributes that were created with the Option Type Feature contribution.

 

There is some kind of an update at Post #1213 (Scroll down this page to find #1213)

 

Does anybody have any experience with this combination?

 

(I have been worried about Easy Populate and the Option Type Feature, never though to worry about PayPal IPN!)

 

Thanks for any input anyone can provide.

 

Lobo

Link to comment
Share on other sites

Great work to everyone! I have one small error when the paypal redirects to my store.

 

On Post 42 devosc shows what to do if you have Authorizenet Consolidated 1.7 installed and on Post 46 devosc shows what to do if you have CCGV installed.

 

What if you have both? How do you handle this

 

$order_totals = $order_total_modules->process();

 

Many thanks.

while (!succeed) {try()};

 

GMT -6:00

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