优惠券功能
如要使用用户输入优惠券即处理为已使用的功能,请使用下列代码。
if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
{
FGamePotSDKPluginModule::GetSharedGamePotSdk()->coupon(FString couponNumber);// 优惠券号码
FGamePotSDKPluginModule::GetSharedGamePotSdk()->coupon(FString couponNumber, FString userData);// 优惠券号码、用户信息
}
void ASampleGameModeBase::OnCouponSuccess(FString msg)
{
/// 优惠券使用成功
}
void ASampleGameModeBase::OnCouponFailure(FNError NError)
{
// 优惠券使用失败。请使用error.message显示错误消息。
}
发放道具
优惠券使用成功时,向开发商服务器请求发放道具。
详细说明请参考道具发放请求。
Last updated