iOS in-app purchase failure when payment method added live when there is not payment method already present

In-app purchase is not working properly when there's no payment method on a physical device.


>>> This issue is not reproduced through Sandbox. It works very well on Sandbox. <<<

>>> Need help to find a way of debugging this issue <<<


* Check below Github link first, please!!!

* Reference Github Link: https://github.com/dooboolab/react-native-iap/issues/307



[ Steps to reproduce the behavior ]


1. Set the payment method into 'None'.

( How to set it up : iPhone, Settings > iTunes & App Stores > Account Settings > Apple ID > View Apple ID > Account > Payment Information )


2. Make an in-app purchase on other application.


3. Once the iTunes account is verified, 'Payment Information Required' will be shown. Then press 'Continue' update the payment method.


4. Then the app will be automatically changed into Payment Information of iTunes Settings. Then update the payment method.


5. Once the payment method is verified, the payment for the IAP will be made, but the framework not working properly.


* iPhone Xs Screen Recording Link: https://firebasestorage.googleapis.com/v0/b/cooni-ebee8.appspot.com/o/Github_iOS_iap_COONI_2018-12-17.mp4?alt=media&token=43ff6f97-d0e5-40c6-8e71-cdc914a8b1fc

In this case your app gets two calls to updatedTransactions in rapid succession. The first is a 'failed' transaction* and the second is a 'purchased' transaction. You need to be sure your code handles the 'failed' transaction and remains able to handle the next 'purchased' transaction.

iOS in-app purchase failure when payment method added live when there is not payment method already present
 
 
Q