如何使用c#从Stripe向客户发送付款收据的电子邮件

时间:2014-10-31 13:16:21

标签: asp.net-mvc stripe-payments

Stripe配置了mvc应用程序。但成功付款后需要向客户发送电子邮件收据。如果没有错,这可以在收集webhook事件后执行。但无法在c#中找到电子邮件付款收据的确切代码或API。任何准则请。

编辑:  对不起,我以为有人知道条纹...... 我的代码是

                        var myCustomer = new StripeCustomerCreateOptions();
                        // set these properties if it makes you happy
                        myCustomer.Email = "email@me.com";
                        myCustomer.Description = "test: email@me.com";
                        myCustomer.CardNumber = "4242424242424242";
                        myCustomer.CardExpirationYear = "2016";
                        myCustomer.CardExpirationMonth = "10";                           
                        myCustomer.CardName = "Red Swan";               
                        myCustomer.CardCvc = "223";  
                        myCustomer.PlanId = "testPremium";                        
                        myCustomer.Quantity = 1;                            

                        var customerService = new StripeCustomerService();
                        StripeCustomer stripeCustomer = customerService.Create(myCustomer);

                        var chargeService = new StripeChargeService();
                        var stripeCharge = chargeService.Create(myCharge);

此代码在Stripe上创建客户,并执行支付aganist提供的计划ID ...但是为了将邮件(按条带生成的付款收据)发送给该客户,我需要代码指南。 我试过代码:

 var myCharge = new StripeChargeCreateOptions
                            {
                                CustomerId = stripeCustomer.Id,
                                Currency = "gbp",
                                Amount=1000,
                               ReceiptEmail="customer@email.com"
                            };
                            var chargeService = new StripeChargeService();
                            var stripeCharge = chargeService.Create(myCharge);

但没有工作。

0 个答案:

没有答案
相关问题