Skip to main content

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.

/**
* Retrieve the necessary information from the Midas Global addon.
*
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetMidasGlobalAddonInfo(
TFunction<void(const FPgosResult& Ret, const FPgosClientGetMidasGlobalAddonInfoResult* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientGetMidasGlobalAddonInfoResult* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

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 ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void SetMidasGlobalMetaData(
const FPgosClientSetMidasGlobalMetaDataParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientSetMidasGlobalMetaDataResult* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientSetMidasGlobalMetaDataParams&
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientSetMidasGlobalMetaDataResult* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

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
*/
FPgosMidasGlobalMetaData GetMidasGlobalMetaData() const;

Parameters:

(No parameters)

Return: FPgosMidasGlobalMetaData

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 ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void CreateMidasGlobalOrder(
const FPgosClientCreateMidasGlobalOrderParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientCreateMidasGlobalOrderResult* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientCreateMidasGlobalOrderParams&
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientCreateMidasGlobalOrderResult* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

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 ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetMidasGlobalBalanceDetail(
const FPgosClientGetMidasGlobalBalanceDetailParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientGetMidasGlobalBalanceDetailResult* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientGetMidasGlobalBalanceDetailParams&
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientGetMidasGlobalBalanceDetailResult* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void