Skip to content
This repository has been archived by the owner on Feb 27, 2021. It is now read-only.

If you don't use a confirm step, the credits are not used #19

Open
paultyng opened this issue Oct 17, 2014 · 8 comments
Open

If you don't use a confirm step, the credits are not used #19

paultyng opened this issue Oct 17, 2014 · 8 comments

Comments

@paultyng
Copy link

The transition hooks should probably check if a confirm step is used, otherwise run on complete.

I can put together a PR for this, or maybe it should just be a comment in the docs?

@athal7
Copy link

athal7 commented Dec 5, 2014

@paultyng on this pr to get things up to date it does do the charge on transition to complete, but it still builds the payments on transition to confirm, which maybe should happen in the payment step:

https://github.com/spree-contrib/spree_store_credit_payment_method/pull/23/files

@athal7
Copy link

athal7 commented Dec 5, 2014

scratch that, it's still on transition to confirm, the gift cards are related to complete. if you want to submit a PR that would be wonderful

@mleglise
Copy link

mleglise commented Dec 9, 2014

I've been working on this and it's not as simple as base.state_machine.before_transition from: :payment, do: :add_store_credit_payments or to: :complete, because the callback gets called AFTER order.process_payments!

@paultyng
Copy link
Author

paultyng commented Dec 9, 2014

What we ended up doing was adding the payment before transition to payment, removing the credit card reconciliation portion, and then in update_params_payment_source we just set the payment amount to whatever is leftover at that point.

@paultyng
Copy link
Author

paultyng commented Dec 9, 2014

Doing it in the before transition to payment is also how we address the issue in #25

@mleglise
Copy link

mleglise commented Dec 9, 2014

@paultyng What's the user's workflow if their order is fully covered by store credit? Do they see the payment page still? Or does it take them straight from delivery to complete?

@paultyng
Copy link
Author

paultyng commented Dec 9, 2014

We still show the page with just copy saying that its fully covered by store credit and nothing is necessary. Not ideal, but works for now.

@dbruns
Copy link

dbruns commented Jan 14, 2017

@paultyng I've been struggling with fixing a similar problem myself. Any chance you could help and provide some details on your solution?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants