Comments (8)
@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
from spree_store_credit_payment_method.
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
from spree_store_credit_payment_method.
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!
from spree_store_credit_payment_method.
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.
from spree_store_credit_payment_method.
Doing it in the before transition to payment is also how we address the issue in #25
from spree_store_credit_payment_method.
@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?
from spree_store_credit_payment_method.
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.
from spree_store_credit_payment_method.
@paultyng I've been struggling with fixing a similar problem myself. Any chance you could help and provide some details on your solution?
from spree_store_credit_payment_method.
Related Issues (8)
- in `require': cannot load such file -- spree_promo (LoadError) HOT 4
- ActionView::Template::Error (Missing partial spree/checkout/payment/_storecredit with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :jbuilder, :coffee, :rabl], :versions=>[:v10, :v9, :v8, :v7, :v6, :v5, :v4, :v3, :v2, :v1]} HOT 13
- Paying entirely with store credit should remove the need to supply a credit card. HOT 5
- Add preference for whether store credit should be automatically applied HOT 2
- spree::Admin::PaymentsController:Class (NoMethodError) on bundle exec install HOT 2
- How do you actually expire store credits? HOT 2
- Failing Spec on Invalid CC Payment HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spree_store_credit_payment_method.