0

The ios user account password pops up also. This doesn't happen if called again while app is still opened, but repeats if app is closed and reopened.

Thanks

Red Aphid
  • 1
  • 1

1 Answers1

0

Sounds like you have unfinished purchases that you need to finish.

Purchases will remain in a pending state until your application calls finish on them. This is to ensure that your application processes and verifies a purchase.

You should call InAppBilling.service.finishPurchase when you have process a purchase and either delivered the product or handled the cancellation/failure:

https://gist.github.com/marchbold/851359b9e456e1a85d65#file-distriqt-extension-inappbilling-makepurchase-as

private function purchase_cancelledHandler( event:PurchaseEvent ):void
{
    // This transaction was cancelled so you should notify your user and finish the purchase
    trace( "purchase cancelled" + event.errorCode );
    if (event.data && event.data.length > 0)
        InAppBilling.service.finishPurchase( event.data[0] );
}

At start up you can retrieve the pending purchases after the SETUP_SUCCESS event:

private function setupSuccessHandler( event:InAppBillingEvent ):void
{
    var pending:Array = InAppBilling.service.getPendingPurchases();
    // Iterate over and handle as required
}

http://docs.airnativeextensions.com/inappbilling/docs/com/distriqt/extension/inappbilling/InAppBilling.html#getPendingPurchases()

Michael
  • 3,776
  • 1
  • 16
  • 27
  • Will getPendingPurchases() clear the pending list on the server? – Red Aphid May 21 '16 at 18:18
  • No, it won't clear them until you call finishPurchase on the pending purchase result. – Michael May 22 '16 at 02:31
  • Am doing this in setup success, but the getProducts call seems to be locking up on a valid product id (no event fired) 'var pending:Array = InAppBilling.service.getPendingPurchases(); for each (var purchase:Purchase in pending) { InAppBilling.service.finishPurchase(purchase); } InAppBilling.service.getProducts( [ IAP_PRODUCT_ID ] );` – Red Aphid May 22 '16 at 15:56