Configuration for the test product
The registered product configuration
// Register a custom consumable product
CdvPurchase.Test.registerTestProduct({
id: 'my-consumable',
type: CdvPurchase.ProductType.CONSUMABLE,
title: 'My Custom Consumable',
description: 'A custom test consumable product',
pricing: {
price: '$2.99',
currency: 'USD',
priceMicros: 2990000
}
});
// Later register it with the store
store.register([{
id: 'my-consumable',
type: CdvPurchase.ProductType.CONSUMABLE,
platform: CdvPurchase.Platform.TEST
}]);
// Note that this can be done in a single step:
store.register([{
id: 'my-custom-product',
type: CdvPurchase.ProductType.CONSUMABLE,
platform: CdvPurchase.Platform.TEST,
title: '...',
description: 'A custom test consumable product',
pricing: {
price: '$2.99',
currency: 'USD',
priceMicros: 2990000
}
}]);
Register a custom test product that can be used during development.
This function allows developers to create custom test products for development and testing purposes. These products will be available in the Test platform alongside the standard test products.