Jump to content
Mark Evans

Official PayPal IPN Support Thread

Recommended Posts

Questions:

Is it recommended to Enable Encrypted Web Payments

 

Are these settings required:

Your Private Key

Your Public Certificate

PayPals Public Certificate

Your PayPal Public Certificate ID

Working Directory

Share this post


Link to post
Share on other sites

Not getting the update on the Acknowledged Order Status. Transaction completes, I get my money and all the notifications via email. And auto-return works, the customer is sent back to my website.

 

 

Appreciate any help.

Share this post


Link to post
Share on other sites
Is it recommended to Enable Encrypted Web Payments

I've got cURL enabled on my server so I've left the above empty and don't use the encrypted web payments. 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 **

Share this post


Link to post
Share on other sites
Not getting the update on the Acknowledged Order Status. Transaction completes, I get my money and all the notifications via email. And auto-return works, the customer is sent back to my website.

Appreciate any help.

Is the IPN off in your PayPal account and the ipn.php correcty in the /ext/... directory? That file controls the update. 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 **

Share this post


Link to post
Share on other sites

Hi everyone,

I was hoping someone can direct me to the right file to check look at.

 

I've solved all my problems and have finally installed many contributes and everything seems to be working. I've used to search feature for everything.

 

However, due to (i suppose) the key words i'm choosing, I can't seem to find a straight answer for my question.

 

I am using the most recent version of this paypal module. Everything works, the money is transferred and both the customer and myself are notified of the sale. The problem is, the "Order Process" email sent to the customer is being sent twice. This does not happen any other time (ie: when i change the status). It just sends it twice initially.

 

I don't even know where to begin looking. Can anyone point me in the right direction? Thanks!

Share this post


Link to post
Share on other sites
I am using the most recent version of this paypal module. Everything works, the money is transferred and both the customer and myself are notified of the sale. The problem is, the "Order Process" email sent to the customer is being sent twice. This does not happen any other time (ie: when i change the status). It just sends it twice initially.
Without knowing more about your site, it's hard to advise but I'd try to narrow down your problem.

 

Where are the duplicate emails coming from? One possibility is that both checkout_proces.php and paypal_ipn.php are sending emails (if working corectly, only paypal_ipn.php would send the email). To test this, you could e.g. add a unique text to the email sent from paypal_ipn.php and then test.

 

If both emails contain the text, focus on paypal_ipn.php. If one does, the other doesn't, then both files are sending one email each and you can start investigating why the code in paypal_ipn.php doesn't trigger the corect behaviour. If neither contains the text, then it's checkout_process misbehaving.

 

I hope the above helps - 99% of the battle is won once you can tell which piece of code needs tweaking. all the best, 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 **

Share this post


Link to post
Share on other sites
Without knowing more about your site, it's hard to advise but I'd try to narrow down your problem.

 

Where are the duplicate emails coming from? One possibility is that both checkout_proces.php and paypal_ipn.php are sending emails (if working corectly, only paypal_ipn.php would send the email). To test this, you could e.g. add a unique text to the email sent from paypal_ipn.php and then test.

 

If both emails contain the text, focus on paypal_ipn.php. If one does, the other doesn't, then both files are sending one email each and you can start investigating why the code in paypal_ipn.php doesn't trigger the corect behaviour. If neither contains the text, then it's checkout_process misbehaving.

 

I hope the above helps - 99% of the battle is won once you can tell which piece of code needs tweaking. all the best, Terra

 

Wow, thank you very much, Terra. You nailed it right on the head. I didn't know where to even begin looking but you got it. Just so others know:

 

I found the following code in both checkout_process.php and paypal_ipn.php

 

  tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

// send emails to other people
 if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
 }

 

I figured checkout_process would be the problem so I deleted this section of the code in that file only. Now the buyer gets 1 email instead of 2. Thanks again! :thumbsup:

Share this post


Link to post
Share on other sites

quick question about this contribution.

after installing it will buyers still be required to have a paypal account to checkout?

im hoping it doesnt.

Share this post


Link to post
Share on other sites
quick question about this contribution.

after installing it will buyers still be required to have a paypal account to checkout?

im hoping it doesnt.

Buyers have a choice of paying with or without account. But be aware that if a customer chooses to pay without opening an account, they will get lots of "pester" messages (would you like to open an account now?). I'd recommend testing this for yourself - you can always refund yourself later. 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 **

Share this post


Link to post
Share on other sites
I figured checkout_process would be the problem so I deleted this section of the code in that file only. Now the buyer gets 1 email instead of 2. Thanks again!

I would not have recommended deleting the code actually - checkout_process.php is the main checkout function and if you want to use any other payment method (e.g. payment by cheque), then the email now won't work.

 

My suggestion would have been to investigate why your shop is sending emails from both files - that the code is duplicated is normal but usually the email is sent only once.

 

As long as you don't need to use any other payment methods, then you're workaround will be okay, but if you ever need to use something else together with PayPal, it will be necessary to get to the root of the problem.

 

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

Share this post


Link to post
Share on other sites
Are you're sure the files are all uploaded and in the correct place? The error looks like it just can't find the necesary paypal_ipn.php file. Terra

 

Yes your right. The paypal_ipn.php file was not uploaded in the languages... folder. Thought i had done that.

 

Many thanks for your help :thumbsup:

Share this post


Link to post
Share on other sites
Is the IPN off in your PayPal account and the ipn.php correcty in the /ext/... directory? That file controls the update. Terra

 

 

Yes. Any other suggestions?

Share this post


Link to post
Share on other sites

hi, first of all i would like to say excellent for such contribution, thanks for the hardwork.

 

i got a fresh installation with global register off patch, everything works fine. for this contribution, i'm able to proceed to the sandbox, finish payment and received the confirmation email. However, the sales is not recorded at all. Initially i thought is the global register issue, but after reading some of the posts here and checked my installation, i'm with the contribution that support global register off as well.

 

Any idea? Is there any other area that i must check?

 

cheers.

Share this post


Link to post
Share on other sites
Any other suggestions?

Without more info, no. Would help if you could tell us a bit more whether you made any mods to the files, what status your orders show, what order stats you have defined in your PayPal settings and basically anything else that could impact on ipn.php and order updates. Things which matter: what is the order status when customers reache checkout_confirmation.php? Is the order pre-stored at that stage? Does the order status change when payment has been made (before returning to the site)? 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 **

Share this post


Link to post
Share on other sites
i got a fresh installation with global register off patch, everything works fine. for this contribution, i'm able to proceed to the sandbox, finish payment and received the confirmation email. However, the sales is not recorded at all. Initially i thought is the global register issue, but after reading some of the posts here and checked my installation, i'm with the contribution that support global register off as well.

<_< okay, not sure what's going on here - the order should be stored as soon as a customer goes to checkout_confirmation.php. Can you just check that all files are in their correct location from this contrib:

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

And can you confirm that you correctly installed this contrib:

http://www.oscommerce.com/community/contri...search,register

and that register globals is OFF on your server?

sorry, but have not other ideas. 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 **

Share this post


Link to post
Share on other sites

thanks for the quick reply. i installed the same contributions and my server's globals is OFF.

 

i didnt do any changes on paypal mod, when i reach checkout_confirmation.php, no order is recorded, after i proceed to paypal and finish my payment, redirected back to checkout_success.php no payment is recorded as well.

 

when i try to print out the variable (cardID) in checkout_confirmation.php, it is there. in the payment confirmation mail, the link to my order is there but without any transaction id.

 

 

my ipn setting in oscommerce

PayPal IPN

 

Enable PayPal IPN Module

True

 

Move tax to total amount

True

 

E-Mail Address

store@store.com

 

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

 

 

Debug E-Mail Address

mymail@gmail.com

 

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

 

 

OpenSSL Location

/usr/bin/openssl

Share this post


Link to post
Share on other sites

this is what i have after paypal payment is done. looks like the "id" is empty.

 

<input type="hidden" id="" name="txn_type" value="web_accept"><input type="hidden" id="" name="payment_date" value="10:25:12 Jul 03, 2006 PDT"><input type="hidden" id="" name="last_name" value="my name"><input type="hidden" id="" name="residence_country" value="SG"><input type="hidden" id="" name="pending_reason" value="unilateral"><input type="hidden" id="" name="item_name" value="Shevron Embroidery"><input type="hidden" id="" name="payment_gross" value="15.25"><input type="hidden" id="" name="mc_currency" value="USD"><input type="hidden" id="" name="payment_type" value="instant"><input type="hidden" id="" name="verify_sign" value="AFcWxV21C7fd0v3bYYYRCpSSRl31Ag-MqCtH3ihezG7yJyXeo9pvwHLl"><input type="hidden" id="" name="payer_status" value="unverified"><input type="hidden" id="" name="test_ipn" value="1"><input type="hidden" id="" name="tax" value="0.00"><input type="hidden" id="" name="payer_email" value="myemail"><input type="hidden" id="" name="txn_id" value="0"><input type="hidden" id="" name="quantity" value="1"><input type="hidden" id="" name="receiver_email" value="store email"><input type="hidden" id="" name="first_name" value="Goh"><input type="hidden" id="" name="payer_id" value="6WTKNQVTNGMXJ"><input type="hidden" id="" name="item_number" value=""><input type="hidden" id="" name="payment_status" value="Pending"><input type="hidden" id="" name="shipping" value="1.00"><input type="hidden" id="" name="mc_gross" value="15.25"><input type="hidden" id="" name="custom" value="2"><input type="hidden" id="" name="charset" value="windows-1252"><input type="hidden" id="" name="notify_version" value="2.1">

Share this post


Link to post
Share on other sites
thanks for the quick reply. i installed the same contributions and my server's globals is OFF.

 

i didnt do any changes on paypal mod, when i reach checkout_confirmation.php, no order is recorded, after i proceed to paypal and finish my payment, redirected back to checkout_success.php no payment is recorded as well.

 

when i try to print out the variable (cardID) in checkout_confirmation.php, it is there. in the payment confirmation mail, the link to my order is there but without any transaction id.

my ipn setting in oscommerce

 

Does your e-mail confirmation contain an ordernumber?


Norman in 't Veldt

 

Moderator

osCommerce The Netherlands

Share this post


Link to post
Share on other sites
Without more info, no. Would help if you could tell us a bit more whether you made any mods to the files, what status your orders show, what order stats you have defined in your PayPal settings and basically anything else that could impact on ipn.php and order updates. Things which matter: what is the order status when customers reache checkout_confirmation.php? Is the order pre-stored at that stage? Does the order status change when payment has been made (before returning to the site)? Terra

 

 

I have not made any mods that should affect this. I am using the standard order status settings. When a customer is at the OSC Order Confirmation page, the status is "Preparing [PayPal IPN]" and the order does show up in the listing of orders in Admin. The order status does NOT change when payment is made, however the payment is received and I do receive all email notifications. I am not sure waht you mean by order status changing when payment is made BEFORE returning to site. Is there some status change I need to be aware of, other than the "Pending" which I am not getting. NOTE, I was previously using another PayPal IPN contribution, but reverted back to previous saved files to use this contribution. When using that previous PayPal contribution, the order status was successfully modified to "Pending" after the payment was made.

Share this post


Link to post
Share on other sites
i didnt do any changes on paypal mod, when i reach checkout_confirmation.php, no order is recorded, after i proceed to paypal and finish my payment, redirected back to checkout_success.php no payment is recorded as well.

when i try to print out the variable (cardID) in checkout_confirmation.php, it is there. in the payment confirmation mail, the link to my order is there but without any transaction id.

Not good - the PayPal IPN should store the order as soon as you reach checkout_confirmation.php, which means that the whole thing is buggered from the start. Or in more professional terms ... the "function confirmation()" is failing and from that point on, nothing else would work as expected.

 

The cartID is a red herring - it's often empty. There is a fix by zoeticlight:

http://forums.oscommerce.com/index.php?sho...mp;#entry681495

could you try that & see if it makes any difference?

 

Also - what version of PHP are you on? just clasping at straws really :blush: 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 **

Share this post


Link to post
Share on other sites
I have not made any mods that should affect this. I am using the standard order status settings. When a customer is at the OSC Order Confirmation page, the status is "Preparing [PayPal IPN]" and the order does show up in the listing of orders in Admin. The order status does NOT change when payment is made, however the payment is received and I do receive all email notifications. I am not sure waht you mean by order status changing when payment is made BEFORE returning to site. Is there some status change I need to be aware of, other than the "Pending" which I am not getting. NOTE, I was previously using another PayPal IPN contribution, but reverted back to previous saved files to use this contribution. When using that previous PayPal contribution, the order status was successfully modified to "Pending" after the payment was made.

 

Okay two answer:

 

Auto return URL in your PayPal account - latest advice is to leave empty as all the info is sent by the IPN automatically. Same goes for the IPN notification URL - should be empty in your PayPal account. This info will be updated in the next release.

 

The failure to update can have several causes:

1. PayPal can't find the file ipn.php (wrong location / wrong URL specified in PayPal account)

2. The order does not validate (you should get "invalid" warnings - always make sure to enter an email address under the debug email address to receive all notifications)

3. the orderID is missing

 

One way to check at which stage the ipn.ph fails is to enter emails at key stages - based on which emails you receive you then know which stage of the code fails. It's what I normally use to start debugging and although a bit clunky does the job.

 

Also - if you switched between versions recently, make sure that you are using the latest files from the contrib section for all three files.

 

What I mean by order status changing before customes return to your site is that if the IPN is working correctly, then it will update the status as soon as customers pay, even if they are still on the PayPal site.

 

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

Share this post


Link to post
Share on other sites
One way to check at which stage the ipn.ph fails is to enter emails at key stages - based on which emails you receive you then know which stage of the code fails. It's what I normally use to start debugging and although a bit clunky does the job.

 

 

Have you got some code for this emailing that you can share.

 

Thanks

MM

Share this post


Link to post
Share on other sites
Okay two answer:

 

 

The failure to update can have several causes:

1. PayPal can't find the file ipn.php (wrong location / wrong URL specified in PayPal account)

 

 

How can I tell if its ot finding ipn.php?

Share this post


Link to post
Share on other sites

Hi Terra,

 

Thank you very much for helping to support this contribution :thumbsup: I am having some similar problem with the order status not updating.

 

From the questions you have asked others:

 

The order is "prepared" in the admin section at checkout_confirmation.

My IPN and redirects are turned off in my paypal account.

I adjusted the location of the ipn.php file in paypal_ipn.php as I am running on a test site.

My 'id=""' is empty on page source after the payment is made.

My admin is updated on return from paypal but not on payment while still on paypal.

The ordernumber is recorded on both paypal emails and checkout_process emails.

I have implemented the "letter" fix for "this invoice has already been paid" problem, and this is working correctly as the paypal email retains the letter before the invoice# and the checkout_process email has the letter stripped.

I have download controller installed and have transfered the one line :

'last_modified' => 'now()',

that is changed in checkout_process.php over to paypal_ipn.php.

The order is properly displaying in the customers account, it just never changes from "preparing"!

 

I do not get the INVALID email.

 

So, everything appears to be working up to a point. I am just not sure which point. I also need help with how to add emails at various points in the ipn.php to debug the location of the failure.

 

Thanks again for your support :) :)

 

Sheri

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×