The uc_stripe_form_uc_payment_method_settings_form_alter() function is called not only in case of the uc_stripe settings form, but in case of all the other payment methods on the site, therefore the uc_stripe module attempts to validate the payment settings form of other modules, resulting in PHP notices.
Based on the solution used in the uc_cybersource and uc_authorizenet modules, here is a patch to correct this.

CommentFileSizeAuthor
uc_stripe-settings_form_alter.patch498 bytesphilsward

Comments

philsward created an issue. See original summary.

andraeray’s picture

Status: Active » Postponed (maintainer needs more info)

Thanks for finding this and identifying the fix.

Can you tell me how to reproduce the original issue so that I can verify the fix?

Thanks

philsward’s picture

Try this:

Example steps:
1. Enable uc_payment_pack module
2. Go to the COD settings page: /admin/store/settings/payment/method/cod
3. Save the form
4. There are PHP notices like this one: Notice: Undefined index: uc_pg_uc_stripe_enabled in uc_stripe_settings_form_validate()

andraeray’s picture

Title: Settings Form Alter » PHP notices appear for for non credit validations

Looks good. Thanks for finding and fixing this.

  • philsward authored 94e2843 on 7.x-3.x
    Issue #3132267 by philsward, AndraeRay: PHP notices appear for for non...
andraeray’s picture

Status: Postponed (maintainer needs more info) » Fixed

Committed.

andraeray’s picture

Title: PHP notices appear for for non credit validations » PHP notices appear for non credit validations

Status: Fixed » Closed (fixed)

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