Last active
August 29, 2015 14:23
-
-
Save marchbold/137ae6dd906f20535203 to your computer and use it in GitHub Desktop.
Refreshing the application receipt in iOS 7+
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
// Initialise the extension before attempting to refresh the receipt | |
InAppBilling.service.applicationReceipt.addEventListener( ApplicationReceiptEvent.REFRESH_FAILED, refreshFailedHandler ); | |
InAppBilling.service.applicationReceipt.addEventListener( ApplicationReceiptEvent.REFRESH_SUCCESS, refreshSuccessHandler ); | |
InAppBilling.service.applicationReceipt.refresh(); | |
... | |
private function refreshSuccessHandler( event:ApplicationReceiptEvent ):void | |
{ | |
var appReceipt:String = InAppBilling.service.applicationReceipt.getAppReceipt(); | |
trace( "getAppReceipt() = " + appReceipt ); | |
} | |
private function refreshFailedHandler( event:ApplicationReceiptEvent ):void | |
{ | |
trace( "application receipt refresh failed" + event.error ); | |
} | |
// com.distriqt.InAppBilling |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment