I’m using Unity + LUA
https://heroiclabs.com/docs/in-app-purchase-validation/#google
For Android IAP validation i followed above documentation and done all parts except the last one
i.e
Following Part:
**
Lastly, you’ll need to update Nakama’s configuration with the following information:
purchase.google.package_name: Package name for your Android app, as you’ve listed in Google Play.
purchase.google.service_key_file: Path of the JSON file you download in previous steps. This file contains authentication information that allows Nakama to communicate with Google Play on your behalf. Make sure that the file is kept safe and is only accessible by Nakama and other authorized parties.
I am confused where and how to put these flags into Nakama’s configuration
If i didn’t put those flags I am getting following error:
“Runtime RPC function caused an error”,“id”:“iap.google_verify_payment”,“error”:“data/modules/Iap_verifier_rpc.lua:100: bad argument #1 to base64_decode (string expected, got nil)\nstack traceback:\n\t[G]: in function ‘base64_decode’\n\tdata/modules/Iap_verifier_rpc.lua:100: in main chunk\n\t[G]: ?”,“stacktrace”:“github.com/heroiclabs/nakama/v2/server.(*RuntimeProviderLua).Rpc\n\tgithub.com/heroiclabs/nakama/v2/server/runtime_lua.go:1073\ngithub.com/heroiclabs/nakama/v2/server.NewRuntimeProviderLua.func3.1\n\tgithub.com/heroiclabs/nakama/v2/server/runtime_lua.go:179\ngithub.com/heroiclabs/nakama/v2/server.(*ApiServer).RpcFuncHttp\n\tgithub.com/heroiclabs/nakama/v2/server/api_rpc.go:160\nnet/http.HandlerFunc.ServeHTTP\n\tnet/http/server.go:2012\ngithub.com/gorilla/mux.(*Router).ServeHTTP\n\tgithub.com/gorilla/mux@v1.7.4/mux.go:210\ngo.opencensus.io/plugin/ochttp.(*Handler).ServeHTTP\n\tgo.opencensus.io@v0.22.3/plugin/ochttp/server.go:92\ngithub.com/heroiclabs/nakama/v2/server.decompressHandler.func1\n\tgithub.com/heroiclabs/nakama/v2/server/api.go:463\nnet/http.HandlerFunc.ServeHTTP\n\tnet/http/server.go:2012\ngithub.com/gorilla/handlers.CompressHandlerLevel.func1\n\tgithub.com/gorilla/handlers@v1.4.2/compress.go:148\nnet/http.HandlerFunc.ServeHTTP\n\tnet/http/server.go:2012\ngithub.com/heroiclabs/nakama/v2/server.StartApiServer.func5\n\tgithub.com/heroiclabs/nakama/v2/server/api.go:216\nnet/http.HandlerFunc.ServeHTTP\n\tnet/http/server.go:2012\ngithub.com/heroiclabs/nakama/v2/server.StartApiServer.func6\n\tgithub.com/heroiclabs/nakama/v2/server/api.go:227\nnet/http.HandlerFunc.ServeHTTP\n\tnet/http/server.go:2012\ngithub.com/gorilla/mux.(*Router).ServeHTTP\n\tgithub.com/gorilla/mux@v1.7.4/mux.go:210\ngithub.com/gorilla/handlers.(*cors).ServeHTTP\n\tgithub.com/gorilla/handlers@v1.4.2/cors.go:54\nnet/http.serverHandler.ServeHTTP\n\tnet/http/server.go:2807\nnet/http.(*conn).serve\n\tnet/http/server.go:1895”}