There is a problem with calling the widget payment system CloudPayments.
Installed the plugin ToolBox. Included JS script in header (Setting / SEO metatags) and in workflow.
Have you put the function in an IDE? We always find it much easier to debug code outside of the Bubble editor as it lacks sufficient syntax error marking.