add: better stripe endpoint
This commit is contained in:
parent
227cd3d2ac
commit
fdaa81422a
15 changed files with 118 additions and 778 deletions
|
@ -173,13 +173,13 @@ pub struct ConnectionsConfig {
|
|||
/// - Use testing card numbers: <https://docs.stripe.com/testing?testing-method=card-numbers#visa>
|
||||
#[derive(Clone, Serialize, Deserialize, Debug, Default)]
|
||||
pub struct StripeConfig {
|
||||
/// Payment link from the Stripe dashboard.
|
||||
/// Payment links from the Stripe dashboard.
|
||||
///
|
||||
/// 1. Create a product and set the price for your membership
|
||||
/// 2. Set the product price to a recurring subscription
|
||||
/// 3. Create a payment link for the new product
|
||||
/// 4. The payment link pasted into this config field should NOT include a query string
|
||||
pub payment_link: String,
|
||||
pub payment_links: StripePaymentLinks,
|
||||
/// To apply benefits to user accounts, you should then go into the Stripe developer
|
||||
/// "workbench" and create a new webhook. The webhook needs the scopes:
|
||||
/// `invoice.payment_succeeded`, `customer.subscription.deleted`, `checkout.session.completed`.
|
||||
|
@ -194,6 +194,20 @@ pub struct StripeConfig {
|
|||
pub billing_portal_url: String,
|
||||
/// The text representation of the price of supporter. (like `$4 USD`)
|
||||
pub supporter_price_text: String,
|
||||
/// Product IDs from the Stripe dashboard.
|
||||
///
|
||||
/// These are checked when we receive a webhook to ensure we provide the correct product.
|
||||
pub product_ids: StripeProductIds,
|
||||
}
|
||||
|
||||
#[derive(Clone, Serialize, Deserialize, Debug, Default)]
|
||||
pub struct StripePaymentLinks {
|
||||
pub supporter: String,
|
||||
}
|
||||
|
||||
#[derive(Clone, Serialize, Deserialize, Debug, Default)]
|
||||
pub struct StripeProductIds {
|
||||
pub supporter: String,
|
||||
}
|
||||
|
||||
/// Manuals config (search help, etc)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue