我为asp.net网站配置了Google Checkout订阅。
但是我有一些问题。
如何取消订阅付款?
如何在沙盒环境中测试订阅付款?
(我的意思是,如果我设置每周订阅,是否将在沙盒环境中发送付款通知)
最佳答案
我找到了解决方案,它将对某人有所帮助
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();