Integrate with Enhance - Stencyl
In App Payments
The connector library provides a set of functions which help you to make use of different In-App Payment SDKs in your app.
Example Usage

Blocks
purchasing supported
boolean purchasing supported()
Return Value:
Returns true
if available, false
otherwise.
purchase product
void purchase product(
text productName
)
Parameters:
text productName
- The reference name which you entered during the Enhance flow (SKU Mappings).
consume product
void consume product(
text productName
)
Parameters:
text productName
- The reference name which you entered during the Enhance flow (SKU Mappings).
manually restore purchases
void manually restore purchases()
is product owned
boolean is product owned(
text productName
)
Parameters:
text productName
- The reference name which you entered during the Enhance flow (SKU Mappings).
Return Value:
Returns true
if owned, false
otherwise.
get count of owned product
number get count of owned product(
text productName
)
Parameters:
text productName
- The reference name which you entered during the Enhance flow (SKU Mappings).
Return Value:
Returns a number of the given product copies.
get display price of product
text get display price of product(
text productName,
text defaultPrice
)
Parameters:
text productName
- The reference name which you entered during the Enhance flow (SKU Mappings).
text defaultPrice
- Default value, used if the real one cannot be fetched for any reason.
Return Value:
Returns a string containing the localized display price.
get display title of product
text get display title of product(
text productName,
text defaultTitle
)
Parameters:
text productName
- The reference name which you entered during the Enhance flow (SKU Mappings).
text defaultTitle
- Default value, used if the real one cannot be fetched for any reason.
Return Value:
Returns a string containing the localized display title.
get display description of product
text get display description of product(
text productName,
text defaultDescription
)
Parameters:
text productName
- The reference name which you entered during the Enhance flow (SKU Mappings).
text defaultDescription
- Default value, used if the real one cannot be fetched for any reason.
Return Value:
Returns a string containing the localized display description.