New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to complete abandoned/pending purchases #2714

Closed
evertiro opened this Issue Oct 13, 2014 · 75 comments

Comments

Projects
None yet
9 participants
@evertiro
Member

evertiro commented Oct 13, 2014

Users should be able to complete abandoned/pending purchases on subsequent visits. In order to facilitate this, a status of 'processing' should be added which will be used by eChecks instead of the 'pending' status used now. This will allow pending purchases to be completed without risking affecting eCheck purchases which are pending processing.

@pippinsplugins has indicated that WooCommerce does this well and we should take inspiration from them.

@pippinsplugins

This comment has been minimized.

Show comment
Hide comment
@pippinsplugins

pippinsplugins Oct 13, 2014

Member

Should be a great feature for v2.3

Member

pippinsplugins commented Oct 13, 2014

Should be a great feature for v2.3

@evertiro

This comment has been minimized.

Show comment
Hide comment
@evertiro

evertiro Oct 16, 2014

Member

Blah... more annoying than I thought. Might need a hand with this one.

Member

evertiro commented Oct 16, 2014

Blah... more annoying than I thought. Might need a hand with this one.

@pippinsplugins

This comment has been minimized.

Show comment
Hide comment
@pippinsplugins

pippinsplugins Oct 16, 2014

Member

Have you looked at how Woo does it yet?

Member

pippinsplugins commented Oct 16, 2014

Have you looked at how Woo does it yet?

@evertiro

This comment has been minimized.

Show comment
Hide comment
@evertiro

evertiro Dec 1, 2014

Member

Yes

Member

evertiro commented Dec 1, 2014

Yes

@pippinsplugins

This comment has been minimized.

Show comment
Hide comment
@pippinsplugins

pippinsplugins Dec 1, 2014

Member

Okay . . . and do you still need a hand? Help me help you.

Member

pippinsplugins commented Dec 1, 2014

Okay . . . and do you still need a hand? Help me help you.

@pippinsplugins

This comment has been minimized.

Show comment
Hide comment
@pippinsplugins

pippinsplugins Jan 3, 2015

Member

Let's hold off on this until #2667 is completed so that we are not refactoring payment creation / updates twice.

Member

pippinsplugins commented Jan 3, 2015

Let's hold off on this until #2667 is completed so that we are not refactoring payment creation / updates twice.

@danieliser

This comment has been minimized.

Show comment
Hide comment
@danieliser

danieliser Jan 19, 2015

Collaborator

Isn't this partially already covered by several extensions aimed at recovering them? Maybe would be well suited as a feature for those plugins instead. Like the idea to clean up the pending transfers though.

Also consider starting down the path with this will likely eventually result in those extensions being merged into core as first comes showing people those transactions next comes reminding them by email since that would be a simple step with this in place as well.

Collaborator

danieliser commented Jan 19, 2015

Isn't this partially already covered by several extensions aimed at recovering them? Maybe would be well suited as a feature for those plugins instead. Like the idea to clean up the pending transfers though.

Also consider starting down the path with this will likely eventually result in those extensions being merged into core as first comes showing people those transactions next comes reminding them by email since that would be a simple step with this in place as well.

@pippinsplugins

This comment has been minimized.

Show comment
Hide comment
@pippinsplugins

pippinsplugins Jan 19, 2015

Member

No, not really. The current extensions generate new purchase records. We want to complete the existing pending record.

Member

pippinsplugins commented Jan 19, 2015

No, not really. The current extensions generate new purchase records. We want to complete the existing pending record.

@danieliser

This comment has been minimized.

Show comment
Hide comment
@danieliser

danieliser Jan 19, 2015

Collaborator

Oh sorry, I was under the assumption from their descriptions that they took abandoned and pending carts and notified users to come back to finish them.

Collaborator

danieliser commented Jan 19, 2015

Oh sorry, I was under the assumption from their descriptions that they took abandoned and pending carts and notified users to come back to finish them.

@pippinsplugins

This comment has been minimized.

Show comment
Hide comment
@pippinsplugins

pippinsplugins Jan 19, 2015

Member

They do notify them but they just recreate the purchase.

On Sun, Jan 18, 2015 at 7:06 PM, Daniel Iser notifications@github.com
wrote:

Oh sorry, I was under the assumption from their descriptions that they
took abandoned and pending carts and notified users to come back to finish
them.


Reply to this email directly or view it on GitHub
#2714 (comment)
.

Member

pippinsplugins commented Jan 19, 2015

They do notify them but they just recreate the purchase.

On Sun, Jan 18, 2015 at 7:06 PM, Daniel Iser notifications@github.com
wrote:

Oh sorry, I was under the assumption from their descriptions that they
took abandoned and pending carts and notified users to come back to finish
them.


Reply to this email directly or view it on GitHub
#2714 (comment)
.

@danieliser

This comment has been minimized.

Show comment
Hide comment
@danieliser

danieliser Jan 19, 2015

Collaborator

Ok then ignore my previous statements.

Collaborator

danieliser commented Jan 19, 2015

Ok then ignore my previous statements.

@pippinsplugins pippinsplugins modified the milestones: 2.4, 2.3 Feb 10, 2015

@KingYes

This comment has been minimized.

Show comment
Hide comment
@KingYes

KingYes Mar 22, 2015

Contributor

@pippinsplugins: For now, can I continue pending purchase manually?

Contributor

KingYes commented Mar 22, 2015

@pippinsplugins: For now, can I continue pending purchase manually?

@pippinsplugins

This comment has been minimized.

Show comment
Hide comment
@pippinsplugins
Member

pippinsplugins commented Mar 23, 2015

@KingYes yes

@KingYes

This comment has been minimized.

Show comment
Hide comment
@KingYes

KingYes Mar 23, 2015

Contributor

How?

Contributor

KingYes commented Mar 23, 2015

How?

@pippinsplugins

This comment has been minimized.

Show comment
Hide comment
@pippinsplugins

pippinsplugins Mar 23, 2015

Member

Oh, sorry, I just reread what you wrote.

No, that's not supported yet.

Member

pippinsplugins commented Mar 23, 2015

Oh, sorry, I just reread what you wrote.

No, that's not supported yet.

@KingYes

This comment has been minimized.

Show comment
Hide comment
@KingYes

KingYes Mar 23, 2015

Contributor

Okay.
Do you know when it's will be supported?

Contributor

KingYes commented Mar 23, 2015

Okay.
Do you know when it's will be supported?

@pippinsplugins

This comment has been minimized.

Show comment
Hide comment
@pippinsplugins

pippinsplugins Mar 23, 2015

Member

Not yet.

On Mon, Mar 23, 2015 at 9:57 AM, Yakir Sitbon notifications@github.com
wrote:

Okay.
Do you know when it's will be supported?


Reply to this email directly or view it on GitHub
#2714 (comment)
.

Member

pippinsplugins commented Mar 23, 2015

Not yet.

On Mon, Mar 23, 2015 at 9:57 AM, Yakir Sitbon notifications@github.com
wrote:

Okay.
Do you know when it's will be supported?


Reply to this email directly or view it on GitHub
#2714 (comment)
.

@pippinsplugins

This comment has been minimized.

Show comment
Hide comment
@pippinsplugins

pippinsplugins Jun 13, 2015

Member

This is too large of a feature to finish up for 2.4 since we're just a few days away from beta. Punting to 2.5.

Member

pippinsplugins commented Jun 13, 2015

This is too large of a feature to finish up for 2.4 since we're just a few days away from beta. Punting to 2.5.

@pippinsplugins

This comment has been minimized.

Show comment
Hide comment
@pippinsplugins
Member

pippinsplugins commented Jan 17, 2017

👍

@SDavisMedia

This comment has been minimized.

Show comment
Hide comment
@SDavisMedia

SDavisMedia Jan 17, 2017

Contributor

The UI/UX is looking and functioning wonderfully for me. I did try to complete a pending purchase through PayPal Standard, though, and everything seems to work fine until I'm sent back to my site. The payment is still pending and all the new UI for completing the purchase is still there.

screenshot 2017-01-17 10 35 08

No one else is experiencing this?

Contributor

SDavisMedia commented Jan 17, 2017

The UI/UX is looking and functioning wonderfully for me. I did try to complete a pending purchase through PayPal Standard, though, and everything seems to work fine until I'm sent back to my site. The payment is still pending and all the new UI for completing the purchase is still there.

screenshot 2017-01-17 10 35 08

No one else is experiencing this?

@cklosowski

This comment has been minimized.

Show comment
Hide comment
@cklosowski

cklosowski Jan 17, 2017

Member

@SDavisMedia that's because PayPal standard requires that IPN pings your store to complete the purchase...and doesn't get a TXN ID until that happens. If you try and complete with a gateway that doesn't require IPN (like stripe) does it work as you expect...or test gateway?

Member

cklosowski commented Jan 17, 2017

@SDavisMedia that's because PayPal standard requires that IPN pings your store to complete the purchase...and doesn't get a TXN ID until that happens. If you try and complete with a gateway that doesn't require IPN (like stripe) does it work as you expect...or test gateway?

@SDavisMedia

This comment has been minimized.

Show comment
Hide comment
@SDavisMedia

SDavisMedia Jan 17, 2017

Contributor

Definitely works if I complete the recovery purchase with Stripe.

Contributor

SDavisMedia commented Jan 17, 2017

Definitely works if I complete the recovery purchase with Stripe.

@cklosowski

This comment has been minimized.

Show comment
Hide comment
@cklosowski

cklosowski Jan 17, 2017

Member

Thanks @SDavisMedia How we feeling here @easydigitaldownloads/core-devs, those that have tested, thinking we're in a good spot here?

Member

cklosowski commented Jan 17, 2017

Thanks @SDavisMedia How we feeling here @easydigitaldownloads/core-devs, those that have tested, thinking we're in a good spot here?

@pippinsplugins

This comment has been minimized.

Show comment
Hide comment
@pippinsplugins

pippinsplugins Jan 19, 2017

Member

Thought of something last night we need to support here.

  1. Add items to your cart
  2. Go to checkout and use PayPal Standard
  3. At payPal click the back button (not cancel and return but the actual browser back button)
  4. Cart will now be empty

Let's do the following:

  1. Not empty the cart on submission to PayPal
  2. Set the pending payment in the session to ID an in-process payment
  3. Not emptying the cart means clicking back button will work and will show the existing cart contents
  4. Empty the cart when we receive the payment-processing template upon redirect from PayPal
Member

pippinsplugins commented Jan 19, 2017

Thought of something last night we need to support here.

  1. Add items to your cart
  2. Go to checkout and use PayPal Standard
  3. At payPal click the back button (not cancel and return but the actual browser back button)
  4. Cart will now be empty

Let's do the following:

  1. Not empty the cart on submission to PayPal
  2. Set the pending payment in the session to ID an in-process payment
  3. Not emptying the cart means clicking back button will work and will show the existing cart contents
  4. Empty the cart when we receive the payment-processing template upon redirect from PayPal
@SDavisMedia

This comment has been minimized.

Show comment
Hide comment
@SDavisMedia

SDavisMedia Jan 20, 2017

Contributor

From a UI/UX perspective, that definitely couldn't hurt anything. If it's possible, I think we should definitely do it. In fact, I'm pretty sure there have been a ton of tickets about it... more so in the past.

Contributor

SDavisMedia commented Jan 20, 2017

From a UI/UX perspective, that definitely couldn't hurt anything. If it's possible, I think we should definitely do it. In fact, I'm pretty sure there have been a ton of tickets about it... more so in the past.

@cklosowski

This comment has been minimized.

Show comment
Hide comment
@cklosowski

cklosowski Jan 23, 2017

Member

@pippinsplugins I set it so that the cart is emptied when viewing the PayPal purchase confirmation. Clicking the back button, while it will provide the user with the cart they had before, will create a pending payment though, that isn't recoverable...

If they Go to paypal, click the back button, and then go to paypal again, they'll have 2 EDD payments, since they didn't enter the recovery process, they just clicked the back button, which in some cases, the browser never even hits the server for, just pings the local storage memory for it. So by allowing the back button, we could create more confusion, I think, as now we hve multiple orders for customers, one pending (or processing, I think is what you were tryign to say?) and one complete if they process it the 2nd time.

Member

cklosowski commented Jan 23, 2017

@pippinsplugins I set it so that the cart is emptied when viewing the PayPal purchase confirmation. Clicking the back button, while it will provide the user with the cart they had before, will create a pending payment though, that isn't recoverable...

If they Go to paypal, click the back button, and then go to paypal again, they'll have 2 EDD payments, since they didn't enter the recovery process, they just clicked the back button, which in some cases, the browser never even hits the server for, just pings the local storage memory for it. So by allowing the back button, we could create more confusion, I think, as now we hve multiple orders for customers, one pending (or processing, I think is what you were tryign to say?) and one complete if they process it the 2nd time.

@pippinsplugins

This comment has been minimized.

Show comment
Hide comment
@pippinsplugins

pippinsplugins Jan 23, 2017

Member

Any reason we couldn't go ahead and set it as in recovery as soon as the customer goes to PayPal? That way if they click back, the payment ID in session is detected?

Member

pippinsplugins commented Jan 23, 2017

Any reason we couldn't go ahead and set it as in recovery as soon as the customer goes to PayPal? That way if they click back, the payment ID in session is detected?

@cklosowski

This comment has been minimized.

Show comment
Hide comment
@cklosowski

cklosowski Jan 23, 2017

Member

We can, however since the browser isn't actually re-polling the server or cookie data, there is a pretty high chance that it won't even re-read the cookie variable. I'll work it up to do that, however it cannot be guaranteed, so we'll have to play with it.

Member

cklosowski commented Jan 23, 2017

We can, however since the browser isn't actually re-polling the server or cookie data, there is a pretty high chance that it won't even re-read the cookie variable. I'll work it up to do that, however it cannot be guaranteed, so we'll have to play with it.

@cklosowski

This comment has been minimized.

Show comment
Hide comment
@cklosowski

cklosowski Jan 23, 2017

Member

Ok @pippinsplugins fixed that up. It seems to work fine in Chrome at least with the tests I've done. As long as we're aware it's something that the browser 'might' not respect, I think we're ok, but it should respect it as long as the browsers are following normal specs.

Member

cklosowski commented Jan 23, 2017

Ok @pippinsplugins fixed that up. It seems to work fine in Chrome at least with the tests I've done. As long as we're aware it's something that the browser 'might' not respect, I think we're ok, but it should respect it as long as the browsers are following normal specs.

@pippinsplugins

This comment has been minimized.

Show comment
Hide comment
@pippinsplugins

pippinsplugins Jan 23, 2017

Member

@cklosowski just did some testing on it. Worked beautifully for me and took care of the exact problem that originally triggered us creating this issue: multiple pending payments for a single order due to customers clicking the back button.

💯

Member

pippinsplugins commented Jan 23, 2017

@cklosowski just did some testing on it. Worked beautifully for me and took care of the exact problem that originally triggered us creating this issue: multiple pending payments for a single order due to customers clicking the back button.

💯

@sunnyratilal

This comment has been minimized.

Show comment
Hide comment
@sunnyratilal

sunnyratilal Jan 24, 2017

Member

Tested and working perfectly fine on my end too 👍

Member

sunnyratilal commented Jan 24, 2017

Tested and working perfectly fine on my end too 👍

sunnyratilal added a commit that referenced this issue Jan 24, 2017

Merge pull request #5351 from easydigitaldownloads/issue/2714
Complete abandoned and pending payments #2714
@sunnyratilal

This comment has been minimized.

Show comment
Hide comment
@sunnyratilal

sunnyratilal Jan 24, 2017

Member

Merged into release/2.7

Member

sunnyratilal commented Jan 24, 2017

Merged into release/2.7

@pippinsplugins

This comment has been minimized.

Show comment
Hide comment
@pippinsplugins
Member

pippinsplugins commented Jan 24, 2017

💯

@pippinsplugins

This comment has been minimized.

Show comment
Hide comment
@pippinsplugins

pippinsplugins Jan 30, 2017

Member

I'm seeing an error happen on the live site when testing this:

URL: https://easydigitaldownloads.com/checkout/?edd_action=recover_payment&payment_id=914927

Error log (incomplete for unknown reason):

#1 /wordpress-4.7.2/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters('', Array)
#2 /wordpress-4.7.2/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#3 /dom8333/wp-content/plugins/easy-digital-downloads/includes/actions.php(25): do_action('edd_recover_pay...', Array)
#4 /wordpress-4.7.2/wp-includes/class-wp-hook.php(298): edd_get_actions('')
#5 /wordpress-4.7.2/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array)
#6 /wordpress-4.7.2/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#7 /wordpress-4.7.2/wp-settings.php(449): do_action('init')
#8 /dom8333/wp-config.php(74): require_once('/wordpress-4.7....')
#9 /dom8333/wp-load.php(37): require_once('/dom8333/wp-con...')
#10 /wordpress-4.7.2/wp-blog-header.php(13): require_once('/dom8 in /dom8333/wp-content/plugins/easy-digital-downloads/includes/payments/actions.php on line 381

Member

pippinsplugins commented Jan 30, 2017

I'm seeing an error happen on the live site when testing this:

URL: https://easydigitaldownloads.com/checkout/?edd_action=recover_payment&payment_id=914927

Error log (incomplete for unknown reason):

#1 /wordpress-4.7.2/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters('', Array)
#2 /wordpress-4.7.2/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#3 /dom8333/wp-content/plugins/easy-digital-downloads/includes/actions.php(25): do_action('edd_recover_pay...', Array)
#4 /wordpress-4.7.2/wp-includes/class-wp-hook.php(298): edd_get_actions('')
#5 /wordpress-4.7.2/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array)
#6 /wordpress-4.7.2/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#7 /wordpress-4.7.2/wp-settings.php(449): do_action('init')
#8 /dom8333/wp-config.php(74): require_once('/wordpress-4.7....')
#9 /dom8333/wp-load.php(37): require_once('/dom8333/wp-con...')
#10 /wordpress-4.7.2/wp-blog-header.php(13): require_once('/dom8 in /dom8333/wp-content/plugins/easy-digital-downloads/includes/payments/actions.php on line 381

@pippinsplugins

This comment has been minimized.

Show comment
Hide comment
@pippinsplugins

pippinsplugins Jan 30, 2017

Member

Looks like it's a left over empty() method call for the cart class:

// Empty out the cart.
EDD()->cart->empty();

That method was changed to empty_cart().

Member

pippinsplugins commented Jan 30, 2017

Looks like it's a left over empty() method call for the cart class:

// Empty out the cart.
EDD()->cart->empty();

That method was changed to empty_cart().

pippinsplugins added a commit that referenced this issue Jan 30, 2017

@pippinsplugins

This comment has been minimized.

Show comment
Hide comment
@pippinsplugins

pippinsplugins Jan 30, 2017

Member

Yep, fixed.

Member

pippinsplugins commented Jan 30, 2017

Yep, fixed.

@cklosowski

This comment has been minimized.

Show comment
Hide comment
@cklosowski

cklosowski Jan 30, 2017

Member

👍

Member

cklosowski commented Jan 30, 2017

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment