Codeless IAP - "Slow test card. Declines after a few minutes" gets approved instead of being declined
I am using Unity's Codeless IAP for handling a 'Remove Ads' (non-consumable) purchase in my app.
I created an IAP Button. I wrote 2 methods - OnPurchaseComplete and OnPurchaseFailed - and assigned them to the IAP Button's On Purchase Complete and On Purchase Failed actions.
Testing this on Android:- 'Test card, always approves' and 'Test card, always declines' work perfectly. But 'Slow test card. Declines after a few minutes' and 'Slow test card. Approves after a few minutes' didn't work.
So I added an IAP Listener and assigned the OnPurchaseComplete and OnPurcahseFailed methods to the respective actions of the Listener.
Now when I make a purchase using the 'Slow test card. Approves after a few minutes', though I still get no response immediately, once I quit the app completely and open it, the Listener calls the OnPurcahseComplete method; which is good enough for me.
The problem is when I try 'Slow test card. Declines after a few minutes', while nothing happens immediately, once I quit and open the app, the OnPurchaseComplete method is being called instead of the OnPurchaseFailed method.
Not sure how to solve this. Please help. Thank you in advance.
Your answer
![](https://koobas.hobune.stream/wayback/20220613043645im_/https://answers.unity.com/themes/thub/images/avi.jpg)