Last active
August 29, 2015 14:19
-
-
Save marchbold/bac1a5373f846c55970b to your computer and use it in GitHub Desktop.
Consuming a purchase
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The service must be setup and a list of products retrieved. | |
// Make sure you have the following listeners | |
InAppBilling.service.addEventListener( InAppBillingEvent.CONSUME_SUCCESS, consumePurchase_successHandler ); | |
InAppBilling.service.addEventListener( InAppBillingEvent.CONSUME_FAILED, consumePurchase_failedHandler ); | |
InAppBilling.service.consumePurchase( new PurchaseRequest( productId ) ); | |
... | |
private function consumePurchase_successHandler( event:InAppBillingEvent ):void | |
{ | |
trace( "consume success" ); | |
} | |
private function consumePurchase_failedHandler( event:InAppBillingEvent ):void | |
{ | |
trace( "consume failed" ); | |
} | |
// com.distriqt.InAppBilling |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment