3

I am doing a shopping cart with Google Checkout. I integrated Paypal already like below:

<form name="frmpay" method="post" action="success.php">
      <input type="hidden" name="business" value="" />
    <input type="hidden" name="cmd" value="_xclick" />
    <input type="hidden" name="image_url" value="https://www.paypal.com/en_US/i/btn/x-click-but22.gif" />
      <input type="hidden" name="return" value="success.php" />
    <input type="hidden" name="cancel_return" value="error.php" />
    <input type="hidden" name="currency_code" value="GBP" />
    <input type="hidden" name="lc" value="UK" />
    <input type="hidden" name="no_shipping" value="1">
    <input type="hidden" name="item_name" value="<?=$res_item[name]?>" />
    <input type="hidden" name="amount" value="<?=$_SESSION['amt']?>" />
    <?php /*?><input type="hidden" name="shipping" value="<?=$_POST["shipping"]?>" /><?php */?>
    <input type="hidden" name="quantity" value="1" />
</form> 

How can I integrate Google Checkout like this? How can I return success page after payment in Google checkout? What is the input type for redirect url after successful payment in Google Checkout? I tried a lot for this but I did not get anywhere.

Here is my code:

<form method="POST" action="https://sandbox.google.com/checkout/api/checkout/v2/checkoutForm/Merchant/REPLACE_WITH_YOUR_SANDBOX_MERCHANT_ID" accept-charset="utf-8">
<!-- No product -->

<!-- No tax code -->

<!-- No shipping code -->

<input type="hidden" name="_charset_" />

<!-- Button code -->
<input type="image"
  name="Google Checkout"
  alt="Fast checkout through Google"
  src="http://sandbox.google.com/checkout/buttons/checkout.gif?merchant_id=REPLACE_WITH_YOUR_SANDBOX_MERCHANT_ID&w=180&h=46&style=white&variant=text&loc=en_US"
  height="46"
  width="180" />
</form>
John Conde
  • 217,595
  • 99
  • 455
  • 496
krishna
  • 923
  • 3
  • 15
  • 42

2 Answers2

2

There is no automatic re-direct for the buyer after the Google Checkout transaction finishes. However, you can provide a link that the user can click and get back to your site after completing the order.

See the continue_url paramenter:

http://code.google.com/apis/checkout/developer/Google_Checkout_HTML_API_Parameter_Reference.html#tag_continue-shopping-url

Mihai Ionescu
  • 2,108
  • 1
  • 12
  • 15
0

I have the same problem. My rough variant is to sell a link to a user, and after the user has successfully paid for the link, he will be redirected to the "thank you" page on Google Checkout, where he will see my link and a message from me, then he clicks on the link and gets back to my site

A link looks like mysite.com/orderhasbeenpayd/1342

but as I said it is a rough variant

sukinsan
  • 513
  • 3
  • 14