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.
/// <summary>Retrieve the necessary information from the Midas Global addon.</summary>
public void GetMidasGlobalAddonInfo(MidasGlobalDelegate0 callback);
Parameters:
| Param | Type | Description |
|---|---|---|
| callback | MidasGlobalDelegate0 |
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, .
/// <summary>
/// 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, .
/// </summary>
/// <param name="pgos_params">
/// </param>
public void SetMidasGlobalMetaData(SetMidasGlobalMetaDataParams pgos_params, MidasGlobalDelegate1 callback);
Parameters:
| Param | Type | Description |
|---|---|---|
| pgos_params | SetMidasGlobalMetaDataParams | |
| callback | MidasGlobalDelegate1 |
Return: void
GetMidasGlobalMetaData
This interface will return Midas meta data that set with SetMidasGlobalMetaData interface by game.
/// <summary>This interface will return Midas meta data that set with `SetMidasGlobalMetaData` interface by game.</summary>
public 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, .
/// <summary>
/// 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, .
/// </summary>
/// <param name="pgos_params">
/// </param>
public void CreateMidasGlobalOrder(CreateMidasGlobalOrderParams pgos_params, MidasGlobalDelegate2 callback);
Parameters:
| Param | Type | Description |
|---|---|---|
| pgos_params | CreateMidasGlobalOrderParams | |
| callback | MidasGlobalDelegate2 |
Return: void
GetMidasGlobalBalanceDetail
Unlike the GetBalance interface provided by the Economy module, this interface provides full information about Midas Token balance of the player.
/// <summary>Unlike the GetBalance interface provided by the Economy module, this interface provides full information about Midas Token balance of the player.</summary>
/// <param name="pgos_params">
/// </param>
public void GetMidasGlobalBalanceDetail(GetMidasGlobalBalanceDetailParams pgos_params, MidasGlobalDelegate3 callback);
Parameters:
| Param | Type | Description |
|---|---|---|
| pgos_params | GetMidasGlobalBalanceDetailParams | |
| callback | MidasGlobalDelegate3 |
Return: void
All Delegates
public delegate void MidasGlobalDelegate0(PgosResult a0, GetMidasGlobalAddonInfoResult a1);
public delegate void MidasGlobalDelegate1(PgosResult a0, SetMidasGlobalMetaDataResult a1);
public delegate void MidasGlobalDelegate2(PgosResult a0, CreateMidasGlobalOrderResult a1);
public delegate void MidasGlobalDelegate3(PgosResult a0, GetMidasGlobalBalanceDetailResult a1);
Type Reference: