I've built a little embeddable Javascript widget that list items for sale for publishers to embed on their site. The current use case is that when the user clicks on an item, they are redirected to my site where they can get more information and hopefully purchase the item. Typical workflow here.
What I would like to do is move that entire workflow inside the widget. Specifically, I'd like for the user to purchase the item directly through the widget without ever having to go to my site.
The widget would communicate with my back-end over SSL which would delegate the payment processing to Braintree or some other 3rd party gateway.
Technically, this is very feasible for me to implement. But are there any regulatory or compliance issues that would make this infeasible? What sort of issues do you expect I would encounter if I were to take this approach? What are the security implications?