IAPDelegateImpl.cpp 496 B

12345678910111213141516171819202122
  1. //
  2. // IAPDelegateImpl.cpp
  3. // demo
  4. //
  5. // Created by Red_mini on 2024/10/30.
  6. //
  7. #include "IAPDelegateImpl.hpp"
  8. IAPDelegateImpl* IAPDelegateImpl::createWith(){
  9. IAPDelegateImpl* ret = new IAPDelegateImpl();
  10. return ret;
  11. }
  12. // 用户成功购买通知
  13. void IAPDelegateImpl::onUserBuySuccess(std::map<std::string, string> buyInfos){
  14. for(const auto& buyInfo : buyInfos){
  15. printf("道具名称: %s , 道具数量: %d\n", buyInfo.first.c_str(), stoi(buyInfo.second));
  16. }
  17. }