How to show loading indicator after enter credentials in ios(In App purchase)?

I am making application using ionic framework with ios implementing In App purchase feature with cordova-plugin-purchase plugin.

followed tutorial: making-ios-app-purchases-ionicframework

i don’t know how to show indicator after entered apple credentials until last dialogue comes
already asked questioned:
any help will be helpful ?