跳到主要内容

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

APIDescription
GetMidasGlobalAddonInfoRetrieve the necessary information from the Midas Global addon.
SetMidasGlobalMetaDataSet 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, .
GetMidasGlobalMetaDataThis interface will return Midas meta data that set with SetMidasGlobalMetaData interface by game.
CreateMidasGlobalOrderCreate 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, .
GetMidasGlobalBalanceDetailUnlike 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:

ParamTypeDescription
callbackMidasGlobalDelegate0

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:

ParamTypeDescription
pgos_paramsSetMidasGlobalMetaDataParams
callbackMidasGlobalDelegate1

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:

ParamTypeDescription
pgos_paramsCreateMidasGlobalOrderParams
callbackMidasGlobalDelegate2

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:

ParamTypeDescription
pgos_paramsGetMidasGlobalBalanceDetailParams
callbackMidasGlobalDelegate3

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: