-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a default implementation for PaymentMethod#try_void
We use to replicate this behavior on all the payment extensions that add a payment integration. Still, the logic is pretty similar all the times. By adding this default behavior we can save some time integrating new payment methods, unelss something special is needed. The default try_void method added will just check if the void attempt is successful, otherwise it will return false. This will determine if Solidus will emit a refund along with an order cancellation. The method is a bit complex because void can have different arity, based on if the payment method support payment profiles or not. See [1] for more information. [1]: https://github.com/solidusio/solidus/blob/16d1e3704fbbe630a584c919de1a640a6ab6c6f8/core/app/models/spree/payment/processing.rb#L74-L81
- Loading branch information
Showing
2 changed files
with
102 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters