This is my bug but I need a pointer.

I have set COD as a shipping option, as it implies extra complicated costs, calculated by Advanced Shipper.

When selected, only the COD payment option is offered on the payment page as default: I disable the other methods if COD has been selected.

This has worked fine during my testing a long time again but now I have found that when passing from step 2 to 3 Payment Information, I get an error message “Please select a payment method for your order.” If I refresh the page the error clears and I can proceed with the order.

Can someone tell me what variable is not set at this point/what triggers this error message so I can track it?

Thanks
Steve