Credit card payment form does not show while called through ajax call javascript and php

We have single page app. where page is loaded through ajax call using javascript and php.
when running the php page directly as, then credit card form generated.

But when called through ajax, the credit card form does not shows up.

Help is really appreciated

Hi :wave: Are there any errors being thrown in your browser’s developer console when the form is not loading?

No , please. It loads the php file and then square.js file but does not show anything after that.

Can you set some breakpoints in your code to verify if the card.attach method is being called successfully?

Thanks for reaching. There was issue in loading of square file. Though it was showing already loaded. So the source code modified to ensure that external is loaded in the dom. Now, card is attached with specified div.

1 Like