Got an error when I called Method: purchases.subscriptions.get endpoint - php

Stack Overflow please do your magic..
The Story :
We are using laravel and use the laravel package (imdhemy/laravel-purchases) in-app purchases to use the google billing feature and the app store in-app purchases.
It is running well in the app store but in the play store still failled.
We have followed according to the instructions in the link
https://imdhemy.com/laravel-iap-docs/docs/credentials/google-play
everything goes smoothly except when it validates.
When i tried to call below end point to Checks whether a user's subscription purchase is valid and returns its expiry time.
https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/purchases/subscriptions/{subscriptionId}/tokens/{token}
However always show up an error 400
enter image description here
What we've done :
Create a ticket to Google, but there has been no response from Google after the last update 3 weeks ago.
Tried using another developer account and surprisingly it works normally.
enter image description here
The Question :
Is there something wrong with my developer account settings? Because I've copied the settings with the account that works fine.

Related

Problem with DocuSign, migrating from dev environment to prod environent (Go-Live)

For my ticket to DocuSign support (Case #: 05646003, Account #: 7824722-na2) that I got no answer for it, I mentioned my issues here:
Generally, the Issues that I have:
When I activate the account by the invitation link, an Integration Key will be added to my account but sometimes it disappears. Also, a button that switches the users sometimes appears. This condition takes a long time for us to track the issues (My account is not a premium account and I am just invited by another premium account)
I use these APIs to access the envelopes:
https://demo.docusign.net/restapi/v2/accounts/xxxxxxx/envelopes?from_date=2019-12-20
https://demo.docusign.net/restapi/v2/accounts/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/envelopes?from_date=2019-12-20
I have added 22 envelopes there but when I try to "Submit for Go-Live" it says that I don't have 20+ demo transactions.
I am using those APIs with my Account ID. I followed the instruction to generate an access token using the integration key and the client id, but the code didn't work for "Authorization - Bearer".
I also couldn't find any working instructions that describe "how to migrate from Demo to Production" with details. I have checked all of those pages in the documentation but all of them didn't work.
I have read the documentation but the solutions that are mentioned there didn't work for me and I need details for solving these issues.
I should note that currently, my codes are working in the Dev environment.
I used this link to generate the code:
https://account-d.docusign.com/oauth/auth?
response_type=code&scope=signature%20impersonation&client_id=1b8f72eb-8667-4e0e-...&redirect_uri=https://site.test
The result was:
https://site.test/?code=eyJ0e...
Now I need to know what are my:
- Account ID
- Access Token
- Base URL
NOTE: You cannot use the token generator that is on the developer center website when you go Live. Please ensure you actually use tokens from Production when you authenticate to your app in production.
Masoud, for help with going live you can email to :
go-live#docusign.com
The general documentation about Go Live is here:
https://developers.docusign.com/esign-rest-api/guides/go-live
You can find further information here:
https://developers.docusign.com/esign-rest-api/guides/go-live-steps

How can I display my Instagram posts (all) on my website

I want to display all my instagram posts on my website. It only returns 20 posts at a time in sandbox mode. But my requirement is to show all my posts on my website.
When I try to submit my app for review it (Instagram API) shows me a my usecase in listed options which is:
I want to display my Instagram posts on my website.
But when selected it shows this:
You do not need to submit for review
for this use case. If you are a developer and you want to display
Instagram content on your website, then you do not need to submit your
app for review. By using a client in sandbox mode, you can still
access the last 20 media of any sandbox user that grants you
permission.
It doesn't show me any way to submit for review using this usecase and when I choose any other usecase my app gets rejected.
I resolved this issue by taking help from this comment last time but it seem to have stopped working after June 1, 2016:
https://stackoverflow.com/a/20529864

How can we use Google Play Service for back-end server validation?

I was following these articles: Verifying Back-End Calls from Android Apps and Stopping Vampires using License Verification Library (from 24:57 to 25:34) to implement an In-App Purchase verification system for our Android apps.
I am a bit confused about how this works end-to-end and what we can assume about the generated token from calling GoogleAuthUtil.getToken() with the first email address found--when AccountManager returns more than one account. My questions are as follows:
Should we assume that any e-mail address used by the user to buy our
app will generate the same token (i.e., same user + app ==> same
token)?
If the answer to question 1 is no, is there a way to launch in-app
purchase for a particular account/email?
It looks like Google is picking the first e-mail address returned by
AccountManager for its in-app purchase dialog. Can we assume that
this won't be changed by the user after in-app purchase dialog is
launched? How do we find out if this changed after the in-app
purchase returns?
What should we store in our database to identify this user? Is email
address and/or token allowed? When does the token expire?
The java-client library looks very promising and powerful at first
read. But, a number of things remains confusing. Is there an article
that describes the end-to-end scenario--from an app initiating a
call to a back-end server through launching the in-app purchase
dialog, getting the result and closing with commits on the server?
What articles are the most useful for accomplishing this on Android?
The main issue we are trying to solve is to to get the full picture.
We've gotten the idea that we can avoid requiring userid/password by using the java client features and using tokens. We have registers our project (both the web app and android app on the same project) per the instructions for Google API Console. We have the php java-client for Google Play Service on our back-end server. We got our Android app to generate a token using the first email address and then call the in-app purchase dialog and handle the user response at the end of the dialog. We've got the parts. Now, we need to glue everything together. We are at the point of integrating with the back-end server. E.g., What is Redirect URi supposed to point to in our server? We've got a php url that we do http post messages to for our server app. We've included the code example for Google API client example--with client-id, secret, simple api key, etc. filled in--as an include to our php. But, what should we put in the redirect uri (we are missing a usage instruction for the example code)?
Also, we want to avoid having the e-mail used for the in-app purchase be different from what we log on our server database as the address the user used to buy our app; if the address is the correct thing to track, we want it to be the same as what was used for the purchase. This could be frustrating for our user if we make this mistake and prevent them from the features they paid for. We don't want to make this mistake and need some clarification on how Google Play Service works. If we initiated the server part of the workflow to get app Nonce / Payload / Credentials for the first e-mail address on the Android device, we would want that address to be used throughout the workflow. If the user changed this along the line, we want to be aware of this and gracefully recover. So far the articles have been helpful but incomplete. Any insight/suggestion is appreciated.

in-app billing check procedure

I've got a general question regarding in-app billing and checking strategics:
I have several apps and I would like to offer them for a trial time with full features (14 days) and then charge a fee to use it. I would like to follow the http://developer.android.com/guide/market/billing/billing_best_practices.html and check the signature on my own SQL server. There are good examples, see Android in-app purchase server signature verification using php OpenSSL
My Idea is the following, (correct me if this is not possible):
start App and contact to google server to obtain user ID (account which installed the app from google Play
with that ID contact my SQL server (sending ID and App name), if not existing create entry with date in order to check Trial period, and obtain Public Key, trial period and so on
with the Public Key contact google Server and check state of inapp-purchases for that user
update the app according to google answer (full features, trial period valid/expired)
Is that a good approach?
Are there some good examples to do this? I looked up the forum, there are approaches but, not that one.
Many thanks,
I am not very sure if it is possible form inapp purchase, but you can do one thing, suppose you have an item which is available for purchasing, create a timer or some kind of counter, and check for your specified trial period, if(inTrialPeriod){ don't show any purchasing option just give them free from your app with different item id) else(show the item purchase option from google play).

Salesforce REST Api missing fields with PHP

I'm using the Salesforce REST API and found it very hard to find decent documentation.
I can successfully log in with OAuth and i can push new accounts to Salesforce.
I use the instance url to make the API calls and i send the following fields to create an account object:
Name
Rating
Description
The problem is that I created a free trial (which sits on na9.salesforce.com) and everything worked fine.
I created a second free trial to check if everything works with another account, but the rating field is not available... I get the following message from Salesforce:
"[{"message":"No such column 'rating' on sobject of Account"}]"
Why is that?
Also, is it possible to add notes to a created account using POST? And is it possible to create Leads instead of Accounts using the API?
Thanks in advance,
A feature called field level security (FLS) can mean that even standard fields are not accessible, check the FLS settings on account in your second org.
Docs for the REST API are on the developer force site

Categories