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
(PluginManager::getInstance()->loadPlugin("IAPGooglePlay"));
s_pGoogle->configDeveloperInfo(pGoogleInfo);
s_pGoogle->setResultListener(s_pRetListener);
s_pGoogle->setDebugMode(true);
}
}