I am trying to integrate Google Checkout to my asp.net MVC(C#) application. I am trying to implement Google Checkout similar to PayPal Express Checkout. i.e.
This will avoid the use of Notification process. Is it possible to implement the same using Google Checkout? Please suggest
I finally solved this by using the ParameterizedUrl of Google CheckOut. I have done this as below:
GCheckout.Checkout.ShoppingCartItem shoppingCartItem = new GCheckout.Checkout.ShoppingCartItem();
shoppingCartItem.Description = "Google Checkout Item";
shoppingCartItem.Name = "Google Checkout Item";
decimal _price = 0M;
decimal.TryParse(amt, out _price);
shoppingCartItem.Price = _price;
shoppingCartItem.Quantity = 1;
shoppingCartItem.MerchantItemID = "1";
string returnURL = "http://localhost:50241/GCheckout/Success";
string trackURL = "http://localhost:50241/GCheckout/Track";
GCheckout.Checkout.CheckoutShoppingCartRequest checkoutShoppingCartRequest = new GCheckout.Checkout.CheckoutShoppingCartRequest(ConfigurationManager.AppSettings["GoogleMerchantID"], ConfigurationManager.AppSettings["GoogleMerchantKey"], EnvironmentType.Sandbox, "USD", 30, false);
checkoutShoppingCartRequest.ContinueShoppingUrl = returnURL;
ParameterizedUrl trackingUrl = new ParameterizedUrl(trackURL + "?mid=123");
trackingUrl.AddParameter("oid", UrlParameterType.OrderID);
trackingUrl.AddParameter("ot", UrlParameterType.OrderTotal);
trackingUrl.AddParameter("zp", UrlParameterType.ShippingPostalCode);
checkoutShoppingCartRequest.ParameterizedUrls.AddUrl(trackingUrl);
checkoutShoppingCartRequest.AddItem(shoppingCartItem);
GCheckout.Checkout.MerchantCode merchantCode = new GCheckout.Checkout.MerchantCode();
GCheckoutResponse response = checkoutShoppingCartRequest.Send();
if (response != null)
{
Response.Redirect(response.RedirectUrl, true);
}