我正在使用以下代码为我的网站创建订阅付款模型。如何在给定的代码中添加优惠券功能? (.net代码)
StripeConfiguration.ApiKey = _skApikey;
var options = new SessionCreateOptions
{
PaymentMethodTypes = new List<string> {
"card",
},
SubscriptionData = new SessionSubscriptionDataOptions
{
Items = new List<SessionSubscriptionDataItemOptions> {
new SessionSubscriptionDataItemOptions {
Plan = _planId,// "plan_GIVczN2miKqrY3",
},
},
},
SuccessUrl = "http://localhost:37882/MakeThePayment/Success",//"http://example.com/success?session_id={CHECKOUT_SESSION_ID}",
CancelUrl = "http://localhost:37882/MakeThePayment/Cancelled",
};
var service = new Stripe.Checkout.SessionService();
Session session = service.Create(options);
return Json(session.Id);
制作带有动画的视频贴纸