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

unqunq created an issue. See original summary.

unqunq’s picture

Issue summary: View changes
unqunq’s picture

mradcliffe’s picture

I 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?

unqunq’s picture

Status: Active » Closed (won't fix)

Looks like the patch provided in the commerce_stripe module is working.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.