Google Checkout execute PHP code first.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bassem
    Contributor
    • Dec 2008
    • 344

    Google Checkout execute PHP code first.

    Hi,

    1. I have add a Google Checkout "Buy Now" button on a HTML page, works fine.
    2. I'm trying to access a MySql database as a customer click the Buy Now button.
    3. I've put the a PHP code in a PHP page to access the database.

    Now, I need to send parameters to the PHP code to be inserted in the database, the only way I know is to use a Form post or get.

    The problem is Google use a From post to redirect the payment process, now the same Form can't have two post methods.

    Any idea to solve the two post I want to do.

    Thanks for your time.
    Bassem
  • zorgi
    Recognized Expert Contributor
    • Mar 2008
    • 431

    #2
    Originally posted by Bassem
    2. I'm trying to access a MySql database as a customer click the Buy Now button.
    I never used Google Checkout but do you mind telling us why do you need to do that?

    Comment

    • Bassem
      Contributor
      • Dec 2008
      • 344

      #3
      Hey,

      Sure not. Thank you.

      As customer pay for a service, customer select the service type and other inputs customer add. these data should be inserted into the database.

      Thanks again

      Comment

      • Bassem
        Contributor
        • Dec 2008
        • 344

        #4
        Hi,

        I'm thinking that as Google post the form to redirect the payment process, I may post the form to the PHP code to insert data in the database, then redirect to Google to continue the payment process.

        If this way is correct, I don't know how to post a form using a PHP code (the final redirect to Google), how to do it dynamically. How to simulate a submit button action in PHP.

        Thanks for your help,
        Bassem

        Comment

        • Bassem
          Contributor
          • Dec 2008
          • 344

          #5
          I think I found it, I'm going to execute a JavaScript through the PHP and that what will submit the from at the end with the transferred parameters.

          I will try that, and post.

          Thanks,
          Bassem

          Comment

          Working...