使用條帶結帳向 asp core 3.1 添加試用的語法是什么?我正在嘗試將 TrialPeriodDays 分配給 SubscriptionData 以進行 7 天的免費試用。
// Checkout Session
var options = new SessionCreateOptions
{
LineItems = new List<SessionLineItemOptions>
{
new SessionLineItemOptions
{
Price = "price_1KJSMXC...",
Quantity = 1,
},
},
// I believe I need to assign the trial to SubscriptionData below
SubscriptionData = { },
Mode = "subscription",
SuccessUrl = "https://example.com/Success",
CancelUrl = "https://example.com/Cancel",
};
uj5u.com熱心網友回復:
...
SubscriptionData = new Stripe.Checkout.SessionSubscriptionDataOptions
{
TrialPeriodDays = 7
},
Mode = "subscription",
....
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/422427.html
標籤:
上一篇:RazorPages:OnGet處理程式是否“接受”請求正文?
下一篇:如何從Logger訪問范圍訊息
