Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6027289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:34:14+00:00 2026-05-23T04:34:14+00:00

I am making a Web app that will be available in free and paid

  • 0

I am making a Web app that will be available in free and paid forms. I want to make it detect whether the user has paid for paid version using Google Checkout, and enable paid features if they have.

How would I do this in PHP?

Update I already have a user table in my database, and the user is required to log in to use the app. I will also create a table called purchases which will have the following:

  • userid An internally used account id
  • chitchat (the name of the app) NULL or a Google order id

Then when I need to detect if the user has bought it I would use

$userid=esc($_SESSION["id"]); // esc is a function that returns the SQL escaped string
if($query=mysqli_query($link,"SELECT * FROM purchases WHERE userid='$userid'")&&mysqli_num_rows($query)>0){
    // The user has bought the paid version
}

But then, in case my server is hacked, how would I confirm the order id with Google?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T04:34:15+00:00Added an answer on May 23, 2026 at 4:34 am

    Given the fact that you’ve shared very little information about your web app, it’s difficult to answer with a precise answer but here are some pointers:

    1. Create a database of users and require that people sign up.
    2. When someone makes a purchase, note that in the database. During the Google checkout process, Google will let you know that a transaction was successful.
    3. When a user signs in, check whether or not they’ve made a purchase and grant them permission to “paid-only” areas.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making a web app that will process large files (1gb+). While the
I'm planning on making a web app that will allow users to post entire
I'm writing a web app that will be making requests via AJAX and would
Im making a flash app that will capture video from the users web-cam, show
I'm making a game that will function as a web app, and I have
I am trying to use AJAX for a web app game that im making.
I'm making an app that is requesting data from a Web Service (implementing Soap).
I am making an app that takes photos from web site for some Username
I have a web app I'm making to run off a CMS that is
I am practicing making a web app which tries to read the user's twitter

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.