Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google checkout subscription solution

I configured Google checkout subscription for my asp.net website.
But I have some problems with it.

  1. How can I cancel subscription payment?
  2. How can I test subscription payment with sandbox environment?

(I mean if I setup weekly subscription whether it will send payment notifications in sandbox environment)

like image 896
mugzi Avatar asked Sep 04 '26 11:09

mugzi


1 Answers

I found the solution, It will be helpful for someone

CancelItemsRequest cma = new CancelItemsRequest(System.Web.Configuration.WebConfigurationManager.AppSettings["GoogleMerchantID"].ToString(), System.Web.Configuration.WebConfigurationManager.AppSettings["GoogleMerchantKey"].ToString(), EnvironmentType.Sandbox.ToString(), ["merchant_invoice_id"], "Message", "");
                cma.AddMerchantItemId("2"); // item id to cancel
                cma.MerchantID = System.Web.Configuration.WebConfigurationManager.AppSettings["GoogleMerchantID"].ToString();
                cma.MerchantKey = System.Web.Configuration.WebConfigurationManager.AppSettings["GoogleMerchantKey"].ToString();
                cma.Environment = EnvironmentType.Sandbox;
                cma.SendEmail = false;
                GCheckoutResponse Respa = cma.Send();
like image 92
mugzi Avatar answered Sep 06 '26 16:09

mugzi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!