Quote Originally Posted by Balaji View Post
Hi
I have installed the square payment method. I have two flat rate shipping methods enabled on the site.
When I change the shipping method at opc, the credit card fields goes missing. They are showing only refreshing the page.
Can any one please what is wrong.
Thanks
yeah, i do not think anything is wrong. unfortunately i'm not sure about a good way around it.

when the customer changes shipping methods there is an ajax call to get rates for the order. while that is done in the background, it is refreshing the page. and the page refresh is resetting the square elements.

any time there is a transmission to the server, if there is credit card data on the page, and the transmission to the server does not result in a successful order, that credit card will be lost. i think most shopping carts will operate the same way whenever you go back and fourth to the server.

i had brought up with lat9 the question as to why that ajax call is needed, and she has her reasons. you can see that here:

https://github.com/lat9/one_page_checkout/issues/305

if instead of doing the ajax call, the changes were all done on the client side, we can get past this situation. perhaps there is another solution (there always is), but in thinking about it, it seems like a lot of work for minimal gain.

sorry i have no better answers.

best.