I don’t use Stripe and can’t say without a lot more info, but I’d probably recommend triggering the behavior you want in some custom JS, which you can load with ->addJS()
within the boot()
method of an extension. I say so just because there’s a lot of async JS happening on load in the payment modules, and you probably want to skip all of that, as well as avoid any changes to files in payregister
, which are bound to get overwritten the next time the extension updates.