Happy Business Starts Here

Use js callback instead of url redirect in Hosted payment page 2.0 advanced implementation

Use js callback instead of url redirect in Hosted payment page 2.0 advanced implementation

Current behaviour: When doing hosted payment page 2.0 advanced implementation, which is inline style with external button the callback method in z.render method is not called on success. instead the payment form is replaced with a callback page.
What is issue with current behavior? 
Replacing the credit card form with callback page on submit is a very odd behavior. Also when user gets an error he cannot edit the already entered data becasue the form needs a rerender and data is not persisted.

Proposed solution: When user submits form using external button, if payment method is created the callback method provided as second param of z.render/ z.renderWithErrorHandler method should be called instead of rendering the callback page inside the iframe similar to how internal submit button works.