Post by bruce » Thu Nov 20, 2008 12:52 pm

A good start, but what happens when the customer simply cancels at paypal which returns them to checkout_payment?

My guess is that their cart is magically empty and the "order" they never made is showing on their account_history page.

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by Qphoria » Thu Nov 20, 2008 12:54 pm

It is pretty much assumed that when you click "confirm" you are entering a binding commitment. If you choose to cancel however, I'm thinking of saving the cart info to the session so on cancel the cart will re-add the item and remove it from the order table.

It's not an ideal solution, but unfortunately its better to not lose the orders that do process rather than worry about un-customers that are not paying your bills.

0.8 will have a decent overhaul for temporary order storage and what not. This has to be done this way for now to prevent breaking other payment modules.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by JNeuhoff » Thu Nov 20, 2008 8:06 pm

A good start, but what happens when the customer simply cancels at paypal which returns them to checkout_payment?
Good question. In GoogleCheckout the customer either pays or he doesn't, he can't cancel the order while there in this payment gateway. Hence, if he decides not to pay, the OpenCart won't receive the 'order payed' message in its callback function, and the order status remains 'Paid Unconfirmed'. Isn't it the same with the PayPal payment gateway? In any case, if the order status is a 'Paid Unconfirmed' the store owner should log into PayPal and check whether the payment was actually received before doing a shipment. And even if the payment was received (OpenCart received a corresponding message to its callback function) there is still the possibility for PayPal to place the payment on a temporary hold. The latter seems to happen quite a lot, especially for larger payment amounts, hence the OpenCart store owner should only do the shipment once the payment has been transfered from PayPal into his bank account!

Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Rich Snippets * Google Tag Manager * Export/Import Tool * SpamBot Buster * Survey Plus


User avatar
Expert Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Qphoria » Thu Nov 20, 2008 8:44 pm

JNeuhoff wrote: the OpenCart won't receive the 'order payed' message in its callback function, and the order status remains 'Paid Unconfirmed'. Isn't it the same with the PayPal payment gateway?
It wasn't. But it is now :)
Before it would just insert the paypal order into the order_data (temp) table and wait until
A) IPN Callback was triggered (which I've yet to get working)
B) "Return to Merchant" was clicked.
If neither of those things happened, the order was lost.

The problem with the "improved" version was that it required callback to be working to update the status to "Pending". Simply clicking return to merchant still left the order in "Paid Unconfirmed" state.

Now it will trigger the updateState() function on both callback and return to merchant (if needed).

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by bruce » Thu Nov 20, 2008 8:45 pm

In paypal and ANZ eGate, the customer can return from the checkout without completing the purchase. It is the same scenario as in the supermarket when you remember something else you wanted to buy or perhaps return an item to the shelf that you have decided that you do not want.

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by Qphoria » Thu Nov 20, 2008 8:48 pm

eh...  When you are in checkout at the supermarket, and the item was already scanned and totaled and the guy is waiting for you to slide your card, it takes the manual intervention of the cashier to remove it from your list. Same thing here.

Perhaps the best approach might be to divide a customer's order history with Completed and Uncompleted orders. And allow them to click on an uncompleted order and it can return them to the checkout process.
Last edited by Qphoria on Thu Nov 20, 2008 8:50 pm, edited 1 time in total.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by bruce » Thu Nov 20, 2008 9:29 pm

Qphoria wrote: It is pretty much assumed that when you click "confirm" you are entering a binding commitment. If you choose to cancel however
No, the commitment is not binding even after you recieve the money. Your "customer" can still force a charge back if they can generate reasonable doubt that the goods were not delivered or, interestingly enough, if the goods are delivered but to a different address than the payment address.
Qphoria wrote: eh...  When you are in checkout at the supermarket, and the item was already scanned and totaled and the guy is waiting for you to slide your card, it takes the manual intervention of the cashier to remove it from your list. Same thing here.
You continue to argue both cases without thought or conclusion. This is exactly the scenario I was describing which you seem to be trying to dismiss with an example that describes it again. The only way to remove an item when you are at the payment gateway, is to return to the web store. When I do that under your proposed design, my goods are all magically confiscated at the checkout and I would have to return to the store to fill my basket again.

Hardly encouraging, and I know you can do better than that.

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by Qphoria » Thu Nov 20, 2008 9:43 pm

so instead you'd rather pay the cashier, go bring your car around front only to find that you never got a receipt and the store says "we never seen you before" ?;)

you're merging payments with returns now. when you check out at the market and pay, the transaction is final. to change it you need to take your items to the service desk. or if you don't pay at checkout then we can save your cart on the side for you when you are ready to pay.

all roads are better than paying the cashier and poof your groceries disappear from your cart

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by codecreator » Fri Nov 21, 2008 12:25 am

Qphoria,

Is the Paypal fix still on schedule for release today?

Once it is released and I have it installed and working, I will certainly make a donation to OpenCart in honor of all of your diligent efforts.

Thanks

New member

Posts

Joined
Mon Aug 04, 2008 6:39 pm

Post by Qphoria » Fri Nov 21, 2008 1:12 am

The paypal fix is on schedule, but the decision is whether or not to add it to 0.7.9 or just make it a contrib. There are some functional changes with the way it works, and while it wasn't major surgery, its still a very relevant change in the code. I don't want it to infect or delay 0.7.9 unless we are absolutely sure it works the way we want.

RC4 will likely still be released today. If the changes don't make it into the core, then I will release the changes as an easily installed contrib.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Fri Nov 21, 2008 1:11 pm

Ok...New version of paypal fix.

Some new ideas in play here...

1. Add item to cart
2. Goes to Checkout shipping
3. Goes to Checkout payment
4. Goes to Checkout confirm
5. Goes to Checkout process
-- Validates the form was POST. If not, then send to checkout_failed and keep cart
-- Validates that the session_id was posted and matches the current session if the payment module supports it. This is another step to prevent sneaky individuals from going directly to checkout_process and bypassing payment.
6. After validation, it runs Paypal->process()
7. Paypal process
-- Processes the order into "Paid Unconfirmed"
-- Saves cart to the session (for restore option)
-- Clears the cart
8. Goes to checkout_pending
-- Checkout pending has the form that goes to Paypal
-- Has javascript auto-submit to remove the need for customer having to click another button.
-- If javascript is disabled, it will still have the button option.
9. Goes to paypal.com
-- If customer clicks "cancel and return to site", it returns to paypal->callback().
----- Assume order failed and undo all the order processing and restore the cart
----- Delete from history and order table
-- If customer completes processing:
----- if IPN enabled, it calls "paypal->callback()" and updates the order to "Pending"
----- if IPN disabled, then customer clicks "Return to Merchant" and POSTS back to paypal->callback()
10. Return to Checkout Success
-- Order processed in proper state
-- Cart cleared
-- Order added to customer history

Give it a try and see if it works. It's still not perfect but I'm trying to make the best of what can be done with it.
http://www.unbannable.com/oc07c
Login: demo@demo.com / demo
You don't need to complete the paypal part, but you can do all the stuff up to that point and click cancel to return back.
Last edited by Qphoria on Wed Dec 10, 2008 4:30 am, edited 1 time in total.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by adam777 » Fri Nov 21, 2008 1:54 pm

I liked the one page checkout  :)

... but as Bruce mentioned bellow, when I press cancell order it does cancel the order, but if I try to reorder it begins to go through the order process again, without the one page checkout ... one page at a time.
Last edited by adam777 on Fri Nov 21, 2008 2:11 pm, edited 1 time in total.

User avatar
New member

Posts

Joined
Fri Aug 01, 2008 4:07 pm

Post by bruce » Fri Nov 21, 2008 1:55 pm

The process description is looking good Q.  8)

I tried it out on your test site and "cancel" from paypal returned me to checkout_failure instead of back to where I clicked to go to paypal.
ie: either checkout_confirm or your new one page checkout page to review what I had.

cheers

Bruce

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by JNeuhoff » Fri Nov 21, 2008 8:51 pm

The one-page checkout is good.

However, when I end up on the PayPal payment gateway and decide to click on its 'Cancel and return to webmaster@opencart.com' (this should really be 'Cancel and return to unbannable.com') it correctly directs me back to your store, but the order still is in the temporary session cart. So it looks to me your PaymentPayPal::process doesn't yet store the order into the database, nor does it set it there to a 'Paid Unconfirmed' state before re-directing to PayPal.

Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Rich Snippets * Google Tag Manager * Export/Import Tool * SpamBot Buster * Survey Plus


User avatar
Expert Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Qphoria » Fri Nov 21, 2008 9:16 pm

LOL crap
That onepage checkout is:
A) much different now (using ajax for page refresh)
B) not supposed to be the main focus :P

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Fri Nov 21, 2008 9:20 pm

LOL crap
That onepage checkout is:
A) much different now (using ajax for page refresh)
B) not supposed to be the main focus :P
Ignore the one page thing for now.
bruce wrote: The process description is looking good Q.  8)

I tried it out on your test site and "cancel" from paypal returned me to checkout_failure instead of back to where I clicked to go to paypal.
ie: either checkout_confirm or your new one page checkout page to review what I had.

cheers

Bruce
I had it actually returning to checkout_confirmat one point, then changed to checkout_payment. But then I thought, if we could add error messaging to a single landing page to explain the error that occured, checkout_failure would be that page. And I could add "ERROR: Canceled Payment". But I'm on the fence. Maybe checkout_confirm would be best

JNeuhoff wrote: The one-page checkout is good.

However, when I end up on the PayPal payment gateway and decide to click on its 'Cancel and return to webmaster@opencart.com' (this should really be 'Cancel and return to unbannable.com') it correctly directs me back to your store, but the order still is in the temporary session cart. So it looks to me your PaymentPayPal::process doesn't yet store the order into the database, nor does it set it there to a 'Paid Unconfirmed' state before re-directing to PayPal.
I think you missed the point :)
It saves it and clears the cart on the Pending page when it sends you to Paypal
when you cancel and go back, it re-adds the items to the cart
This was an attept to resolve bruce's dislike of the cart being "magically confiscated"
So I basically do an "UNDO" on the process if you cancel and come back.

However, if you complete the payment, then it stays cleared and processed

JNeuhoff wrote:(this should really be 'Cancel and return to unbannable.com')
Yea I noticed that too. This has been there since the dawn of opencart. I'm surprised noone has caught this yet Should really probably be the store name "Your Store" in this case
Last edited by Qphoria on Fri Nov 21, 2008 9:33 pm, edited 1 time in total.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by JNeuhoff » Fri Nov 21, 2008 10:14 pm

Yea I noticed that too. This has been there since the dawn of opencart. I'm surprised noone has caught this yet Should really probably be the store name "Your Store" in this case
Agreed. Should be fixed before the final release of OpenCart 0.7.9.

Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Rich Snippets * Google Tag Manager * Export/Import Tool * SpamBot Buster * Survey Plus


User avatar
Expert Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Qphoria » Sat Nov 22, 2008 12:06 am

I've fixed it in this new "concept" version.

We've decided to release RC4 with the existing paypal as-is to get some other bugs fixed and out for the masses. hm2k is building RC4 as I type.

In the mean time I will release the concept version to some guinea pigs volunteers to try it out. Please test it with RC4. You have until next wednesday to get all the kinks worked out and decide if you like the functionality of it. If so then it will be in RC5 middle of next week, and assuming all is good, Final will follow a few days later.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

User avatar
Expert Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Qphoria » Sat Nov 22, 2008 3:16 am

I will pm a link

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: No registered users and 3 guests