solidus icon indicating copy to clipboard operation
solidus copied to clipboard

Remove references to `Spree::CreditCard` in admin payment views and controller

Open rainerdema opened this issue 2 years ago • 0 comments

Introduction

The implementation of a new payment method in Solidus Backend requires the addition of a dedicated source form to support a payment source creation/reuse.

Desired Behavior

A more generic integration approach (that maintains the logic of payment sources) is needed.

Many payment platforms currently support several types of payment methods. So for the same Spree::PaymentMethod, we should be able to create payment sources of different types, such as cards, bank debits, bank redirects, bank transfers, etc. For this reason, the partial source form view should be as generic as possible without specific references to the type of payment source.

Current Behavior

However, the current behavior in Solidus Backend is lacking in clearly marking these distinctions, with several references to the Spree::CreditCard payment source integration still present within views and controllers.

Some points related to what was mentioned:

Additional notes

  • This problem was experienced during the implementation of a source_form in solidus_stripe: https://github.com/solidusio/solidus_stripe/issues/280
  • ℹ️ This doesn't create implementation problems but only nomenclature problems.
  • All that said mainly refers to Stripe, but I think the same concept can be applied to different payment platforms.

rainerdema avatar Apr 14 '23 17:04 rainerdema