Documentation

Support

In-App Purchasing

In-App Purchasing

Custom store modules

Extend the purchasing functionality of your custom store through custom store modules.
Read time 1 minuteLast updated a day ago

Store modules extend the
AbstractPurchasingModule
class. Store modules act as factories that Unity IAP uses to obtain an instance of your store along with any configuration and extensions.
A module can support multiple stores. The
StandardPurchasingModule
class handles all of IAP's default store implementations.
To use your custom store implementation alongside the default stores that Unity provides, developers can supply multiple modules to IAP:
ConfigurationBuilder.Instance (MyCustomModule.Instance(), StandardPurchasingModule.Instance ());
When supplying multiple modules to the
ConfigurationBuilder
class, list the modules in the order of priority that IAP must use for their available implementations for a given platform. In the code example, any implementation that the
MyCustomModule
class provides has priority over the
StandardPurchasingModule
class.