Post by hanskristen » Mon Oct 20, 2008 1:14 pm

Is there a way to set paypals IPN function?

Newbie

Posts

Joined
Mon Oct 20, 2008 11:52 am

Post by bruce » Mon Oct 20, 2008 3:34 pm

In your paypal account setup.

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by Qphoria » Fri Nov 07, 2008 12:00 pm

I'm strangely confused too.. The IPN URL ?
All the posts I read on the forums say you don't need one, and the module handles it.. But Paypal requires it for me to save the IPN setting. So what do I put?

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by bruce » Fri Nov 07, 2008 1:42 pm

If it insists on a value (I am surprised at this) then something like what you would see from "view source" of checkout_confirm
eg:

Code: Select all

<input type="hidden" name="notify_url" value="http://localhost/store/index.php?controller=checkout_process&action=callback&payment=paypal" />
replacing "localhost/store" with the base url of your store.

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by planetgroove » Fri Nov 07, 2008 4:17 pm

Maybe he means that there is no possbility to activate PayPal IPN as a payment-method conveniently by the click of a button in a new installation. You have to do the same as for the languages - with filling in the data for the folder, filename etc., IIRC. Could that be the problem?

http://www.planetgroove.com


New member

Posts

Joined
Sun Oct 26, 2008 12:18 am


Post by Qphoria » Fri Nov 07, 2008 8:23 pm

No I mean at www.paypal.com...where it says "Enable IPN now?" and i click YES... it requires a return url.

Tried leaving just "http://"
Tried leaving just blank

nope..so I don't know how the rest of you are doing it.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by planetgroove » Fri Nov 07, 2008 8:48 pm

What I meant was the original poster ...
:)

Regarding the PayPal IPN URL, it could be either the URL that the IPN-routine sends the buyer to, when he has successfully made the payment, or the URL that is shown, when he cancels the payment on the PayPal-page (there is a link for that, that should send the buyer back to a special shopping cart page, informing him, that he has cancelled the payment. I don't remember exactly but it should be one of those. In other IPN-enabled scripts there is the possibility to set this URL via the form that is posted to PayPal and the contents of the page can be set/altered. As far as I remember PayPal requires some kind of phrase on that special page. Like "Thank you for your purchase ...".

http://www.planetgroove.com


New member

Posts

Joined
Sun Oct 26, 2008 12:18 am


Post by fido-x » Fri Nov 07, 2008 11:08 pm

planetgroove wrote: Regarding the PayPal IPN URL, it could be either the URL that the IPN-routine sends the buyer to, when he has successfully made the payment, or the URL that is shown, when he cancels the payment on the PayPal-page (there is a link for that, that should send the buyer back to a special shopping cart page, informing him, that he has cancelled the payment. I don't remember exactly but it should be one of those. In other IPN-enabled scripts there is the possibility to set this URL via the form that is posted to PayPal and the contents of the page can be set/altered. As far as I remember PayPal requires some kind of phrase on that special page. Like "Thank you for your purchase ...".
You need to log-in to PayPal and configure the return page there. As to which page, that would probably be "checkout_success", so you would probably enter something like

Code: Select all

http://www.yourstore.com/index.php?controller=checkout_success
or

Code: Select all

http://www.yourstore.com/checkout_success.html
if using URL aliasing. But the main issue here, is that you need to set this at the PayPal end.

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by Qphoria » Fri Nov 07, 2008 11:27 pm

Would the return page be checkout_success? or checkout_process?
you could simply type /checkout_success in the url and it will show that page,.... but it doesn't really mean it processed the order

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by fido-x » Fri Nov 07, 2008 11:48 pm

There isn't really a suitable page provided with OpenCart for this purpose. PayPal's instructions tell you that you should have a return page thanking your customers for their payment or informing them that the transaction was not proceeded with if they decide to cancel.

I had to create a page for this purpose to thank people for their donations (not that anybody has made any  ::) )

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by Qphoria » Wed Nov 12, 2008 2:03 am

This is really starting to bother me... as I don't really understand what is happening vs what i would expect to happen with the original paypal and the new improved paypal. All I can say is it works terribly with the original and the new alleged improved version.

Original:
1. Begin Checkout, you get to Checkout_Confirm page and opencart serializes the order and places in in the order_data for temporary storage until the payment is completed
2. Click the "confirm" button and get sent to paypal. Meanwhile, nothing changes on the store and the order is still sitting in order_data table waiting.
3. Make the payment and paypal says "Thank you".
-- Does this have IPN support?
-- If IPN enabled will it send back to the store now?
-- Does customer have to click Return to Merchant to complete the order?


Paypal Improved
1. Begin Checkout, you get to Checkout_Confirm page and opencart serializes the order and places in in the order_data for temporary storage until the payment is completed
2. Click the "confirm" button and get sent to paypal. Meanwhile, nothing changes on the store and the order is still sitting in order_data table waiting.
3. Make the payment and paypal says "Thank you".
-- If IPN enabled, does it send back to the url now? whats the url to specify in paypal?
-- If IPN enabled, does user still need to click "Return to Merchant" ?
-- Where does this new "Paid Unconfirmed" status get used?

What I am seeing with the new paypal improved is:
- I make the payment and it says thank you... the order is still sitting in order_data back at the store.
- If i click "Return To Merchant", the order is processed but put into "Paid Unconfirmed" state. Seems pretty confirmed to me if they followed the return to merchant link.
- If I don't click "Return To Merchant" the order is still lost in the temp order_data table.

It doesn't seem all that improved tbh... but maybe I'm not understanding it

What I thought it should do, which makes a little more sense would be:
- Begin Checkout, get to checkout_confirm page
- Click the Confirm button and that would process the order and put it into a "pending" or "paid unconfirmed" state in the real order table.
- Then when the payment is made:
---- if IPN is enabled, it would send back to the store and update the status to "processing". If the user clicked "Return to Merchant" the store would prevent double processing the update message by checking state.
---- if IPN is disabled it would leave the order in the "paid unconfirmed" state. If the customer clicked "Return to merchant" then it would update to "Processing". If the customer didn't click Return to Merchant, then it would stay in the "unconfirmed" state.
- At no point is the order lost. Only the order state would be dependent on whether IPN was enabled or the user clicked return to merchant.

That is what I expect a proper solution to do.

I've never even heard of these problems when using zen-cart or cs-cart or cubecart over the years. They all just "worked" as expected.
I think we need to seriously revamp paypal to work as designed for v0.8 because it is completely useless as is. I've already had to make a little mini-contrib called "Order Recovery" to get the last couple orders on my live shop since they didn't click return to merchant.
Last edited by Qphoria on Wed Nov 12, 2008 2:23 am, edited 1 time in total.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Wed Nov 12, 2008 2:13 am

Another question about IPN.

What is it?
I thought IPN, meaning Instant Payment Notification, means that as soon as the payment is accepted by paypal, it sends a reply back your store to update the order. Essentially removing the need for the customer to do it. Assuming that is correct, I think others are confusing "IPN URL" with the success page.

you don't want to use:
mystore.com/index.php?controller=checkout_success for your IPN url.
You want to use:
mystore.com/index.php?controller=checkout_process for the IPN url
Last edited by Qphoria on Wed Nov 12, 2008 2:21 am, edited 1 time in total.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by hm2k » Wed Nov 12, 2008 3:40 am

As far as I know, from my experience of using Paypal's IPN before we stopped using them, basically when a payment is received and approved in your account, the IPN visits a specified URL that is nothing to do with the returning success/fail urls.

UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK

Post by Qphoria » Wed Nov 12, 2008 4:03 am

Thats what I thought.. IPN should be visiting the "process" page to complete the final step.

I think the way OpenCart does the checkout button, its limiting. It creates the form for the payment processor on the last page. So the confirm button doesn't actually do anything for opencart, its just the form submitter for the payment method.

Perhaps instead, checkout confirm should send to a checkout_process which can then
- Put the order into the order table in a pending/unconfirmed state
- then continue on to paypal or any other off-site gateway
- then depending on the gateway, whatever the final step is to tell the store to update the order can be triggered to change pending/unconfirmed to processing/accepted

The only hump that we need to get over then in this case is if the customer changes his mind between logging into paypal and clicking the pay now button. Some ideas to prevent it:
- If we processed the order into the pending state already, then there is no order for them to go back to, so they will either start over or just accept it.
- process the order into pending state, and keep track of the order with the session. If the customer cancels or hits back button then delete that pending order and reinsert it the new way.
- add some sort of expired message when they hit the backbutton that says "this page has expired" like some sites do.

Other ideas are welcome :)

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by hm2k » Wed Nov 12, 2008 4:36 am

I'm of the opinion that once the user places the order by confirming it via the checkout, it is legally binding for them to make the payment, regardless of how they make the payment.

Just because they haven't completed the payment via paypal doesn't mean they don't want to complete the order, it means that they want to complete the order, but may have experienced a problem when attempting to pay via paypal.

The email they received when they confirm and checkout should really give details on how to resume and complete their order, by sending them to a URL that will either tell them how to do it or send them to the correct place.

UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK

Post by Qphoria » Wed Nov 12, 2008 4:39 am

Yes agreed. And just to reiterate that at no point in this process should the order be "lost" or left to die in the temp table.... at least not the way the temp table works now where the 2 hour session ends, and it blows itself away when the next order is processed.

The order could just rest in the main order table with the unconfirmed payment status and at this point the owner could assist the user with a manual paypal invoice and set to processed himself. And under the "my account" page there could be a link for "uncompleted orders" where the customer can basically start where he left off in the payment process.
Last edited by Qphoria on Wed Nov 12, 2008 4:41 am, edited 1 time in total.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by hm2k » Wed Nov 12, 2008 4:53 am

A plan is needed so we can action it in a later release.

UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK

Post by codecreator » Fri Nov 14, 2008 12:27 am

I've followed this discussion with great interest since I am wrestling with the same problem as many of you.  The question now is -  What to do?  How are we to resolve this problem?  Any solutions?

Is the answer to turn on IPN notification in Paypal?  If so, what is the URL to enter for this option?  Anybody have a CONCRETE solution?

My credibility is at stake if I suggest to my client that this is how the payment process is supposed to work or that this is the best solution I can offer.

New member

Posts

Joined
Mon Aug 04, 2008 6:39 pm

Post by Qphoria » Fri Nov 14, 2008 12:30 am

Debugging it now to see what it is really doing behind the scenes

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by codecreator » Fri Nov 14, 2008 12:39 am

Thanks for your efforts Qphoria.  I eagerly await your response. 

BTW, what debugging tools do you use?  I do most of my work on a Mac and am looking for good debugging tools to use in my development for that platform.  I currently use Coda and Dreamweaver for coding, etc.  Any suggestions for add-on dev./debugging tools?

Thanks!

New member

Posts

Joined
Mon Aug 04, 2008 6:39 pm
Who is online

Users browsing this forum: No registered users and 5 guests