SDKBOX live OPS instruction wrong?

Good day!
I have the same issue.
I want to make server-side receipt validation using own server.
I’ve already enabled enableUserSideVerification, but onPayResult never called. I can’t find any info regard onPayResult, only that such method was in pluginx
Could You please help me to find out how to make it work?

Hey @musikov

Please check our documentation here -
http://docs.sdkbox.com/en/liveops/receipt-verification/

Best,
Pabitra

Thanks for your response!

I saw that instruction before. But i can’t understand what is onPayResult method and where do i need to implement it?

1 Like

You don’t need to implement onPayResult method, SDKBOX already handle it for you.

1 Like

what is the purpose of IAP::setDebug(true)? Does that stay true even when we release the product? It would be nice to have a wiki or other documentation of the actual api, so we don’t have to try to guess or infer.

thanks

setDebug(true) will output verbose level of logs, it’s not useful for the release build.

nite, here’s the problem I’m having, though. If I call setDebug(false) (or not at all), then even though I get an Apple popup saying that the purchase was successful, apparently my onSuccess method isn’t called, because the purchase isn’t reflected.

In fact, this is what I get with setDebug(false)
IAP :Server validation: not authenticated

OTOH, if I setDebug(true), then it works. But then you’re saying that I’m spewing lots of logs, right?

Any idea what’s going on?

We’ll look into that, are you making purchase with iTunes tester account?

Apple has improved their TestFlight, and now you can use your regular account, but it detects that you’re running in the sandbox. I don’t know how they handle that, though. Thanks.

sorry for necro posting but setDebug(true) problem is still in late version of IAP plugin (IOS)! I release my app with setDebug(false) and got some angry users asking for refund )))

can you give me more details about setDebug(false) issue?

yep! i integrate IAP plugin in to my game and test it in sandbox with setDebug(true) everything works perfectly, then i make a release build and set it to false. My

debug init code was:

  sdkbox::IAP::setDebug(true);
  sdkbox::IAP::setListener(new IAPL());
  sdkbox::IAP::init();

release:

  sdkbox::IAP::setDebug(false);
  sdkbox::IAP::setListener(new IAPL());
  sdkbox::IAP::init();

and in prod after succesfull purchase (charge money) it calls onFailure in my Listener
so i stop distributing my app and test it in sandbox with setDebug(false) and got logs:

IAP :Server validation: not authenticated

i tried your code, but i can’t reproduce.

can you use sdkbox-sample-iap to reproduce your issue, and show the detail steps

it reproducing only then using LIVEOPS server side verification ie:

bool AppDelegate::applicationDidFinishLaunching()
{
........
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
      sdkbox::init("......", ".........");
#endif
.......
  sdkbox::IAP::setDebug(false);
  sdkbox::IAP::setListener(new IAPL());
  sdkbox::IAP::init();
.........
}

and looks like it is IOS only bug cos Android works fine with verification is on

yes, i enabled LIVEOPS. it’s ok

maybe your need double check your liveops config.

already done ))) only one thing i’m not sure is “enable production mode” flag in the liveops config

it was checked ON then issue is happened
both android and ios apps is marked LIVE

iap items is null?

nope! they are not a null (configured correctly and all apple stuff like contracts is ok) and purchase complete from apple side (they even charge a money), but instead of onSuccess listener call onFailure with log: IAP :Server validation: not authenticated

may be it’s a problem with application token

i can’t reproduce.

for now, you can disable verification

sdkbox::IAP::enableUserSideVerification(true)

and we will review this part code

Hi everyone! any solution for @serjdawg problem with IAP :Server validation: not authenticated?
I recently opened this thread for this but i didn´t get any solution yet…