Closed nirazan1 closed 4 years ago
it was issue with fake purchase token after all. I wish the error message said something simple like Invalid purchase token
Hi, @nirazan1 how did you find out it was a fake token? i have one a user of my app who is facing this issue while others seem to be working fine
Hi, @nirazan1 how did you find out it was a fake token? i have one a user of my app who is facing this issue while others seem to be working fine
I manually verified the user with subscription in google play console
Hi, @nirazan1 how did you find out it was a fake token? i have one a user of my app who is facing this issue while others seem to be working fine
I manually verified the user with subscription in google play console
you mean their subscription didnt show in the analytics? or is there a tool in google play console im missing?
What could be the root cause of the error as follow:
Caught error invalid: Invalid Value Error - #<Google::Apis::ClientError: invalid: Invalid Value status_code: 400 header: #<HTTP::Message::Headers:0x00007fd3b4d1ca88 @http_version="1.1", @body_size=0, @chunked=false, @request_method="GET", @request_uri=#<Addressable::URI:0x3fe9dc587e64 URI:https://www.googleapis.com/androidpublisher/v3/applications/com.xxxx/purchases/subscriptions/com.xxxx.xxx/tokens/GPA.xxxx-xxxx-xxxx-xxxx?>, @request_query=nil, @request_absolute_uri=nil, @status_code=400, @reason_phrase="Bad Request", @body_type=nil, @body_charset=nil, @body_date=nil, @body_encoding=#<Encoding:UTF-8>, @is_request=false, @header_item=[["Content-Type", "application/json; charset=UTF-8"], ["Vary", "Origin"], ["Vary", "X-Origin"], ["Vary", "Referer"], ["Content-Encoding", "gzip"], ["Date", "Wed, 08 Jul 2020 10:07:09 GMT"], ["Server", "ESF"], ["Cache-Control", "private"], ["X-XSS-Protection", "0"], ["X-Frame-Options", "SAMEORIGIN"], ["X-Content-Type-Options", "nosniff"], ["Alt-Svc", "h3-29=\":443\"; ma=2592000,h3-27=\":443\"; ma=2592000,h3-25=\":443\"; ma=2592000,h3-T050=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\""], ["Transfer-Encoding", "chunked"]], @dumped=false> body: "{\n \"error\": {\n \"code\": 400,\n \"message\": \"Invalid Value\",\n \"errors\": [\n {\n \"message\": \"Invalid Value\",\n \"domain\": \"global\",\n \"reason\": \"invalid\"\n }\n ]\n }\n}\n">
here is my implementation:
executing
SubscriptionValidator::Andriod.new(subscription_id: 'com.xxxx.xxxx', purchase_token: "GPA.xxxx-xxxx-xxxx-xxxx").verified_subscription?
gave the above mentioned errormy google_api_key_config.json looks just like the dummy json in fixtures , is there something i need to addresss while generating the json ?