spree-product-assembly icon indicating copy to clipboard operation
spree-product-assembly copied to clipboard

Users unable to select saved payment sources

Open mleglise opened this issue 10 years ago • 1 comments

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

mleglise avatar Oct 13 '14 22:10 mleglise

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

jkelleyj avatar Dec 30 '16 18:12 jkelleyj