Problem/Motivation
I'm new to setting this up and when trying to configure strategies at /admin/commerce/config/xero I am getting an error.
Steps to reproduce
So far I have a
- d11 site
- Stripe Payment Element in test mode
- manual/offline enabled
- PayPal Payment disabled
- Example payment enabled
- Xero authorised
When navigating to /admin/commerce/config/xero I see
The website encountered an unexpected error. Try again later.
Error: Call to a member function canCapturePayment() on null in Drupal\commerce_stripe\Plugin\Commerce\PaymentGateway\StripePaymentElement->canCapturePayment() (line 1711 of modules/contrib/commerce_stripe/src/Plugin/Commerce/PaymentGateway/StripePaymentElement.php).
This seems to be happening even if the Stripe payment is disabled.
I am not sure if this should be a commerce_stripe issue but since it comes up when I am attempting to set up Xero strategies it might be useful here as well.
Comments
Comment #2
unqunqComment #3
unqunqComment #4
mradcliffeI can find where commerce_stripe is calling this, and it is very odd code that probably needs to be addressed in commerce_stripe.
This is probably happening because Commerce Xero has a view that uses the commerce payment operations links.
I do not know why there is a Stripe Payment Gateway that is configured to use a Payment Method Type that it cannot support, but that is most-likely the cause. It’s possible the configuration for your payment gateway for stripe needs to be configured?
Comment #5
unqunqLooks like the patch provided in the commerce_stripe module is working.