Testing a payment request
Verify that requests for payment function properly in the sandbox environment by inspecting the calls to the payment transaction observer.
Overview
Create an instance of SKPayment using a valid product identifier that you’ve already tested, as described in Testing fetching product identifiers. Set a breakpoint and inspect the payment request. Add the payment request to the transaction queue, and set a breakpoint to confirm that the system calls your observer’s paymentQueue(_:updatedTransactions:) method.
Though you can finish the transaction immediately without providing the content of the purchase during testing, failing to finish the transaction can cause problems. Unfinished transactions remain in the queue indefinitely, which could interfere with later testing. Complete the transaction as described in Finishing a transaction at the end of each test.