spree_store_credit_payment_method icon indicating copy to clipboard operation
spree_store_credit_payment_method copied to clipboard

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

Open paultyng opened this issue 10 years ago • 8 comments

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?

paultyng avatar Oct 17 '14 19:10 paultyng

@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 avatar Dec 05 '14 14:12 athal7

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

athal7 avatar Dec 05 '14 14:12 athal7

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!

mleglise avatar Dec 09 '14 19:12 mleglise

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 avatar Dec 09 '14 20:12 paultyng

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

paultyng avatar Dec 09 '14 20:12 paultyng

@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?

mleglise avatar Dec 09 '14 20:12 mleglise

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.

paultyng avatar Dec 09 '14 20:12 paultyng

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

dbruns avatar Jan 14 '17 02:01 dbruns