Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paytm app popup does not close automatically #9

Open
biswanath-gintaa opened this issue Oct 29, 2021 · 4 comments
Open

Paytm app popup does not close automatically #9

biswanath-gintaa opened this issue Oct 29, 2021 · 4 comments

Comments

@biswanath-gintaa
Copy link

biswanath-gintaa commented Oct 29, 2021

After payment successfully done or fail, Paytm payment popup does not close automatically. User need to close it manually.

image

@binods-gintaa
Copy link

Also web hook is not being called when redirection is false.

@academicmantraSahil
Copy link

After payment successfully done or fail, Paytm payment popup does not close automatically. User need to close it manually.

image

any update

@Maulikdes
Copy link

There is a close method on the checkout instance, we get the instance in the below-shown subscription, this can be added to ngOnInit

this.sub  =  this.checkoutService.checkoutJsInstance$.subscribe(instance=>{
     // store this instance in some variable
     this.paymentInstance = instance;
 }));

now on the transaction event handler, you can close this instance

transactionStatusHandler(data){
    if(data["STATUS"] == 'TXN_SUCCESS'){
      this.paymentInstance.close();
    }
}

Note : To use angular variable inside this event handlers when you set handler set it like below using arrow functions,

handler: {
    notifyMerchant: (eventType, data) => {this.notifyMerchantHandler(eventType, data)},
    transactionStatus: (data) => {this.transactionStatusHandler(data)}
}

also unsubscribe the subject in ngOnDestroy

ngOnDestroy(): void 
{
    this.sub.unsubscribe();
}

@saiprasad20
Copy link

There is a close method on the checkout instance, we get the instance in the below-shown subscription, this can be added to ngOnInit

this.sub  =  this.checkoutService.checkoutJsInstance$.subscribe(instance=>{
     // store this instance in some variable
     this.paymentInstance = instance;
 }));

now on the transaction event handler, you can close this instance

transactionStatusHandler(data){
    if(data["STATUS"] == 'TXN_SUCCESS'){
      this.paymentInstance.close();
    }
}

Note : To use angular variable inside this event handlers when you set handler set it like below using arrow functions,

handler: {
    notifyMerchant: (eventType, data) => {this.notifyMerchantHandler(eventType, data)},
    transactionStatus: (data) => {this.transactionStatusHandler(data)}
}

also unsubscribe the subject in ngOnDestroy

ngOnDestroy(): void 
{
    this.sub.unsubscribe();
}

This does not resolve the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants