Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Official PayPal IPN Support Thread


Mark Evans

Recommended Posts

OK.... so, I've been digging around. But, it would help if I could determine what is supposed to be happening.

 

I can see where a record gets added to the orders table when I click the "submit" button on the Payment Information screen (checkout_payment.php) and go to the checkout_confirmation.php module. That one gets assigned an order_id of 1.

 

Then, I click on "confirm order" and get taken into Paypal - still only one record on the database. When I click on the "pay now" button in paypal, I see where checkout_process.php is writing the identical order with an order_id of 2 to the orders table.

 

Should one of these writes to the table not be taking place? Or, should the second one be just trying to update the payment status of the first?

 

I think I can track it if I have an idea of what it is trying to do.

 

Thanks!

Link to comment
Share on other sites

OK.... so, I've been digging around. But, it would help if I could determine what is supposed to be happening.

 

I can see where a record gets added to the orders table when I click the "submit" button on the Payment Information screen (checkout_payment.php) and go to the checkout_confirmation.php module. That one gets assigned an order_id of 1.

 

Then, I click on "confirm order" and get taken into Paypal - still only one record on the database. When I click on the "pay now" button in paypal, I see where checkout_process.php is writing the identical order with an order_id of 2 to the orders table.

 

Should one of these writes to the table not be taking place? Or, should the second one be just trying to update the payment status of the first?

 

I think I can track it if I have an idea of what it is trying to do.

 

Thanks!

 

 

Does anyone have any ideas how the flow is supposed to work? For example, which module is supposed to initially update the orders table; which one is responsible for coming back and updating it with the new status after a sucessful paypal payment; etc....?

 

If you have any insight into this, I would really appreciate hearing it.

 

Thanks!

Link to comment
Share on other sites

I had a problem with this that I resolved. I have my main paypal account tied to an additional email address. My site paypalIPN module was sending payment to address #2, but the IPN response always said address #1. This caused the stock to never decrease after a payment had been made. Solution: I hardcoded the first address into the paypal module PHP code, and now it works fine.

Link to comment
Share on other sites

I had a problem with this that I resolved. I have my main paypal account tied to an additional email address. My site paypalIPN module was sending payment to address #2, but the IPN response always said address #1. This caused the stock to never decrease after a payment had been made. Solution: I hardcoded the first address into the paypal module PHP code, and now it works fine.

 

Thanks! I'll take a look.

Link to comment
Share on other sites

Can someone let tell me the easiest way to make OScommerce pass the Billing Address to paypal instead of the shipping address. I noticed that when someone tries to pay with paypal with a cc instead of account, it pulls from the shipping address in oscommerce that they entered instead of their billing, so they end up having to re-enter their billing address into the paypal page. Would like to have the billing one sent first off.

Link to comment
Share on other sites

Hello all,

I hope someone could help me with this problem with paypal. It seems like the description is not show up. I have installed the item_paypal description but it still like that. I also have another problem is that local customers cannot use paypal. When they being direct to paypal site they have an error: Return to Merchant....

 

paypal error.gif

 

Any help would much appreciated. Thank you so much in advance

Link to comment
Share on other sites

Hello,

 

my english isnt very good, i hope you understand me:

I have a question:

 

On the Contribution-Site http://addons.oscommerce.com/info/2679 there is the last version from

"Paypal_IPN 3.0 next Version GER aplein 22 Jan 2010"

 

But there is no sql-file or a complete "installation-file".

 

So can you help me please with the LAST-STABLE PayPal_IPN Module for OSC 2.2 ?

I've also searched the site http://addons.oscommerce.com/category?search=paypal+ipn but i found only this one.

 

Which Version is also the last stable which i should use? I search the normal IPN Module, not the "New ExpressCheckout" Module.

 

Thanks a lot.

tyv

Link to comment
Share on other sites

Question about paypal login issue.

 

This is quite strange.

Using my osCommerce with Pay Pal IPN.

 

I moved servers recently where it was working. But under a differnt Domain Name.

 

Now, when it comes to the checkout it takes me to the paypal page.

When I try to login into my paypal account it just goes back to the payment page without any kind of an explanation.

 

No error warning.

No nothing.

 

When I go to my paypal page on its own, I can login fine.

Yes my store paypal account is different from my personal account.

 

Any ideas??

 

Please and Thanks in advance.

Link to comment
Share on other sites

Hi,

Now I use justhot hosting. Seem Paypal IPN can't work, i can't get email.

 

I have update according to install_guide_READ_ME.html.

"If your server has register globals off and you need to turn it on by using a custom php.ini file, you need to put that php.ini under the ext folder as well. IPN won't work if register globals turned off. "

 

 

Now add php.ini on catalog and http://yourdomain.com/catalog/ext/modules/payment/paypal_ipn/

& put that php.ini under the ext folder as well

 

php.ini "register_globals = on"

 

But when I run:

 

http://yourdomain.com/catalog/ext/modules/payment/paypal_ipn/ipn.php

I got:

 

Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog directory.

 

Thanks & best Regards,

Sunrise99

Edited by sunrise99
Link to comment
Share on other sites

Hi Everyone...

 

I have the PayPal IPN v2.3.4.7 installed, also One Page Checkout and Held Orders.

 

Now the thing that is happening to me is when a customer orders with the PayPal IPN payment method, the order comes through twice in the admin (same order number, just duplicate) and the order emails has this in:

 

Products

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

1 x ASUS SKT-AM3 M4A89GTD PRO/USB3 S/V/L 5200MT/s (102044) = £118.04

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

Sub-Total: £118.04

Sub-Total: £118.04

2-3 Day Courier Despatch (2-3 Day Insured Delivery to: le9 9hb): £4.99

2-3 Day Courier Despatch (2-3 Day Insured Delivery to: le9 9hb): £4.99 UK VAT 17.5%: £17.58 UK VAT 17.5%: £17.58

Total: £123.03

Total: £123.03

 

 

Anyone have / had the same issue and any ideas on how to fix it??

 

It doesnt happen for any other payment method just PayPal IPN

 

Thanks

 

Julian

Link to comment
Share on other sites

Hi Everyone...

I have the PayPal IPN v2.3.4.7 installed, also One Page Checkout and Held Orders.

 

Now the thing that is happening to me is when a customer orders with the PayPal IPN payment method, the order comes through twice in the admin (same order number, just duplicate) and the order emails has this in:

 

Products

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

1 x ASUS SKT-AM3 M4A89GTD PRO/USB3 S/V/L 5200MT/s (102044) = £118.04

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

Sub-Total: £118.04

Sub-Total: £118.04

2-3 Day Courier Despatch (2-3 Day Insured Delivery to: le9 9hb): £4.99

2-3 Day Courier Despatch (2-3 Day Insured Delivery to: le9 9hb): £4.99 UK VAT 17.5%: £17.58 UK VAT 17.5%: £17.58

Total: £123.03

Total: £123.03

 

Anyone have / had the same issue and any ideas on how to fix it??

It doesnt happen for any other payment method just PayPal IPN

Thanks

Julian

 

Hi Julian

 

I can't give you a definitive answer, but I can give you a few areas to look at for the cause of this.

 

First though - did you spot that your VAT is not included in the total price?

Here's my guess on that - PayPal has two IPN files in the IPN install. One is in the catalog/ext/..../paypal/ folder - that one is the IPN responder which receives the3 data from PayPal about a transaction and updates the order status in admin. For the order total problem, you can ignore that one, and for the duplication issue, it's very unlikely to be causing it, but you never know, as you say the order number is also duplicated.

 

The other paypal_ipn file is in catalog/includes/modules/payments/paypal/ this is the one most likely to be the source of the order total problem and there's been loads of discussion posting detailed problems and the fixes, regarding that file. Normally, using the aggregate tax method clears it - don't worry too much about VAT accounting issues on the payment processor - you account for VAT from the invoice and in your accounting system, not at PayPal. This problem has been a long-running "open sore" with the open source PayPal modules.

 

That second paypal_ipn is possibly, though unlikely, the cause of the order detail duplication - generally though, I'd say that if it was the source, then your invoices would be double the total price too, and you'd be spotting that pretty fast.

 

My guess would be that the one-page checkout is echoing with the original checkout flow somewhere - probably in the order confirmation area. In the normal checkout flow, the last page of the process is where the order is written to the database and assigned the order/invoice number, then the whole is passed to the customer chosen payment module. Logic says that it's most likely at this point that the database is being written to twice,

 

You've said the order is duplicated - but did you check if the order.invoice number is identical? (On the admin home page, hover your mouse over each order and look at the status bar at the bottom of the screen - it'll show the order/invoice number in the URL for the order).

 

If the order number is identical for both, then you have a two step problem - osC is "printing" the order twice to screen as well as to the emails - that should be the easier to kill problem. Look for code duplication, or if the default checkout process is still active and working in parallel to the one-page checkout, instead of being replaced by one-page. If it's identical and in the database as two separate orders with the same number (which should be impossible given the auto-numbering osC uses with SQL) then you've got bigger issues - do you know how to use phpMyAdmin to inspect the database content and structure directly? You'll likely need to do that anyway - to verify if the problem is in the order recording, or in the osC use of the data after it's recorded.

 

Sorry I can't drill straight to the problem, but hope the above helps you find it.

 

Gaz

Wearing a seatbelt prevents head injuries when the computer crashes - - - Yeah Right!!! - not in this office.

Link to comment
Share on other sites

Hi Julian

 

I can't give you a definitive answer, but I can give you a few areas to look at for the cause of this.

 

First though - did you spot that your VAT is not included in the total price?

Here's my guess on that - PayPal has two IPN files in the IPN install. One is in the catalog/ext/..../paypal/ folder - that one is the IPN responder which receives the3 data from PayPal about a transaction and updates the order status in admin. For the order total problem, you can ignore that one, and for the duplication issue, it's very unlikely to be causing it, but you never know, as you say the order number is also duplicated.

 

The other paypal_ipn file is in catalog/includes/modules/payments/paypal/ this is the one most likely to be the source of the order total problem and there's been loads of discussion posting detailed problems and the fixes, regarding that file. Normally, using the aggregate tax method clears it - don't worry too much about VAT accounting issues on the payment processor - you account for VAT from the invoice and in your accounting system, not at PayPal. This problem has been a long-running "open sore" with the open source PayPal modules.

 

That second paypal_ipn is possibly, though unlikely, the cause of the order detail duplication - generally though, I'd say that if it was the source, then your invoices would be double the total price too, and you'd be spotting that pretty fast.

 

My guess would be that the one-page checkout is echoing with the original checkout flow somewhere - probably in the order confirmation area. In the normal checkout flow, the last page of the process is where the order is written to the database and assigned the order/invoice number, then the whole is passed to the customer chosen payment module. Logic says that it's most likely at this point that the database is being written to twice,

 

You've said the order is duplicated - but did you check if the order.invoice number is identical? (On the admin home page, hover your mouse over each order and look at the status bar at the bottom of the screen - it'll show the order/invoice number in the URL for the order).

 

If the order number is identical for both, then you have a two step problem - osC is "printing" the order twice to screen as well as to the emails - that should be the easier to kill problem. Look for code duplication, or if the default checkout process is still active and working in parallel to the one-page checkout, instead of being replaced by one-page. If it's identical and in the database as two separate orders with the same number (which should be impossible given the auto-numbering osC uses with SQL) then you've got bigger issues - do you know how to use phpMyAdmin to inspect the database content and structure directly? You'll likely need to do that anyway - to verify if the problem is in the order recording, or in the osC use of the data after it's recorded.

 

Sorry I can't drill straight to the problem, but hope the above helps you find it.

 

Gaz

 

Hi Gaz

 

The order numbers in admin are the same in both duplicates..

 

What kind of code examples would I need to look for?

 

Thanks

 

Julian

Link to comment
Share on other sites

Julian Hi

 

The more I think about this, the more it feels it has to be due to the one page checkout - I've not implemented that on any of my sites yet, but can you check through the install instructions carefully looking for any code that tells you to delete / comment out hooks to the original checkout flow. Make sure you followed those accurately.

 

Are you getting the same duplication from other payment processor modules? Or is it solely the PayPal one?

Have a look at the module's contribution page in the repository, I seem to remember that the version you're using had some issue with being for German language sites only (or something like that).

 

Unfortunately I don't have time to root around in this too deeply right now as I've got five complete site build, config, and style jobs to finish before month end and the job only arrived yesterday so nothing's been started on it yet.

 

Good luck

Gaz

Wearing a seatbelt prevents head injuries when the computer crashes - - - Yeah Right!!! - not in this office.

Link to comment
Share on other sites

I have an issue on PayPal e-mail receipt. Assume that there's a product which is USD 1 on the store. If a customer wants to buy 5 of them, in that case the total should be USD 5/-

 

Once the customer makes the payment, I receive an e-mail from PayPal stating "NOTIFICATION OF PAYMENT RECEIVED". There, it doesn't show the exact QUANTITY. Even though customer has purchased 5 quantities, PayPal e-mail notification still indicates as 1 quantity and the price is accurate.

 

However, on my osCommerce admin portal, exact quantity and exact price displays. Do you know where the issue is?

Link to comment
Share on other sites

Julian Hi

 

The more I think about this, the more it feels it has to be due to the one page checkout - I've not implemented that on any of my sites yet, but can you check through the install instructions carefully looking for any code that tells you to delete / comment out hooks to the original checkout flow. Make sure you followed those accurately.

 

Are you getting the same duplication from other payment processor modules? Or is it solely the PayPal one?

Have a look at the module's contribution page in the repository, I seem to remember that the version you're using had some issue with being for German language sites only (or something like that).

 

Unfortunately I don't have time to root around in this too deeply right now as I've got five complete site build, config, and style jobs to finish before month end and the job only arrived yesterday so nothing's been started on it yet.

 

Good luck

Gaz

 

Hi Gaz,

 

Thanks for your reply, and I can confirm it nly does it with the PayPal module...

 

Thanks

 

Julian

Link to comment
Share on other sites

Hi Gaz,

 

Thanks for your reply, and I can confirm it nly does it with the PayPal module...

 

Thanks

 

Julian

 

Have you by any chance got more than one PayPal module active and installed? Just a wild thought that popped into my head.

Also, don't know if this is possible or not, but have you got hard-coded embedded calls to an inactive PayPal module as well as to your active IPN? On-screen duplication I would expect to be due to duplicate code, but not normally to cause duplicate entries in the database - the "unique key" per table should prevent that. If you could check your database tables using phpMyAdmin and grab the row numbers and unique key column entries, it might help reveal if the problem is with the database, the write-to-database code, or with duplicate transaction (PayPal) code inside your site. If you see what I mean? If the problem is there and you can't fix it yourself, you'll probably need to put out a call for paid support from a competent PHP/SQL developer.

 

Busy deep in the throes of site building - don't count on me being around here much before the end of next week.

 

Gaz

Wearing a seatbelt prevents head injuries when the computer crashes - - - Yeah Right!!! - not in this office.

Link to comment
Share on other sites

  • 2 weeks later...

I have been searching this thread for four hours, I hope someone can help me out!! I installed 2.3.4.7 which appears to me to be the last english version. I've been testing it and here's what I'm getting:

 

Orders do show up in Admin

Payment does show up in Paypal, I get normal confirmation email from Paypal

 

I never get a confirmation email (as the customer or the shop owner)

I get error emails from Paypal:

PayPal IPN Invalid Process

$_POST:

 

mc_gross=15.00

invoice=6

 

protection_eligibility=Eligible

address_status=confirmed

payer_id=xxxxxxxxxx

tax=0.00

address_street=xxxxxxxxxx

payment_date=15:31:28 Apr 04 2010 PDT

 

payment_status=Completed

charset=windows-1252

address_zip=xxxxx

first_name=xxxxxxxxxx

mc_fee=0.74

 

address_country_code=US

address_name=xxxxxxxxxx

notify_version=2.9

custom=11

payer_status=unverified

[email protected]

address_country=United States

address_city=xxxxxxxxxx

quantity=1

verify_sign=AiPC9BjkCyDFQXbSkoZcgqH3hpacADv1CkHIOzo0KxRXyF2ihQ4mcB0a

 

payer_email=xxxxxxxxxx

txn_id=7VS675029S402735C

 

payment_type=instant

last_name=xxxxxxxxxx

address_state=TX

receiver_email=xxxxxxxxxx

payment_fee=0.74

 

receiver_id=L8ME2KBYBXW2S

txn_type=web_accept

item_name=xxxxxxxxxx

mc_currency=USD

item_number=

residence_country=US

receipt_id=1952-8478-1360-1838

 

handling_amount=0.00

transaction_subject=11

payment_gross=15.00

 

When I look at the order in Admin, It shows as pending and when I click on it, I see this in the status: PayPal IPN Invalid [Completed]

 

There is also a big red X next to the customer notified box.

 

In my IPN settings in Paypal, I've tried having no URL, mysite.com/ext/modules/payment/paypal_ipn/ipn.php and mysite.com/includes/modules/payment/paypal_ipn.php None of them seem to make a difference.

 

Can anyone please help me?? TIA

Link to comment
Share on other sites

I have been searching this thread for four hours, I hope someone can help me out!! I installed 2.3.4.7 which appears to me to be the last english version. I've been testing it and here's what I'm getting:

 

Orders do show up in Admin

Payment does show up in Paypal, I get normal confirmation email from Paypal

 

I never get a confirmation email (as the customer or the shop owner)

I get error emails from Paypal:

 

 

When I look at the order in Admin, It shows as pending and when I click on it, I see this in the status: PayPal IPN Invalid [Completed]

 

There is also a big red X next to the customer notified box.

 

In my IPN settings in Paypal, I've tried having no URL, mysite.com/ext/modules/payment/paypal_ipn/ipn.php and mysite.com/includes/modules/payment/paypal_ipn.php None of them seem to make a difference.

 

Can anyone please help me?? TIA

 

 

There is an IPN file in this Module.

It is to process the backend IPN post.

The code of that files feels that there is something wrong in the order placed and the IPN recd so it results in invalid IPN.

 

You need to debug that file.

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Link to comment
Share on other sites

There is an IPN file in this Module.

It is to process the backend IPN post.

The code of that files feels that there is something wrong in the order placed and the IPN recd so it results in invalid IPN.

 

You need to debug that file.

 

Satish

 

OK, well I haven't changed anything in the ipn.php file that came with the package so I'm not too cure where to start. I do have two e-mail addresses associated with my paypal account. The business one and a personal one. I made the business one the primary. I saw that someone earlier was having some issue with having multiple email addresses so I'm not sure if I need to do anything different.

 

Should I post the code from the ipn.php file here? Like I said, its the standard one that came with the package 2.3.4.7

Link to comment
Share on other sites

  • 2 weeks later...

Hi everyone,

 

Ive just spent the last two hours redinbg each page here but I cant seem to find any reference to my problem.

 

I have just password protected my Admin folder, and now the order email is not being sent. As soon as I remove password protection from my admin folder then the order emails suddenly work again. Has anyone encountered this problem, and have you found a solution.

 

Any help would be greatly appreciated.

 

Regards!

Link to comment
Share on other sites

Hi everyone again, please disregard that last post, the password on my admin dosnt seem to interfere with the update.

 

I have just tested with the sandbox and it seems the paypal customer emails are going out, but the status is not being updated in admin and I am not receiving the update email, just payment received, but only for the rest of the world. Now the strange this is that sandbox test Australian customer works correctly and updates properly, very strange considering my hosting is in the USA.

 

I should also note the my configuration has not been touched at all and none of the files have been modified in any way.

 

Is it possible that paypal is having some issues etc? Im kinda lost as its strange to have the module work perfectly one moment then the next its playing up for no reason...

 

Again, sorry for my ramblings, I hope they make sense. Any help would be appreciated.

 

Cheers!

Link to comment
Share on other sites

Hi everyone, in reference to my last post, I have just received 4 very strange emails from my store (I think?) with the following content:

 

Subject: PayPal IPN Invalid Process

 

$_POST:

 

 

$_GET:

 

Thats it, thast all thats in the email and this is now 5-6 hours after paypal payment has been received but no update on admin side from various sales.. this is now starting to worry me, absolutley no changes whatsoever have been made to any files with normal sales going through and now all of a sudden this module, or maybe paypal itself is playing up within the last 24 hours...

 

If anyone has encountered this problem, could they please reply, any help, again, is greatly appreciated.

 

Cheers!

Link to comment
Share on other sites

I installed this for my store. Version 2.3.4.6 and when I did that, it tells me to go to admin and enable 'Paypal IPN' but that option isn't there.

 

None of the files required me to modify admin either. I am using V2.2 RC2 and I see this contribution is for MS2. IS that the problem?

 

Anybody with an RC2 store can you tell me what module version you use?

Contributions installed: Purchase without Account / STS/ All Products/ Header Tags Controller

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