I think that we are looking in the wrong place for the payment method in form_validate(), we should check the ['selected'] payment methods.

CommentFileSizeAuthor
#1 webform_pay.1012104_01.patch1015 bytessgabe

Comments

sgabe’s picture

Status: Active » Needs review
StatusFileSize
new1015 bytes

See the attached patch.

quicksketch’s picture

Status: Needs review » Closed (works as designed)

I don't think our current logic is incorrect (or at least that there is a resulting problem). Making your suggested change breaks the validation, which then causes your patch at #1012080: Validate transaction amount to be necessary. Without making any changes, everything works just fine.

We don't need to check which payment method is "selected" on our form because the payment method is hard-coded into the Webform component, the user doesn't have a choice which payment method to use. Ultimately that may change if #1004572: Fire only on defined payment method is implemented, but for now this patch doesn't seem to have an upside and doesn't seem necessary.