Unity IAP is Not Initlalized Properly

Hi All

I am working in IAP. I have installed subscription and it is working in ios , fine and good. But Sometimes

When i touch the subscription button(I am using Codeless). It goes for On PurchaseFailed( ) function.

When i press again and again it is not working. It did not ask for user name or password…

After that i reinstall my app ( i am testing through xcode). it is working fine and good.

at some situation it is not working.

Any one help me. How to Avoid this error…

You can only purchase a subscription once.