- Issue created by @alanhdev
If a customer deletes a payment method, a fatal error occurs when the canCapturePayment() method is called when accessing back-office functions such as viewing payments on the order or attempting a refund.
Error is:
Error: Call to a member function canCapturePayment() on null in Drupal\commerce_stripe\Plugin\Commerce\PaymentGateway\StripePaymentElement->canCapturePayment() (line 1453 of /var/www/html/docroot/modules/contrib/commerce_stripe/src/Plugin/Commerce/PaymentGateway/StripePaymentElement.php)
(Ignore the line number as this is on 2.0.1)
Extend the checking to ensure that, we don't call the canCapturePayment() method on a PaymentType that is NULL
Requires review
Active
2.0
Payment Element