feat(router): add payments create-intent flow for v2 (#6193)

Co-authored-by: hrithikesh026 <hrithikesh.vm@juspay.in>
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Co-authored-by: Hrithikesh <61539176+hrithikesh026@users.noreply.github.com>
This commit is contained in:
Sai Harsha Vardhan
2024-10-17 15:50:47 +05:30
committed by GitHub
parent 9576ee37a6
commit afa803e0f9
64 changed files with 2004 additions and 282 deletions

View File

@ -15,9 +15,14 @@ pub enum ApiEventsType {
Payout {
payout_id: String,
},
#[cfg(feature = "v1")]
Payment {
payment_id: id_type::PaymentId,
},
#[cfg(feature = "v2")]
Payment {
payment_id: id_type::GlobalPaymentId,
},
Refund {
payment_id: Option<id_type::PaymentId>,
refund_id: String,
@ -82,6 +87,7 @@ pub enum ApiEventsType {
impl ApiEventMetric for serde_json::Value {}
impl ApiEventMetric for () {}
#[cfg(feature = "v1")]
impl ApiEventMetric for id_type::PaymentId {
fn get_api_event_type(&self) -> Option<ApiEventsType> {
Some(ApiEventsType::Payment {