简体   繁体   English

Google Checkout订阅解决方案

[英]Google checkout subscription solution

I configured Google checkout subscription for my asp.net website. 我为我的asp.net网站配置了Google Checkout订阅。
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) (我的意思是,如果我设置每周订阅是否会在沙箱环境中发送付款通知)

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();

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM