Hi all,

wonder if some of the guru's might be able to shed some light.

currently writing an Opayo pi (with applepay express checkout) module for zen (will place in downloads for all once i've sorted this niggle).
The module and its process of taking payments etc is all sorted and working fine.
The issue is linked to the the checkout_payment form on the checkout_payment page.

The opayo pi pulls in javascript and and creates the card entry area, within a specified DIV on the payment page fine.
In this opayo_pi javascript it has a event listener for the click of a form that its DIV resides in.
(of note the name of form that opayo pi references to can also be changed)
Going through the checkout process, if selecting this opayo_pi as method of payment using the radio button etc, then everything works fine.
The problem occurs if the store has other payment methods available, say paypal and bank transfer, then if selecting one of these and clicking the continue button, the opayo_pi javascript event still fires, highlights issues that none of the card details are filled in, and prevents user moving forward with their alternative choice of payment.

i've tried different avenues of thought..

stop bubbling of event - the opayo_pi event sits beneath the zen cart click event, but i've yet to find a method to implement this sucessfully.

change the form name to which opayo script attache its event to, then use javascript onchange to identify which radio buttonselected and then rename the form according to payment method. the form renames successully but opayo_pi still fires event on click.

I could have a sperate form, with a seperate button, for the opayo pi, but then would the discount/gv functionality on that page work as all appears within a single form at present.

Looked at the squarepay module but this doesn't seem to have the same issue as opayo in that it doesn't appear to have the eventlistener within its imported script.

any ideas on how to stop the opayo pi event firing when a different payment method is selected?

thanks in advance