It is possible to get PHP notices about integration_type
Notice: Undefined index: integration_type in commerce_stripe_commerce_payment_method_info() (line 76 of commerce_stripe/commerce_stripe.module).

This patch prevents that issue as well as:

  1. New administrative messages about integration_type not being set and Stripe.js being default.
  2. Provides link if any issues are found to the configure payment methods screen in Commerce.

This line is awfully long so I'll submit a 2nd version with alternate logic option:
$stripe_integration = !empty($action->settings['payment_method']['settings']['integration_type']) ? $action->settings['payment_method']['settings']['integration_type'] : STRIPE_DEFAULT_INTEGRATION;

The change on line 694 is so we don't waste resources loading settings for non-privileged users.

Patch in next comment.

Comments

drastik created an issue. See original summary.

jwjoshuawalker’s picture

Patch 1 with the long inline-if condition.

jwjoshuawalker’s picture

Alternate code styling patch.

Both accomplish same goals.

echoz’s picture

I got this notice on the final update screen when updating from 7.x-1.0 to 7.x-1.1
I downgraded holding out for more understanding (if not everyone sees this) and a settled on solution. Thanks for your work on this.

  • aviindub committed 49da2b4 on 7.x-1.x authored by drastik
    Issue #2646194 by drastik: (PATCH INSIDE) Undefined index:...
aviindub’s picture

Status: Needs review » Fixed

thanks for the patch!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.