Current callback code in onPayResult:withRet:withMsg method is next:
...
if (iapPlugin) {
iapPlugin->onPayResult(cRet, chMsg);
}else if(callback){
std::string stdmsg(chMsg);
callback(cRet,stdmsg);
} else {
PluginUtilsIOS::outputLog("Can't find the C++ object of the IAP plugin");
}
...
So, if plugin was successfully instantiated callback(cRet,stdmsg); will be newer called.
I think, code should be equivalent to other plugins, where all works properly:
...
if (iapPlugin) {
PayResultListener *listener = iapPlugin->getResultListener();
if(listener) {
iapPlugin->onPayResult(cRet, chMsg);
}
else if(callback) {
std::string stdmsg(chMsg);
callback(cRet,stdmsg);
}
}
else {
PluginUtilsIOS::outputLog("Can't find the C++ object of the IAP plugin");
}
...
The same problem on Android - in file ProtocolIAP.cpp
Current callback code in onPayResult:withRet:withMsg method is next:
So, if plugin was successfully instantiated callback(cRet,stdmsg); will be newer called. I think, code should be equivalent to other plugins, where all works properly:
The same problem on Android - in file ProtocolIAP.cpp