You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add supportsRefund/doRefund for gateways whose Omnipay driver implements refund()
Implements CiviCRM's refund contract (PaymentProcessor.refund API /
supportsRefund capability) generically: supportsRefund() resolves the
Omnipay gateway class without instantiating it and reports TRUE only when
that class exposes a refund() method. doRefund() sends the refund via the
gateway (transactionReference = original trxn_id) and returns
refund_trxn_id / refund_status per the core contract. Failures throw
PaymentProcessorException so CiviCRM never records a refund the gateway
rejected. Currency defaults to the original transaction's currency.
Tested against Mollie (iDeal/Bancontact) on CiviCRM 6.x.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0 commit comments