How to create an embeddable web plugin redirecting users for secure payment?

This is one of those question thats is worth stepping back a little bit and ask yourself if this problem has already been solved. Depending on your threat modal, https and js might be enough.