Google Checkout には、.NET アプリケーションと統合する方法に関するサンプル コードとチュートリアルがあります。
「サンプル コードを Web アプリケーションに統合する」というタイトルのセクションを確認してください。
ただし、サーバー側の POST を使用する場合は、HTTP ポストを送信し、応答を文字列として返す次のメソッドを確認することをお勧めします。
using System.Net;
string HttpPost (string parameters)
{
WebRequest webRequest = WebRequest.Create("http://checkout.google.com/buttons/checkout.gif?merchant_id=1234567890");
webRequest.ContentType = "application/x-www-form-urlencoded";
webRequest.Method = "POST";
byte[] bytes = Encoding.ASCII.GetBytes(parameters);
Stream os = null;
try
{
webRequest.ContentLength = bytes.Length;
os = webRequest.GetRequestStream();
os.Write(bytes, 0, bytes.Length);
}
catch (WebException e)
{
// handle e.Message
}
finally
{
if (os != null)
{
os.Close();
}
}
try
{
// get the response
WebResponse webResponse = webRequest.GetResponse();
if (webResponse == null)
{
return null;
}
StreamReader sr = new StreamReader(webResponse.GetResponseStream());
return sr.ReadToEnd().Trim();
}
catch (WebException e)
{
// handle e.Message
}
return null;
}
パラメータは次の形式で渡す必要があります。name1=value1&name2=value2