PlayMaker
Build an in-app store UI, purchase products, and restore eligible purchases using PlayMaker custom actions.
Key pattern (listeners)
Register
BillingServicesOnTransactionStateChangein a state that stays active before callingBillingServicesBuyProduct. This listener is what firespurchasingEvent/purchasedEvent/failedEvent/deferredEventand caches transactions forBillingServicesGetTransactionInfo.Register
BillingServicesOnRestorePurchasesCompletein a state that stays active before callingBillingServicesRestorePurchases. This listener is what fires completion events and caches restore results for extractor actions.
Actions (high level)
Store setup:
BillingServicesInitializeStore,BillingServicesGetInitializeStoreSuccessResult,BillingServicesGetInitializeStoreError,BillingServicesCanMakePaymentsProduct listing/UI:
BillingServicesGetStoreProductInfo,BillingServicesIsProductPurchasedPurchase flow:
BillingServicesBuyProduct,BillingServicesGetBuyProductError,BillingServicesOnTransactionStateChange,BillingServicesGetTransactionInfoRestore flow:
BillingServicesRestorePurchases,BillingServicesOnRestorePurchasesComplete,BillingServicesGetRestorePurchasesSuccessResult,BillingServicesGetRestorePurchasesError,BillingServicesGetRestoredTransactionInfoManual completion / verification:
BillingServicesGetTransactions,BillingServicesSetReceiptVerificationState,BillingServicesFinishTransactions
AutoFinishTransactions
ON (default): simplest flow. Grant content on
purchasedEvent. No manual finishing needed.OFF (advanced): required for server-side receipt verification. Verify
receiptfromBillingServicesGetTransactionInfo, then callBillingServicesSetReceiptVerificationState(transactionId, Success/Failed)and finish withBillingServicesFinishTransactions.
Use cases
Start here: use-cases/README.md
Last updated
Was this helpful?