Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bandwidth issue in premium account. #125

Open
yogeshwar-quantum4u opened this issue May 4, 2021 · 8 comments
Open

Bandwidth issue in premium account. #125

yogeshwar-quantum4u opened this issue May 4, 2021 · 8 comments

Comments

@yogeshwar-quantum4u
Copy link

As per documentation, we have created a API Access and service account for the purchase info and also provided all relevant access on google console and cloud console

But when we are updating the below json, its always returning "failed to parse purchase settings"

{
"credentials": {
"type": "service_account",
"project_id": "api-3333333333333333333-333333",
"private_key_id": "3333333333333333333333333333333333333333",
"private_key": "-----BEGIN PRIVATE KEY----- MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC3eWGUsgiwXzEG ...= -----END PRIVATE KEY----- ",
"client_email": "perchaseverification@api-8590733015157495171-576381.iam.gserviceaccount.com",
"client_id": "110405678044800470496",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://accounts.google.com/o/oauth2/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/perchaseverification%40api-1111111115157495171-511181.iam.gserviceaccount.com"
},
"application": "AnchorFree-Backend/1.0"
}

@timoshenkoav
Copy link
Collaborator

Please email me full generated json and project id to a.timoshenko@anchorfree.com

@naphaso
Copy link
Contributor

naphaso commented May 11, 2021

"credentials" should be escaped string with service account.
Example:

{
  "credentials":"{\"type\":\"service_account\",\"project_id\":\"api-3333333333333333333-333333\", ...}",
  "application":"AnchorFree-Backend/1.0"
}

You could correctly escape service account in browser console, for example:

> console.log(JSON.stringify({credentials:JSON.stringify({"type": "service_account", "project_id": "api-3333333333333333333-333333"}),application:"AnchorFree-Backend/1.0"}))

{"credentials":"{\"type\":\"service_account\",\"project_id\":\"api-3333333333333333333-333333\"}","application":"AnchorFree-Backend/1.0"}

@singhmeenu
Copy link

singhmeenu commented May 12, 2021

Hi @naphaso thanks it's work for me.
After adding payment method. I am using below function to pass the purchase json from google.
sdk.getBackend().purchase("json from google", new CompletableCallback() {
@OverRide
public void complete() {
//purchase request success
}

@OverRide
public void error(VpnException e) {
//failed to process purchase
}
});
Passing json is {"orderId":"GPA.3316-0060-8538-95781","packageName":"com.appnextg.vidmaker","productId":"com.monthly.pro","purchaseTime":1620800024656,"purchaseState":0,"purchaseToken":"glklbledoecgjienpinphdbe.AO-J1Oy34aYGswoKuchDcpk831qGNyzw7PHfUxtdjx2Wn5vqlwUCc72qVtIJCxcU1wSAZHQ2FRaaWG5AOKz2Fsto5HWvdXgxFp5JzHf6QVknSIUBilS36jw","autoRenewing":true,"acknowledged":false}

and getting error is below
PartnerApiException{code=200message=nullcontent=INVALID_PURCHASE}

Please help me.

@yogeshwar-quantum4u
Copy link
Author

Please email me full generated json and project id to a.timoshenko@anchorfree.com

Email sent. Please check. yogeshwar.quantum4u@gmail.com

@lamlt95
Copy link

lamlt95 commented May 24, 2021

Please email me full generated json and project id to a.timoshenko@anchorfree.com

I am also facing the same issues
can you help me fix it.

@timoshenkoav
Copy link
Collaborator

@lamlt95 have you tried #125 (comment) ?

@lamlt95
Copy link

lamlt95 commented May 26, 2021

@lamlt95 have you tried #125 (comment) ?

thanks. I have tried and succeeded

@ShafiqSadat
Copy link

Can you send me your application google play link?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

6 participants