Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Official PayPal IPN Support Thread


Mark Evans

Recommended Posts

Is the working directory only required to be set up if you want to enable encrypted web payments? That is what I'm assuming as the temporary key and such needs to be stored somewhere.

 

Also: Has anyone who was having trouble with status not updating while testing in the sandbox managed to confirm what the problem was?

Edited by davidpeterson
Link to comment
Share on other sites

Heya TCwho,

 

first. on the contribution it is called cc_show you can get it here

 

second.

on the certificates..I read thru that user guide and yes it did talk about the paypal certs, and places to go to get certs, but not specifics on how to get them. I have since found out that I can get them thru my host using Cpanel (there is an option to manage public keys).  So now all I need if for my host to fix a small problem with cpanel and away I go!

 

RW

 

I do have one question though for anyone.  Where do you upload the certs/keys too?  Root folder or just anywhere?  Inside the website or outside?

 

Thanks!

 

 

Hey RavenWulf. Good to meet you :)

 

thanks for the link. that contribution looks like something worth trying...

 

hmmm...I will check with my host as well to see if maybe I can get it throught Cpanel....because that could save alot of time. Im still in the Sandbox Testing Phase ... because of the directions in the manual I had downloaded openssl.org 0.9.7e .... and was probaly gonna install that tommorow...

 

..but if that Cpanel option is available to me... whoo hooo!

Link to comment
Share on other sites

Hey TCwho,

 

I hope it works for ya, and thanks for the hint to openssl...if my host doesn't get it working soon I may have to do that.

 

RW

 

Hey RavenWulf.  Good to meet you :)

 

thanks for the link.  that contribution looks like something worth trying...

 

hmmm...I will check with my host as well to see if maybe I can get it throught Cpanel....because that could save alot of time.  Im still in the Sandbox Testing Phase  ... because of the directions in the manual I had downloaded openssl.org 0.9.7e .... and was probaly gonna install that tommorow...

 

..but if that Cpanel option is available to me... whoo hooo!

Link to comment
Share on other sites

Has anyone been able to get this contrib working with the Product Attribute - Option Type Feature contribution. I have been mulling through the IPN source files for the last couple of days and haven't been able to find what should be changed or anything so... any help would be GREATLY appreciated!

 

Thanks

Link to comment
Share on other sites

Has anyone been able to get this contrib working with the Product Attribute - Option Type Feature contribution. I have been mulling through the IPN source files for the last couple of days and haven't been able to find what should be changed or anything so... any help would be GREATLY appreciated!

 

Thanks

 

I found out how to allow these to contributions to exists with a simple analysis of the mod to the checkout_success.php file for the option type mode. You just need to change

the following lines in the paypal_ipn.php file

 

'products_options_values' => $attributes_values['products_options_values_name'],

 

to

 

'products_options_values' =>$order->products[$i]['attributes'][$j]['value'],

 

and

 

$products_ordered_attributes .= "\n\t" . $attributes_values['products_options_name'] . ' ' . $attributes_values['products_options_values_name'];

 

to this (for the attributes to show up in the conf email)

$products_ordered_attributes .= "\n\t" . $attributes_values['products_options_name'] . ' ' . tep_decode_specialchars($order->products[$i]['attributes'][$j]['value']);

 

Hope this helps someone.

Link to comment
Share on other sites

:(

 

Hi, I installed this nice module couple days ago, and had been testing since then, but I realize that there are always TWO idential orders created for every order that's made. It seems one is created before the browser is being sent to PayPal, and another order is created after returning from PayPal.

 

Does anybody have any idea why this happening? or is anybody encountering the same problem?

 

Any help and advices will be much appreciated!

 

Thank you, guys!

 

Regards!

Jimmy

Link to comment
Share on other sites

The module has just been updated

 

http://www.oscommerce.com/community/contributions,2679

 

- Added support for php native openssl functions

- Added check to verify the order total before changing the order status

- Store the customers paypal account status as part of the order status

- Updated Description to show credit / debit cards are accepted

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

Hi

I would appreciate if someone can give me some comments. Which is better this module or the PayPal_Shopping_Cart_IPN 3.0. Any comments needed. Thanks. :thumbsup:

 

I would say this one as it is much easier to install and it is being developed by the OS commerce team...

Link to comment
Share on other sites

I installed this contrib a few days ago and love it.

 

I just have one problem with it.

 

We get a lot of orders stored in the DB which the customer did not complete.

 

Is there any way to not store the order in the DB until the customer either at least GOES to PayPal or returns? (the return part is probably unlikely) I have been looking over the code and trying to figure it out. Any help would be appreciated.

Link to comment
Share on other sites

My problem pertains to osCommerce PayPal IPN Module v1.0 For 2.2MS2

 

I just learnt about this support thread but I also posted my problem as a bug for the contribution which after researching so much I am not sure it is. I would appreciate anyone's help in this.

 

Loaded very easily perhaps too easily. My hosting website is bluehost.com. My site is www.ttreeltd.net. I worked with Paypal technical services, I purchased a new SSL certificate and had Bluehost install it. Thought this would make the Shared SSL probs dissappear. I have a dedicated IP address as well. It is an Apache server as well.

 

My host site supplied the directories for me to supply to the Paypal IPN input items in Admin.

 

This is my problem: I get an error message from Paypal upon Confirm button.

 

Problem: There was a problem with the decryption of your secure order. Please contact your merchant.

 

I download the API certificate and stored it in the directory:

ext/modules/payment/paypal_ipn/

 

The name of the file is: cert_key_pem.pem The contents have RSA info in it . It was a .txt file and got the same error so I renamed it to .pem and still got the same error.

 

The parms I used for the Paypal IPN entries in Admin are:

 

PayPal IPN

 

Enable PayPal IPN Module

True

 

E-Mail Address

[email protected]

 

Transaction Currency

Only USD

 

Payment Zone

--none--

 

Set Preparing Order Status

Preparing [PayPal IPN]

 

Set PayPal Acknowledged Order Status

Preparing [PayPal IPN]

 

Gateway Server

Live

 

Transaction Type

Per Item

 

Page Style

PayPal

 

Debug E-Mail Address

[email protected]

 

Sort order of display.

0

 

Enable Encrypted Web Payments

True

 

Your Private Key

/home/MYSITE/ssl/private/www.MYSITE.net.key

 

Your Public Certificate

/home/MYSITE/ssl/certs/www.MYSITE.net.crt

 

PayPals Public Certificate

/home/MYSITE/public_html/ext/modules/payment/paypal_ipn/cert_key_pem.pem

 

Your PayPal Public Certificate ID

xxxxxxxxxxxxxxxxxxxxxxxxxx (for confidential reasons I xxxx'ed it out here

 

Working Directory

/home/MYSITE/public_html/

 

OpenSSL Location

/usr/bin/openssl

 

 

The question becomes HELP what is going wrong because I have hit a wall and need some help. As it is now there is NO log to look at and I dont know where to go from here.

 

This is what I am sending Paypal

 

<form name="checkout_confirmation" action="https://www.paypal.com/cgi-bin/webscr" method="post"><input type="hidden" name="osCsid" value="cc8edf19890d9d8086ca065824207de1" /><input type="hidden" name="cmd" value="_s-xclick"><input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----

MI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vs8V7IupeCnEfw6XmuAqF9ts

CtiZBVv1gAuH0/d1QcYtXHriT8lHx2vY5HHhuOrZbf396obMAlF+yTo0JKFFv7dO

IyKq9Uqxr+MRMiTEATyJ//kMzYF6EmHoCU93cuj9FiHYYNioVIxk0nr7LbsIMB/u

XPduUw6h1xmNIVaptxjnON6Xcw==

-----END PKCS7-----"><input type="image" src="includes/languages/english/images/buttons/button_confirm_order.gif" border="0" alt="Confirm Order" title=" Confirm Order "></form>

 

 

 

To me it appears that the sequences are invalid and some that may not be needed. It is hard to troubleshoot this type of error Paypal says that it may occur because some characters maybe accidentally were deleted by mistake or format:

 

There are some parms in my code that may be invalid or not needed such as: <input type="hidden" name="osCsid" value="cc8edf19890d9d8086ca065824207de1" />

 

and after the -----END PKCS7-----"> such as:

 

<input type="image" src="includes/languages/english/images/buttons/button_confirm_order.gif" border="0" alt="Confirm Order" title=" Confirm Order "></form>

 

 

Thanks for your anticipated cooperation.

Link to comment
Share on other sites

Is there a way to hard code a maximum price that the paypal payment option will be shown for?

 

eg, because of fees, I'm wanting customers to pay by other means if the order total is above ?300? -and therefore not show the PayPal option?

 

Thanks

Link to comment
Share on other sites

I have a weirder error. Easy as to install however when a customer orders and then goes through the checkout process, they can see PAYPAL but cannot select it.

 

Any ideas why this is a problem?

Link to comment
Share on other sites

I have installed the module and run a few purchases through using the PayPal Sandbox. All seems to be working fine.

 

The PayPal site is https. Do I also need to run encryption on the IPN module?

 

The PayPal Sandbox site gives me some certificate choices to use for testing? There are three, which do I use?

 

What do I actually do with the text file from PayPal in order to use it?

 

Do I have to run this file throgh something like openSSL in order to extract what I beed from it?

 

I f I want to SSL the Account Application page on my osC do I need a different certificate? (I believe the answer is yes, but would appreciate confirmation from someone who knows.)

Edited by RikR

Rik Rasmussen

Link to comment
Share on other sites

I have installed the module and run a few purchases through using the PayPal Sandbox. All seems to be working fine.

 

The PayPal site is https. Do I also need to run encryption on the IPN module?

 

The PayPal Sandbox site gives me some certificate choices to use for testing? There are three, which do I use?

 

What do I actually do with the text file from PayPal in order to use it?

 

Do I have to run this file throgh something like openSSL in order to extract what I beed from it?

 

I f I want to SSL the Account Application page on my osC do I need a different certificate? (I believe the answer is yes, but would appreciate confirmation from someone who knows.)

 

I am wondering about this part also. When do you need the web encryption part of the Paypal IPN module ? I will have my shop under SSL for the checkout and other personal parts and Paypal is handling the order under it's own SSL.

Is the web encryption only needed when you don't have SSL on your part of the site or is there something more to it ?

I ran a few orders through the Paypal sandbox and that all went fine.

Link to comment
Share on other sites

Is the web encryption only needed when you don't have SSL on your part of the site or is there something more to it ?

 

The web encryption is used to encrypt the form data sent to paypal.

 

From the paypal help section

 

What are the advantages of using encrypted Website Payment buttons vs. unencrypted Website Payment buttons?

 

In a word, security. No one except for PayPal can read the Website Payment and PayPal will know that this Website Payment only could have come from you, the merchant.

 

For this to work however you need access to creating public/private keys.

 

You will need to ask your hosting provider if they provide this for you.

 

More informtion can be found at http://www.paypal.com/cgi-bin/webscr?cmd=_...age=_home&flow=

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

I have a weirder error. Easy as to install however when a customer orders and then goes through the checkout process, they can see PAYPAL but cannot select it.

 

Any ideas why this is a problem?

 

This is likely to be down to some modification of the checkout_payment.php page.

 

Compare your page with the original and see if some code has been removed by accident.

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

Is there any way to not store the order in the DB until the customer either at least GOES to PayPal or returns?  (the return part is probably unlikely)  I have been looking over the code and trying to figure it out.  Any help would be appreciated.

 

This is what the original paypal module does which everyone complained about :D

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

The web encryption is used to encrypt the form data sent to paypal.

 

From the paypal help section

For this to work however you need access to creating public/private keys.

 

You will need to ask your hosting provider if they provide this for you.

 

More informtion can be found at http://www.paypal.com/cgi-bin/webscr?cmd=_...age=_home&flow=

 

Thanks ! I wasn't sure if using SSL on both sides would be enough but I now understand it isn't for the short moment the order is send to Paypal and picked up there by their SSL. I believe I have access to creating private keys through the Plesk interface but for public keys I am not sure. I will read and look into this to get it right.

The Queste continues :D

Link to comment
Share on other sites

If you figure out how to do it, please share it here.

 

Apparently PayPal provide a file to use for this, but I can't figure out how to use what they provide.

 

I wish the information given on this subject was written for real people.

Rik Rasmussen

Link to comment
Share on other sites

If you figure out how to do it, please share it here.

 

Apparently PayPal provide a file to use for this, but I can't figure out how to use what they provide.

 

I wish the information given on this subject was written for real people.

 

Okay, this is what I had to do to get it working. First I had to get my public certificate from the SSL I am running (at the moment I still use a self-signed one but I guess it won't be different when I have decided which official SSL certificate I can best buy and install).

If you are lucky you can get it the easy way. Through my Plesk admin I could just download the .pem file I needed for the Paypal IPN. It was called mydomain.pem and should be used for the entry 'Your Public Certificate' inside the Paypal IPN module. In case you can not do this you will probably need the openSSL part but I can't tell how that works.

 

Then I went to the Paypal Sandbox to look for the other two files I needed. After a little while I found you have to login into your sandbox account and go to the section 'Profile' from which you choose 'Encrypted Payment Settings'. Looking there you will find the option to download the PayPal Public Certificate (paypal_cert_pem.txt) and underneath that you find 'Your Public Certificates' where you choose add and upload the mydomain.pem you got from your own website SSL. Upon return you will find your Cert ID which you use for 'Your PayPal Public Certificate ID' within the Paypal IPN module. Also you can now download a file called 'cert_key_pem.txt'.

This 'cert_key_pem.txt' you use within the Paypal IPN module for the entry 'Your Private Key' and the 'paypal_cert_pem.txt' for the entry 'PayPals Public Certificate'.

 

In short:

From Paypal you have to get 2 files called 'paypal_cert_pem.txt' and 'cert_key_pem.txt' which you use within the osc Paypal IPN module for the above mentioned entries. The Paypal generated Cert.ID goes into 'Your PayPal Public Certificate ID'.

The one file needed from your own server goes into 'Your Public Certificate'.

 

Those three files you upload onto your server to a place at your discretion (I think) and within the Paypal IPN module you direct to them through an absolute path (at least that was what I had to do to get it working). IE. /home/httpdoc/vhosts/mydomain/httpdocs/my directory/cert_key_pem.txt

Similar for the rest. I had to change the working directory to an absolute path also to get rid of the errors I got at first. No need to change the name of the .txt files to .pem !

The entry for openSSL directory I left as it was because I didn't need it obviously and it didn't generate any errors leaving it as it was.

 

I did some test orders and all went fine with these settings.

You probably know most of what I wrote but I thought it could be handy for other people looking for information on this.

 

One thing I noticed after doing a test order is that on the Paypal side you can enter a different shipping address which however does not get returned to the shop. Looking at the transaction details on Paypal there is no address information at all so it could be tricky if the customer doesn't give a different shipping address from within the shop but only from the Paypal payment screen ?!

Link to comment
Share on other sites

Hello all! I am testing this contribution at the moment and I must thank those that have put in their hardwork into it. Great contribution. If at all, the contributors wish to add PayPal graphics to this contribution (eg. the page where the customers are made to select payment method), I think the following image is a great example.

horizontal_solution_PP.gif

Since it is part of the merchant tool and ready for us to use, why not? It can be found at PayPal - Online Logo Center. Other logos are available there too.

 

If I am not wrong, this Online Logo Center is a new thing for merchants (I wasn't able to find it until recently). Do visit it for more information on the Usage Guidelines and agreements. Just my humble opinion.

 

Thank You

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