feat(setup_intent): add setup_intent stripe compatibility (#102)

This commit is contained in:
Nishant Joshi
2022-12-12 14:34:53 +05:30
committed by GitHub
parent 044613dcf1
commit 01cafe753b
4 changed files with 558 additions and 2 deletions

View File

@ -2,11 +2,12 @@ mod app;
mod customers;
mod payment_intents;
mod refunds;
mod setup_intents;
use actix_web::{web, Scope};
mod errors;
pub(crate) use errors::ErrorCode;
pub(crate) use self::app::{Customers, PaymentIntents, Refunds};
pub(crate) use self::app::{Customers, PaymentIntents, Refunds, SetupIntents};
use crate::routes::AppState;
pub struct StripeApis;
@ -16,6 +17,7 @@ impl StripeApis {
let strict = false;
web::scope("/vs/v1")
.app_data(web::Data::new(serde_qs::Config::new(max_depth, strict)))
.service(SetupIntents::server(state.clone()))
.service(PaymentIntents::server(state.clone()))
.service(Refunds::server(state.clone()))
.service(Customers::server(state))