loadIAPPlugin

来源:互联网 发布:创意照片制作软件 编辑:程序博客网 时间:2024/06/11 08:38


void MyPurchase::loadIAPPlugin()
{
if (s_pRetListener == NULL)
{
s_pRetListener = new MyPurchaseResult();
}


//Google IAP
{
TIAPDeveloperInfo pGoogleInfo;
pGoogleInfo["GooglePlayAppKey"] = GOOGLE_APPKEY;


if(pGoogleInfo.empty()) {
char msg[256] = { 0 };
sprintf(msg, "Google App Key info is empty. PLZ fill your Google App Key info in %s(nearby line %d)", __FILE__, __LINE__);
MessageBox(msg, "Google IAP Warning");
}
s_pGoogle = dynamic_cast<ProtocolIAP*>(PluginManager::getInstance()->loadPlugin("IAPGooglePlay"));
s_pGoogle->configDeveloperInfo(pGoogleInfo);
s_pGoogle->setResultListener(s_pRetListener);
s_pGoogle->setDebugMode(true);
}
}
0 0
原创粉丝点击