- Issue created by @andyg5000
- 🇮🇱Israel jsacksick
What's confusing me here is... The payment shouldn't have been completed in the first place right? If the payment is simply authorized and the authorization is voided, then $payment->isCompleted() never returns TRUE as the completed time is set whenever the payment state is set to completed?
Could it be that there's an issue with your payment workflow? Did you define a custom workflow? Custom gateway even?
- 🇺🇸United States andyg5000 North Carolina, USA
Hey @jsacksick
See this issue for how I handle it in Auth.net https://www.drupal.org/project/commerce_authnet/issues/2911837#comment-1... 🐛 Error on refund if payment hasn't been settled Needs review
The issue was happening when a payment was authorized and captured, but then voided before the payment was settled by the merchant account. With auth.net, to issue a refund, the payment must be voided if it hasn't been settled (~24 hours). It can be refunded once the payment is settled.
Maybe this should just be handled by the payment module as seen above?