InApp purchase for window phone 8 in cocos2dx

I am trying to add inApp purchase for my game for cocos2dx-wp8-v2.0. I have gone through the api but I am not able to call methods in C# from the Visual C++ in my code. Has anybody implemented the inApp purchase. Help will be appreciated.

Same here, any answer to this question?

Muhammad Wajahat wrote:

Same here, any answer to this question?

You need to write your in app purchase class in C++/CLI. The best sample for it is as follows.

http://code.msdn.microsoft.com/windowsapps/Licensing-API-Sample-19712f1a

Enjoy!

Hey can u explain that in more detail please

Muhammad Saad wrote:

Hey can u explain that in more detail please

The sample has everything that you want. Use Visual Studio 2012 ultimate. Download C*+ sample from the link for windows 8 a good example for using C*+/CLI . Run it and see. if still there is a problem come back again I am currently watching this thread

Saud Ahmed wrote:

Muhammad Saad wrote:
> Hey can u explain that in more detail please
>
The sample has everything that you want. Use Visual Studio 2012 ultimate. Download C*+ sample from the link for windows 8 a good example for using C*+/CLI . Run it and see. if still there is a problem come back again I am currently watching this thread

I can help you out but i cannot give you the code completely because of the binding agreement

thanks ill have a look

Saud Ahmed wrote:

Saud Ahmed wrote:
> Muhammad Saad wrote:
> > Hey can u explain that in more detail please
>
> The sample has everything that you want. Use Visual Studio 2012 ultimate. Download C*+ sample from the link for windows 8 a good example for using C*+/CLI . Run it and see. if still there is a problem come back again I am currently watching this thread
>
I can help you out but i cannot give you the code completely because of the binding agreement

The following link is for windows phone 8.1. is there any wayout for wp 8.0 ? and is there any way to integrate the facebook.

The way to do in app is pretty much the same just study how they call the methods and make a similiar class for your windows phone 8 game

Hi.
I develop the game using cocos2d-x for wp8.
I want to add IAP in my game.
How to?
Help me.
Thanks.

Maybe u can try to use Cocos2d-Xna, because it using C#. I think, it is a better way to use
C# in Windows Phone for compatibility purpose, all the sample code are write in C#. In Microsoft website, u can download the IAP source code sample(in C#) and try to integrate to your game(I haven’t try yet). U can integrate leaderboard also by using OpenXlive(in C# again).
Cocos2d-x is a cross platform framework, but if u want to use IAP and Leaderboard for WP and Android, it is very painful.
I suggest or request Cocos2d-x.org or volunteers to help us to develop the IAP and Leaderboard binding for WP, iOS and Android.

Thanks for your reply.
I’ll try.
HappyLife

Hi,
I saw Cocos2d-Xna, but I have to port to C# code.
I can develop the game using Cocos2d-Xna.
Then can I add IAP/Ads in my game?

Please help me.
Thanks and Regards.
HappyLife

All the IAP code is available for c++ as well in Windows Phone 8 SDK.
try this
http://code.msdn.microsoft.com/windowsapps/Licensing-API-Sample-19712f1a/view/SourceCode#content

Hi, waqas!
Thank you for your reply.
I have developped the game using by XNA Game Studio.
But I can’t use this section ‘using Windows.ApplicationModel’ in my project.
why? It is my project is based XNA Game Studio.

what about this?

Help me!

Thanks and Regards.

HappyLife

I have a problem with inApp purchace too. How can I add methods from http://code.msdn.microsoft.com/windowsapps/Licensing-API-Sample-19712f1a
to my cocos2d-x wp8 and winRT project?
For example I need to buy coin, and purchasing realzed by button click.

I’m writing plugin-x for WP8. you can contact me, I will push if you want

@dungmv… where you able to integrate inapp purchases windows phone 8 also??? Also is there a way to integrate ads also? thx

Here is a tutorial about porting thirdSDK to wp8, maybe someting helpful to you, https://github.com/cocos2d/cocos-docs/blob/master/manual/framework/native/sdk-integration/wp8-thirdSDK/zh.md

thank I will check it out… :slight_smile: