Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Paypal IPN Issues


madrien

Recommended Posts

I succesfully have installed and configured the latest version of OSCommerce on my web site but I have been running into issues with my payment module.

 

Once the user reaches the section where they will be taken to paypal's web site to complete the payment, the user is taken to the paypal main web site (http://www.paypal.com) but it doesnt show the cart total and ask for payment as it should.

 

In my paypal profile I set the following:

 

Instant Payment Notification (IPN) On

Instant Payment Notification (IPN) URL: http://www.elite-merchandise.com/includes/...ment/paypal.php

 

I have even tried to install the paypal contrib but nothing different happens. I really would not want to resort to a full reinstallation since I have do a great deal of custmoizations.

 

My site is at http://www.elite-merchandise.com

 

Can someone please help me with this?

 

I would greatly appreciate the help.

 

Thanks

Link to comment
Share on other sites

In order to use IPN, you'll need to install one of the IPN modules on your site. Maybe you did and I misunderstood.

 

I would recommend this one

 

http://www.oscommerce.com/community/contri...,all/search,ipn

 

It can be installed in just a few minutes. No files to edit.

 

The notify_url is actually yoursite.com/catalog(if applicable)/ext/modules/payment/paypal_ipn/ipn.php

 

but it's already specified in the form in the IPN module files.

 

The return url would be yoursite.com/catalog(if applicable)/checkout_process.php

 

but that too is already in the form passed to Paypal.

 

The osc IPN I gave a link to makes it unnecessary to set anything different in your Paypal account....other than it needs to be a premier or biz account.

Edited by choosealogin
Link to comment
Share on other sites

Thanks for your help so far.

 

I downloaded and setup the paypal IPN Contrib as you suggtested and turned off the payment notification on my paypal account (which is already a business account).

 

However, I am still running into issues. Is it something that I am missing?

 

I have configured the paypal IPN in the config for OSC like this:

 

PayPal IPN

 

Enable PayPal IPN Module

True

 

Move tax to total amount

True

 

E-Mail Address

[email protected]

 

Transaction Currency

Only USD

 

Payment Zone

Georgia

 

Set Preparing Order Status

Preparing [PayPal IPN]

 

Set PayPal Acknowledged Order Status

Preparing [PayPal IPN]

 

Gateway Server

Live

 

Transaction Type

Aggregate

 

Page Style

Paypal

 

Debug E-Mail Address

[email protected]

 

Sort order of display.

0

 

Enable Encrypted Web Payments

True

 

Your Private Key

 

 

Your Public Certificate

 

 

PayPals Public Certificate

http://www.elite-merchandise.com/ext/modul...al_cert_pem.pem

 

Your PayPal Public Certificate ID

 

 

Working Directory

http://www.elite-merchandise.com/tmp/

 

OpenSSL Location

/usr/bin/openssl

 

 

Let me know if you have any ideas. I really do appreciate your help on this

Link to comment
Share on other sites

Try turning Encrypted Web Payments OFF and see if that makes a difference.

 

Enable Encrypted Web Payments

false

 

Your Private Key

 

Your Public Certificate

 

PayPals Public Certificate

 

Your PayPal Public Certificate ID

 

Working Directory

 

It'll then try to use CURL to encrypt. Even sending unencrypted info is allowed by PayPal as you are not sending confidential information.

 

PS: there is an support thread if you need more help:

http://www.oscommerce.com/forums/index.php?showtopic=179917

 

all the best, Terra

My code for combining PayPal IPN with ** QTPro 4.25 ** osC Affiliate ** CCGV(trad)

and how to solve the invoice already paid error

General info: Allow customer to delete order comment ** FTP Programs & Text Editors ** Amending order email **

Link to comment
Share on other sites

In addition, you have it set to only be enabled for customers residing in Georgia. Was that your intention?

 

Payment Zone

Georgia

 

Payment Zone

If a zone is selected, only enable this payment method for that zone.

 

If you select "none" there, it will be enabled all of your shipping zones.

 

This is unrelated, but I would suggest adding an order status. Something to the effect of "acknowledged [paypal IPN] "

 

Then you can put it here

 

Set PayPal Acknowledged Order Status

Acknowledged [PayPal IPN]

 

That way, when your ipn status is updated, so will the order status. At a glance, you'll be able to see the difference.

Edited by choosealogin
Link to comment
Share on other sites

Thanks for your help so far.

 

I downloaded and setup the paypal IPN Contrib as you suggtested and turned off the payment notification on my paypal account (which is already a business account).

 

Hey, do you have your issues resolved? The paypal IPN contribution will not work if you have turned the 'Paypal instant payment notification' to OFF. Be sure to turn it on, the URL is not very important, but paypal just wont IPN your sales if this turned to OFF.

Link to comment
Share on other sites

Hey, do you have your issues resolved? The paypal IPN contribution will not work if you have turned the 'Paypal instant payment notification' to OFF. Be sure to turn it on, the URL is not very important, but paypal just wont IPN your sales if this turned to OFF.

Abbat - I'm sorry but your advice is wrong. Within the PayPal account you do not need to active the IPN as all the information (most important the notify_url) is sent by the IPN module to PayPal. To avoid any potential problems, I'd always recommend not to activate the IPN in your PayPal account - that way the module sends the correct notify path and there's less room for errors.

 

If you have a look in the PayPal IPN code (official osCom version) you will see the notify_url and all the other parameters specified. I have the PayPal IPN module running on several customer sites with no problems.

 

all the best, Terra

My code for combining PayPal IPN with ** QTPro 4.25 ** osC Affiliate ** CCGV(trad)

and how to solve the invoice already paid error

General info: Allow customer to delete order comment ** FTP Programs & Text Editors ** Amending order email **

Link to comment
Share on other sites

Abbat - I'm sorry but your advice is wrong. Within the PayPal account you do not need to active the IPN as all the information (most important the notify_url) is sent by the IPN module to PayPal. To avoid any potential problems, I'd always recommend not to activate the IPN in your PayPal account - that way the module sends the correct notify path and there's less room for errors.

 

If you have a look in the PayPal IPN code (official osCom version) you will see the notify_url and all the other parameters specified. I have the PayPal IPN module running on several customer sites with no problems.

 

all the best, Terra

Hey Terra,

 

I have installed the paypal IPN contribution (written by hdpl originally) to several sites too, and I know that the notify URL is posted within a form of a paypal button (without it it just wont work) but

1) Of course, paypal ipn contrib do post an order to your site, but

2) Does the paypal IPN is coming back to your site to change your order status from 'processing'

to e.g Verified if the Paypal instant payment notification is turned OFF in paypal merchant tools? I never have it working (I mean here that the order will never get verified in Osc, of course it is verified in paypal) with this flag turned OFF. Paypal IPNotificator never reached my site with this flag turned OFF.

Link to comment
Share on other sites

Hey Terra,

 

I have installed the paypal IPN contribution (written by hdpl originally) to several sites too, and I know that the notify URL is posted within a form of a paypal button (without it it just wont work) but

1) Of course, paypal ipn contrib do post an order to your site, but

2) Does the paypal IPN is coming back to your site to change your order status from 'processing'

to e.g Verified if the Paypal instant payment notification is turned OFF in paypal merchant tools? I never have it working (I mean here that the order will never get verified in Osc, of course it is verified in paypal) with this flag turned OFF. Paypal IPNotificator never reached my site with this flag turned OFF.

It should do - definitely does on the sites installed on our servers. It changes from "Preparing PayPal IPN" to whatever you specified (e.g. Pending).

 

There is an issue with register globals patch v1.4 which stopped the status from being updated. I've posted a suggested solution in the PayPal IPN support thread so people can test & tell me whether it's working on their servers. The post is here:

http://www.oscommerce.com/forums/index.php?sho...52entry880452

 

Are you using the register globals 1.4 patch? Terra

Edited by Terra

My code for combining PayPal IPN with ** QTPro 4.25 ** osC Affiliate ** CCGV(trad)

and how to solve the invoice already paid error

General info: Allow customer to delete order comment ** FTP Programs & Text Editors ** Amending order email **

Link to comment
Share on other sites

It should do - definitely does on the sites installed on our servers. It changes from "Preparing PayPal IPN" to whatever you specified (e.g. Pending).

 

There is an issue with register globals patch v1.4 which stopped the status from being updated. I've posted a suggested solution in the PayPal IPN support thread so people can test & tell me whether it's working on their servers. The post is here:

http://www.oscommerce.com/forums/index.php?sho...533;entry880452

 

Are you using the register globals 1.4 patch? Terra

 

Well, seems you're right with register globals here. I think this will fix the thing. Thanks.

Link to comment
Share on other sites

Hi sorry but I have read and read the forums until my eyes have gone funny :blink:

 

I am only a week into this and was having paypal showing no orders issue so I have today installed the new IPN and thanks (terra!) it is kindly collecting the information for me. By the way sandbox refused to work with error 3005 so gave up and did live test.

 

However, the order status has not changed and I am totally confused by all the different threads.

 

Do I set autoreturn?

 

Do I set the URL and if so what is the correct address please because I have seen checkout process and checkout success?

 

Anything else I have missed?

 

many thanks

Link to comment
Share on other sites

I am only a week into this and was having paypal showing no orders issue so I have today installed the new IPN and thanks (terra!) it is kindly collecting the information for me. By the way sandbox refused to work with error 3005 so gave up and did live test.

However, the order status has not changed and I am totally confused by all the different threads.

Do I set autoreturn?

Do I set the URL and if so what is the correct address please because I have seen checkout process and checkout success?

I've uploaded a new version today - have a look as it contains a few fixes and a better user guide inc. PayPal account info. Any other queries just post in the official support thread and we'll help.

 

I've also published quite a few codes / infos here:

http://www.oscommerce.com/forums/index.php?act...=7&t=179917

if you read the last pages of the tread, you should get your answers.

 

all the best, Terra

My code for combining PayPal IPN with ** QTPro 4.25 ** osC Affiliate ** CCGV(trad)

and how to solve the invoice already paid error

General info: Allow customer to delete order comment ** FTP Programs & Text Editors ** Amending order email **

Link to comment
Share on other sites

I upload the latest version today and everything is working fine except Set Preparing Order Status

"Preparing [PayPal IPN]" is not updating to pending.

 

Can anyone help me dertermine what I am doing wrong?

 

Configuration in Paypal

PayPal Website Payments Standard

 

Instant Payment Notification (IPN) Off

Instant Payment Notification (IPN) URL:

 

Auto Return for Website Payments On

 

 

Cofiguration in my store

PayPal IPN

 

Enable PayPal IPN Module

True

 

Move tax to total amount

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

Pending

 

Gateway Server

Testing

 

Transaction Type

Aggregate

 

Page Style

Paypal_Mextic

 

Debug E-Mail Address

[email protected]

 

Sort order of display.

0

 

Enable Encrypted Web Payments

False

 

Your Private Key

 

 

Your Public Certificate

 

 

PayPals Public Certificate

 

 

Your PayPal Public Certificate ID

 

 

Working Directory

http://mexticcreations.com/mystore/nfoscomm/catalog/temp/

 

OpenSSL Location

/usr/bin/openssl

Link to comment
Share on other sites

The pending status is done via the /ext/modules/payment/paypal/ipn.php file - can you confirm that this file is in the correct location?

 

My personal debbuging technique is to enclose email commands in the ipn.php file so that I can find out at which stage the script fails and which statement/variable might be causing trouble. If you are familiar with the PHP email scripts then it's worth a try.

 

Previous problmes with updating were caused by the $invoice variable not validating (which in turn is based on orderID and PayPal Cart ID) but these *should* be fixed in the latest version.

 

PS: the setttings look fine but you don't need to enter a Working Directory.

 

all the best, Terra

My code for combining PayPal IPN with ** QTPro 4.25 ** osC Affiliate ** CCGV(trad)

and how to solve the invoice already paid error

General info: Allow customer to delete order comment ** FTP Programs & Text Editors ** Amending order email **

Link to comment
Share on other sites

  • 2 weeks later...
The pending status is done via the /ext/modules/payment/paypal/ipn.php file - can you confirm that this file is in the correct location?

 

My personal debbuging technique is to enclose email commands in the ipn.php file so that I can find out at which stage the script fails and which statement/variable might be causing trouble. If you are familiar with the PHP email scripts then it's worth a try.

 

Previous problmes with updating were caused by the $invoice variable not validating (which in turn is based on orderID and PayPal Cart ID) but these *should* be fixed in the latest version.

 

PS: the setttings look fine but you don't need to enter a Working Directory.

 

all the best, Terra

One question - I've found that "preparing to pending" updating will stops when I has done the "this_invoice_has_already_been_paid_error.txt" fix. Could anybody help? Thank you!

Link to comment
Share on other sites

One question - I've found that "preparing to pending" updating will stops when I has done the "this_invoice_has_already_been_paid_error.txt" fix. Could anybody help? Thank you!

You probably installed the fix wrongly then - the PayPal Order ID is important for the update to work correctly. Please double-check that you applied the fix correctly both in paypal_ipn.php and ipn.php, with special attention to:

In /ext/modules/payment/paypal/ipn.php replace all occurrences of

$_POST['invoice']

 

with

substr($_POST['invoice'],1)

 

My advice is ony for people with a good understanding of PHP to use this fix. If you have any problems with it, I'd advise to uninstall and instead turn off the order ID checking in your PayPal account as mentioned in the help file as solution #2;

In your PayPal account, go to "Profile" - > "Payment Receiving Preferences". In there you will have the option:

Block accidental payments:

You may prevent accidental payments by blocking duplicate invoice IDs

Yes, block multiple payments per invoice ID

No, allow multiple payments per invoice ID

 

Select "No".

 

all the best, Terra

My code for combining PayPal IPN with ** QTPro 4.25 ** osC Affiliate ** CCGV(trad)

and how to solve the invoice already paid error

General info: Allow customer to delete order comment ** FTP Programs & Text Editors ** Amending order email **

Link to comment
Share on other sites

You probably installed the fix wrongly then - the PayPal Order ID is important for the update to work correctly. Please double-check that you applied the fix correctly both in paypal_ipn.php and ipn.php, with special attention to:

My advice is ony for people with a good understanding of PHP to use this fix. If you have any problems with it, I'd advise to uninstall and instead turn off the order ID checking in your PayPal account as mentioned in the help file as solution #2;

all the best, Terra

Yes Sir. It has been double checked by me before.

I've done an updating of both php files as described.

 

paypal_ipn.php - add "'s'." before substr($cart_PayPal_IPN_ID, strpos($cart_PayPal_IPN_ID, '-')+1);

ipn.php - replace all entries $_POST['invoice'] with substr($_POST['invoice'],1)

 

I can attach my files here if it will helps.

Link to comment
Share on other sites

okay, sorry to come across all bossy boots ... I'm just not sure what's happening as I did test this for a customer and it's all working there .... :'( Edith

 

PS: if you can post your code might be good - maybe somebody else on the forum can then help. Just the one line from your paypal_ipn.php file and all lines from ipn.php.

Edited by Terra

My code for combining PayPal IPN with ** QTPro 4.25 ** osC Affiliate ** CCGV(trad)

and how to solve the invoice already paid error

General info: Allow customer to delete order comment ** FTP Programs & Text Editors ** Amending order email **

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