Skip to content
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

Users unable to select saved payment sources #98

Open
mleglise opened this issue Oct 13, 2014 · 1 comment
Open

Users unable to select saved payment sources #98

mleglise opened this issue Oct 13, 2014 · 1 comment

Comments

@mleglise
Copy link

The override of CheckoutController#before_payment disables the loading of @payment_sources.

When used with Authorize.Net CIM, this causes users with saved credit cards to never see the option to reuse them. Only known workaround is to copy the relevant code from Spree::Frontend into a project's own override.

Spree::CheckoutController.class_eval do
  private

    # Override the override from spree_product_assembly, to re-enable payment_sources
    def before_payment
      if try_spree_current_user && try_spree_current_user.respond_to?(:payment_sources)
        @payment_sources = try_spree_current_user.payment_sources
      end
    end

end
@jkelleyj
Copy link

I closed #140 because it is the same issue. There is a note on that issue for an alternate workaround.

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

No branches or pull requests

2 participants