Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Official PayPal IPN Support Thread


Mark Evans

Recommended Posts

Hi everybody :-)

 

i've just read this entire (loooong) thread looking for a solution to a little problem i'm having, but i didn't find one...

 

i'm running ms2.2 with the current ipn contrib, download manager 5.3 and the email subject order number status contrib with sandbox.

 

IF i have autoreturn deactivated in the paypal profile, the following steps execute ok:

1) on confirmation stage, an order with "preparing" status is generated, as intended without customer notification

2) upon payment, status is updated to the status selected in the ipn payment module settings (which is the status that will allow download of the purchased file, set in the download manager settings)...so ipn basically works

3)when the customer returns to the checkout success page by clicking continue, he receives an order confirmation email (with the order number in the subject) and is able to download the file (if paypal hasn't been lagging with the ipn verification, that is). Note that this happens *after* the status was set to "confirmed" by the ipn verification executing correctly.

 

So far so good....nearly. The customer *does* receive the checkout-success confirmation email, but he *does not* get notified that the order status has been updated to "verified" status. Actually, in the order admin history, the order of things is reversed:

 

Date Added Customer Notified Status Comments

12/11/2005 20:42:14 X Confirmed PayPal IPN Verified [Completed (Unverified; 1.16EUR)]

12/11/2005 20:42:22 yes Preparing

 

status: confirmed

 

(before ipn verification was completed, entry #1 had status "preparing")

 

This is obviously not much of a problem when ipn lag is near-zero, as the customer will be able to immediately download his file and will probably not care much wether he gets another "status updated" notification email or not....but if the verification process takes a while, the cutomer will first see that "downloads are not available before payment is verified" and will obviously want to be notified when the verification is done and he can download his files (as he would usually be when the status of his order is updated manually). Actually i suspect that this issue may not arise at all when the ipn verification *is* laggy as it will probably usually be in a live setting ( it looks like returning to the checkout succes triggers the second entry listed above after the ipn verification set the status to confirmed, which seems to be a result of ipn verification being faster than the customer returing to the site)....but this needs to be tested before the shop can go online.

 

Now i thought i'd be smart and just force returning to the site to happen before the ipn verification process completes by enabling auto-return in the paypal profile. This basically results in the status not being updated at all, though the comment contains "paypal ipn verified..."

 

Date Added Customer Notified Status Comments

12/11/2005 20:42:14 X Preparing PayPal IPN Verified [Completed (Unverified; 1.16EUR)]

12/11/2005 20:42:22 yes Preparing

 

status: preparing

 

So this seems like a no-go route....argh

 

Any ideas how i can cause a status-update notification to be sent?

 

thx in advance,

denis

Link to comment
Share on other sites

PayPal IPN Address Change During Checkout, Not updating Order (osc PayPal IPN contribution)

 

I think this might be related to this bug report but I'm not sure if anyone has come up with a workaround:

http://www.oscommerce.com/community/bugs,2498

 

(A) Customer places order with Ship-to address 'A'

 

(B) Changes address during checkout to 'B'

 

(C ) Pays in Paypal - Paypal has correct address 'B'

 

(D) Info is returned from PayPal - order status is updated but order info still has 'A' address

 

(E) Order email and PayPal email have correct 'B' address but order record still has 'A' address

 

When you print out the order or packing slip, it's showing the old 'A' ship address, so you end up mistakingly shipping to the incorrect address unless you manually compare the email.

 

Any suggestions on how to update the order with the revised 'B' shipping address?

 

Thanks ...

 

Hiya,

 

I've hit this too and seem to have fixed it.

 

I have messed hugely with my checkout code so unfortunately can't guarantee this'll work for others, but for what it's worth:

 

add

$cart->cartID = $cart->generate_cart_id();

into checkout_shipping.php at about line 47:

  if (!tep_session_is_registered('cartID')) tep_session_register('cartID');
 $cart->cartID = $cart->generate_cart_id();   //<- this is the new line
 $cartID = $cart->cartID;

 

Please do & backup & test it well!

Let me know if it works & I'll update the bug report. The problem also affects the billing address so I'm going to see if the same approach will solve that too.

 

annA

Edited by Anna
Link to comment
Share on other sites

Nope .. this doesnt work.

 

The thing thats strange tho ... is that once you go to the first PayPal screen .. the dollar value is at $0.00 If the person changes their mind and just clicks the BACK button to go back to the store... then clicks on My Account ... the item is listed as a purchased item. If it was a Downloadable Item .. the item is now showing the download link and they can get it for free.

Link to comment
Share on other sites

$cart->cartID = $cart->generate_cart_id();

into checkout_shipping.php at about line 47:

  if (!tep_session_is_registered('cartID')) tep_session_register('cartID');
 $cart->cartID = $cart->generate_cart_id();   //<- this is the new line
 $cartID = $cart->cartID;

 

Please do & backup & test it well!

Let me know if it works & I'll update the bug report. The problem also affects the billing address so I'm going to see if the same approach will solve that too.

 

annA

Seems to work for me.

Link to comment
Share on other sites

(Re: PayPal IPN Address Change During Checkout, Not updating Order & http://www.oscommerce.com/community/bugs,2498 )

 

Seems to work for me.
Great news thanks. :)

 

I'm less sure when it comes to the billing address as I don't use checkout_payment.php, so my untested suggestion would be to add

$cart->cartID = $cart->generate_cart_id();
$cartID = $cart->cartID;

at line 37 i.e. just after the "// avoid hack attempts" block.

 

I hope these changes don't affect the hack detection, which I've yet to check, but frankly it's more important to me that the correct addresses get saved!

 

anNa

Link to comment
Share on other sites

(Re: PayPal IPN Address Change During Checkout, Not updating Order & http://www.oscommerce.com/community/bugs,2498 )

 

Great news thanks. :)

 

I'm less sure when it comes to the billing address as I don't use checkout_payment.php, so my untested suggestion would be to add

$cart->cartID = $cart->generate_cart_id();
$cartID = $cart->cartID;

at line 37 i.e. just after the "// avoid hack attempts" block.

 

I hope these changes don't affect the hack detection, which I've yet to check, but frankly it's more important to me that the correct addresses get saved!

 

anNa

 

As far as I can tell this works. I went to the confirmation page and then edited my billing address and then went through paypal and the invoice has the correct billing address. this is my block of code. Please correct anything that may look wrong.

// avoid hack attempts during the checkout procedure by checking the internal cartID
 if (isset($cart->cartID) && tep_session_is_registered('cartID')) {
if ($cart->cartID != $cartID) {
  tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
}
 }
// added to fix billing address change bug from post http://www.oscommerce.com/forums/index.php?s=&showtopic=179917&view=findpost&p=757486
$cart->cartID = $cart->generate_cart_id();
$cartID = $cart->cartID;

Link to comment
Share on other sites

Hello All,

 

Paypal is working great on my site! One issue - is there a way to add a handling fee for PayPal orders to offset the higher rates?

 

The idea would be to add $5.00 to every order total when purchased with PayPal and not add when purchased through our credit card portal.

 

Any ideas would be appreciated.

 

Steve

Link to comment
Share on other sites

this paypal inp is a complete nightmare.

 

i went back to a new installation of oscommerce and paypal settings and went through it step by step.

 

no matter what i do when i click confirm order the amount reads zero.

 

payapl does not copy the cart amount.

 

i have been trying for weeks to get this working with every module availible and cannot find any answers anywhere to this problem.

 

trying new installations and different modules the problem is the same so must have something to do with the notify_url post but i do not understand how it works yet.

 

anyone know how to fix this problem please let me know.

Link to comment
Share on other sites

hi everybody....

 

as noone replied to my earlier question, let me re-phrase it (maybe no-one liked to read such a long post? ;-) )

 

i'm using ms2.2 with the ipn module and download manager. the idea is to enable downloads only after the payment has been confirmed via ipn. this basically works, as long as payment isn't verified, the cutomer will see the "red link", once payment *is* verified, he can download the files. the problem i'm having is that the order-status update generated by the ipn module does not trigger a customer-notification of this status update....so either a)he'll have to keep coming back to his account to see wether he now may download his product (which isn't a very customer-friendly thing) or B) i have to manually set his order status to an even higher status like "shipping" to trigger the notification....which means the customer will have to wait for me to do that and if he's in a different time-zone that may take a while (not exactly instant graftification).

 

i guess either i'm doing something wrong or i need to edit the paypal_ipn.php....how would i go about this?

 

 

thx in advance.

denis

Link to comment
Share on other sites

  • 3 weeks later...

well i figured out a not-so-elegant temporary solution to the customer notification-on-automated-status-change (i'm doing it *manually* now...great :-( )

 

BUT paypal ipn module seems to sometimes not pass on the sales tax to paypal....somewhat randomly the customer will be charged the net amount only. now this *is* a show-stopper. is this a known issue with osc or paypal? any ideas? please help, my shop is live and this is costing me real-world cash.

 

cheers,

ssfx

Link to comment
Share on other sites

Could someone offer some help please :-)

 

We have a live store on www.lingerie-confidential.co.uk which has been running PayPal IPN version 2.8 for over a year without fault.

 

All of a sudden we have stopped receiveing papypal orders and this can be tracked to a problem with the system when it sends the customer over to the Paypal site.

 

At the point at which the customer selects to pay by Paypal and clicks continue, this takes them to the Paypal site - but nothing more - they are asked to log in on the standard homeapge and are given no order details or anything to pay...

 

Can anyone hazard a suggestion as to why this may be?

 

I have disabled and re-enabled the contribution and re-uploaded the paypal module file to ensure all the correct files are in place however the issue continues...

 

I would appreciate some help!

 

The only other changes made to the store recently are the osCommerce 2.2 Milestone 2 Update 051113 which addressed the security issues in OsC.

 

Thanks

 

Jos

===============

Simple yet Creative

Get Online Web Design : getonlinedesign.com

===============

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.
Note: Your post will require moderator approval before it will be visible.

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