1234567891011121314151617181920212223242526272829303132 |
- //
- // IAPDelegateImpl.cpp
- // demo
- //
- // Created by Red_mini on 2024/10/30.
- //
- #include "IAPDelegateImpl.hpp"
- IAPDelegateImpl* IAPDelegateImpl::createWith(){
- IAPDelegateImpl* ret = new IAPDelegateImpl();
-
- return ret;
- }
- // 用户成功购买通知
- void IAPDelegateImpl::onUserBuySuccess(std::map<std::string, string> buyInfos){
- for(const auto& buyInfo : buyInfos){
- printf("道具名称: %s , 道具数量: %d\n", buyInfo.first.c_str(), stoi(buyInfo.second));
- }
- }
- // 获取失败时需要显示的卡片名称
- std::vector<std::string> IAPDelegateImpl::getCardsNameWhenFailed(){
- std::vector<std::string> names;
- // names.push_back("礼包1");
- names.push_back("tilefavor");
- names.push_back("tilepack");
- names.push_back("tilepass");
- return names;
- }
|