Use ONE store IAP in Unreal
Last updated
Last updated
ONE store Unreal plugin is provided to allow easy application of ONE store IAP in the Unreal development environment.
This plugin has been developed for Unreal v4.25.
The unreal plugin consists of the followings.
assets : the global-appstores.json file used by ONE store SDK is located here. When build is made, this file will be moved to Android Assets to be included in the apk.
lib : the Adapter library helping the use of ONE store’s in-app SDK and Unreal is located here. When build is made, this file will be moved to jar lib to be included in the apk.
ONEStoreIap_UPL.xml : when build is made, it revises the GameActivity and Gradle information.
OneStoreIap.Build.cs : when Android build is made, it provides ONEStoreIap_UPL.xml for loading.
In the Ureal SDK, product information is forwarded as follows.
This content has been defined as FOneStoreIapProductData struct in Public/OneStoreIapInterface.h
Original Product Json
Json string prior to parsing forwarded from ONE store
Product Id
In-app ID registered via Developer Center
Type
Type of in-app product ("inapp" or "auto")
Price
In-app product price information
Price Currency Code
In-app product currency information
Price Amount micros
In-app price * 1 million
Title
Product name registered via Developer Center
In the Ureal SDK, purchase information is forwarded as follows.
This content has been defined as FOneStoreIapPurchaseData struct in Public/OneStoreIapInterface.h.
Original Purchase Data
Json string prior to parsing forwarded from ONE store
Signature Data
Signature string delivered from ONE store
Order Id
Billing ID
Package Name
Package name of purchased app
Product Id
In-app ID registered via Developer Center
Purchase Time
Time when purchase is made
Acknowledge State
Purchase acknowledgement status ( 0: Not Acknowledged, 1: Acknowledged)
Developer Payload
Order number created and managed in the business member’s interworking server
Purchase Id
Individual billing ID issued by ONE store
Purchase Token
Automatic payment ID issued by ONE store
Billing Key
BillingKey information used for automatic payment (Option)
ONE store Unreal plugin offers the following blueprint.
The followings provide the description on each blueprint.
After each API is called, connection with ONE store is made naturally.
However, to terminate the connection, call-ups are required according to the life cycle of the screen.
It requests the details of in-app products registered on ONE store.
As for Managed product, call up the specification with “inapp” in the product type. As for Monthly auto-renewal product, call up the specification with “auto”.
As for in-app calls, memory issues might happen, so it is recommended to search by 20 to 30 in-apps at a time.
Request Params
Product Type
Managed product (“inapp”) or Monthly auto-renewal product (“auto”)
Product List
List of product IDs(string) of in-apps whose details will be checked
Response Type
On Success
It is called up when in-app product details are successfully checked.
On Failure
It is called up when in-app product details fail to be checked.
On Need Update
It is called up when ONE store billing module needs to be updated.
On Need Login
It is called up when ONE store login is needed.
Response Params
Result Code
Success : 0 / In case of failure, it forwards error codes (as for error codes, refer to the existing guides).
In App Product Info List
In case of success, it forwards the list of the detail data (FOneStoreIapProductData)of in-apps requested for checking.
The purchase history of non-consumed Managed product and Monthly auto-renewal product can be checked.
Check in-app products by specifying Managed product or Monthly auto-renewal product in the product type.
Request Params
Product Type
Managed product (“inapp”) or Monthly auto-renewal product (“auto”)
Response Type
On Success
It is called up when purchase history is successfully checked.
On Failure
It is called up when purchase history fails to be checked.
On Need Update
It is called up when ONE store billing module needs to be updated.
On Need Login
It is called up when ONE store login is needed.
Response Params
Result Code
Success : 0 / In case of failure, it forwards error codes (as for error codes, refer to the existing guides).
One Store Iap Purchase Data List
In case of success, it forwards the list of the detail data (FOneStoreIapPurchaseData) of in-apps requested for checking.
It requests ONE store in-app purchases (IAP).
Request Params
Product Type
Managed product (“inapp”) or Monthly auto-renewal product (“auto”)
Product Id
In-app ID registered via Developer Center
Product Name
Product name to be exposed on the billing screen (if it is empty, the product name registered on Developer Center will be exposed)
Dev Payload
When the order number created and managed in the business member’s interworking server is entered, the same value must be input in Consume & Acknowledge.
Response Type
On Success
It is called up when billing is successfully made.
On Failure
It is called up when billing fails to be made.
On Need Update
It is called up when ONE store billing module needs to be updated.
On Need Login
It is called up when ONE store login is needed.
Response Params
Result Code
Success : 0 / In case of failure, it forwards error codes (as for error codes, refer to the existing guides).
Purchase Data
In case of success, it forwards the detail data of in-apps that have been successfully purchased.
For consumable products that need to be re-purchased, you must proceed with ‘consume’ and item provision after successful purchase.
If these products are not processed as ‘consume’, they can never be purchased again.
For ONE store IAP SDK V19 and later, if ‘consume’ or ‘acknowledge’ is not made within 3 days, the purchase will be cancelled since it will be judged that items have not been provided.
Request Params
Purchase Data
Purchase string received when searching billing and purchase history
Dev Payload
The order number created and managed in the business member’s interworking server must be the same as dev payload entered during billing (if dev payload has not used during billing, a unique value can be entered).
Response Type
On Success
It is called up when consumption is successfully made.
On Failure
It is called up when consumption fails to be made.
On Need Update
It is called up when ONE store billing module needs to be updated.
On Need Login
It is called up when ONE store login is needed.
Response Params
Result Code
Success : 0 / In case of failure, it forwards error codes (as for error codes, refer to the existing guides).
Original Purchase Data
It returns purchase data requesting ‘Consume’ as it is.
It is a function to acknowledge the in-app which has been successfully purchased. When it comes to Managed product to be used as non-consumable product, or Monthly auto-renewal product, it must call up ‘acknowledge’.
For ONE store IAP SDK V19 and later, if ‘consume’ or ‘acknowledge’ is not made within 3 days, the purchase will be cancelled since it will be judged that items have not been provided.
Request Params
Purchase Data
Purchase string received when searching billing and purchase history.
Dev Payload
The order number created and managed in the business member’s interworking server must be the same as dev payload entered during billing (if dev payload has not used during billing, a unique value can be entered).
Response Type
On Success
It is called up when purchase acknowledgement is successfully made.
On Failure
It is called up when purchase acknowledgement fails to be made.
On Need Update
It is called up when ONE store billing module needs to be updated.
On Need Login
It is called up when ONE store login is needed.
Response Params
Result Code
Success : 0 / In case of failure, it forwards error codes (as for error codes, refer to the existing guides).
Original Purchase Data
It returns purchase data requesting ‘Acknowledge’ as it is.
It uses ‘Get Purchase Data’ to confirm the change in ‘Acknowledge’ status of purchase data.
It changes Monthly auto-renewal product status.
There are 2 types of status: cancel or reactive. As for ‘cacel’, automatic payment will not be made on the next payment date.
Request Params
Purchase Data
Purchase string received when searching billing and purchase history.
Response Type
On Success
It is called up when Monthly auto-renewal product status successfully changes.
On Failure
It is called up when Monthly auto-renewal product status fails to change.
On Need Update
It is called up when ONE store billing module needs to be updated.
On Need Login
It is called up when ONE store login is needed.
Response Params
Result Code
Success : 0 / In case of failure, it forwards error codes (as for error codes, refer to the existing guides).
Action
Status change (cancel / reactivate)
cancel : reserve the cancellation of recurring payment of Monthly auto-renewal product
reactivate: reverse the cancellation and recover the original status
Original Purchase Data
Original purchase data requesting status change.
As for v19, it provides the API delivering market identification codes available in S2S API.
Response Type
On Success
It is called up when market identification code specifications are successfully called.
On Failure
It is called up when market identification code specifications fail to be called.
On Need Update
It is called up when ONE store billing module needs to be updated.
On Need Login
It is called up when ONE store login is needed
Response Params
Result Code
Success : 0 / In case of failure, it forwards error codes (as for error codes, refer to the existing guides).
Store Code
It returns store’s unique value (ex. ONE store: MKT_ONE)
It is used to process ONE store login when calling up On Need Login among the response types of the specifications above.
Response Type
On Success
It is called up when login is successful.
On Failure
It is called up when login fails.
Response Params
Result Code
Success : 0 / In case of failure, it forwards error codes (as for error codes, refer to the existing guides).
It is used to process ONE update when calling up On Need Update among the response types of the specifications above.
Response Type
On Success
It is called up when update is successful.
On Failure
It is called up when update fails.
Response Params
Result Code
Success : 0 / In case of failure, it forwards error codes (as for error codes, refer to the existing guides)
It reviews signature and purchase data through the license key (public key) issued by Developer Center with the API supporting the review of the purchase data.
However, as for the review of servers, it is recommended to review server items rather than to use this API.
Request Params
Public Key
License key (public key) issued by Developer Center
Original Purchase Data
Purchase data string received when calling up billing or non-consumed purchase history API
Signature data
Signature string received when calling up billing or non-consumed purchase history API
Response Params
Return Value
true: review is a success
false: review fails
The following example shows how to use Blueprint. It is not required to implement it as seen in the example, and you can modify the open blueprint and use it properly.