Client MidasGlobal API Reference
Games published by Tencent can use the payment service provided by Midas to implement the purchase of items or currency in PGOS. Games from other publishing channels can achieve similar functionality through the Third-party Platform Purchase capability provided by PGOS.
API List
| API | Description |
|---|---|
| GetMidasGlobalAddonInfo | Retrieve the necessary information from the Midas Global addon. |
| SetMidasGlobalMetaData | Set the meta data for using the Midas service in PGOS. Please make sure to call the GetMidasGlobalAddonInfo interface to retrieve the necessary parameters before calling this interface, . |
| GetMidasGlobalMetaData | This interface will return Midas meta data that set with SetMidasGlobalMetaData interface by game. |
| CreateMidasGlobalOrder | Create a Midas order for purchasing real-money items. FATAL: Please note that paying for orders obtained through this interface will increase the Midas payment assets for the specific role ID of the player. So, please ensure that you have set and retrieved the correct role ID through the SetMidasGlobalMetaData interface before calling this interface, . |
| GetMidasGlobalBalanceDetail | Unlike the GetBalance interface provided by the Economy module, this interface provides full information about Midas Token balance of the player. |
API Details
GetMidasGlobalAddonInfo
Retrieve the necessary information from the Midas Global addon.
/**
* Retrieve the necessary information from the Midas Global addon.
*
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void GetMidasGlobalAddonInfo(
PgosDataCallback<GetMidasGlobalAddonInfoResult> result_callback);
Parameters:
| Param | Type | Description |
|---|---|---|
| result_callback | PgosDataCallback<GetMidasGlobalAddonInfoResult> | The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD. |
Return: void
SetMidasGlobalMetaData
Set the meta data for using the Midas service in PGOS. Please make sure to call the GetMidasGlobalAddonInfo interface to retrieve the necessary parameters before calling this interface, .
/**
* Set the meta data for using the Midas service in PGOS.
* Please make sure to call the GetMidasGlobalAddonInfo interface to retrieve the necessary parameters before calling this interface, .
*
* @param params
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void SetMidasGlobalMetaData(
const SetMidasGlobalMetaDataParams& params,
PgosDataCallback<SetMidasGlobalMetaDataResult> result_callback);
Parameters:
| Param | Type | Description |
|---|---|---|
| params | const SetMidasGlobalMetaDataParams& | |
| result_callback | PgosDataCallback<SetMidasGlobalMetaDataResult> | The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD. |
Return: void
GetMidasGlobalMetaData
This interface will return Midas meta data that set with SetMidasGlobalMetaData interface by game.
/**
* This interface will return Midas meta data that set with `SetMidasGlobalMetaData` interface by game.
*
* @return
*/
MidasGlobalMetaData GetMidasGlobalMetaData();
Parameters:
(No parameters)
Return: MidasGlobalMetaData
CreateMidasGlobalOrder
Create a Midas order for purchasing real-money items. FATAL: Please note that paying for orders obtained through this interface will increase the Midas payment assets for the specific role ID of the player. So, please ensure that you have set and retrieved the correct role ID through the SetMidasGlobalMetaData interface before calling this interface, .
/**
* Create a Midas order for purchasing real-money items.
* FATAL: Please note that paying for orders obtained through this interface will increase the Midas payment assets for the specific role ID of the player.
* So, please ensure that you have set and retrieved the correct role ID through the `SetMidasGlobalMetaData` interface before calling this interface, .
*
* @param params
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void CreateMidasGlobalOrder(
const CreateMidasGlobalOrderParams& params,
PgosDataCallback<CreateMidasGlobalOrderResult> result_callback);
Parameters:
| Param | Type | Description |
|---|---|---|
| params | const CreateMidasGlobalOrderParams& | |
| result_callback | PgosDataCallback<CreateMidasGlobalOrderResult> | The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD. |
Return: void
GetMidasGlobalBalanceDetail
Unlike the GetBalance interface provided by the Economy module, this interface provides full information about Midas Token balance of the player.
/**
* Unlike the GetBalance interface provided by the Economy module, this interface provides full information about Midas Token balance of the player.
*
* @param params
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void GetMidasGlobalBalanceDetail(
const GetMidasGlobalBalanceDetailParams& params,
PgosDataCallback<GetMidasGlobalBalanceDetailResult> result_callback);
Parameters:
| Param | Type | Description |
|---|---|---|
| params | const GetMidasGlobalBalanceDetailParams& | |
| result_callback | PgosDataCallback<GetMidasGlobalBalanceDetailResult> | The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD. |
Return: void