Skip to content

Commit

Permalink
Docs update for payment methods deprecation.
Browse files Browse the repository at this point in the history
  • Loading branch information
luca-landa committed Nov 19, 2020
1 parent 37d80ce commit dd1eb08
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions guides/source/developers/payments/payment-methods.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ service providers][payment-service-providers] article. -->
- `available_to_users`: Determines if the payment method is visible to users.
- `available_to_admin`: Determines if the payment method is visible to
administrators.
- `previous_type`: Contains the previous real payment type, in case `type` has
been removed after switching Payment Service Provider. Defaults to `nil`. For more
information, see the [Payment service providers][payment-service-providers]
article.

<!-- TODO:
Uncomment the link to the payment service providers article once it is merged.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,13 @@ You would need to extend or rewrite this class with your preferred PSP
integration.

[credit-card-base]: https://github.com/solidusio/solidus/blob/master/core/app/models/spree/payment_method/credit_card.rb

### Switching payment service provider

After switching payment service provider, there may be `Spree::PaymentMethod`
records referencing a `type` class that does not exist anymore.

If you cannot delete these records, you can deactivate them running
`rake payment_method:deactivate_unsupported_payment_methods`.
This way, their `type` will be set to `Spree::PaymentMethod`, allowing for
records retrieval without errors.

0 comments on commit dd1eb08

Please sign in to comment.