mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 17:19:15 +08:00
fix(router): fix retry_count and add validation for process_tracker (#7614)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Chikke Srujan <chikke.srujan@Chikke-Srujan-N7WRTY72X7.local>
This commit is contained in:
@ -1602,6 +1602,21 @@ pub struct PaymentAttemptResponse {
|
||||
pub feature_metadata: Option<PaymentAttemptFeatureMetadata>,
|
||||
}
|
||||
|
||||
#[cfg(feature = "v2")]
|
||||
#[derive(Debug, serde::Serialize, Clone, ToSchema)]
|
||||
pub struct PaymentAttemptRecordResponse {
|
||||
/// The global identifier for the payment attempt
|
||||
#[schema(value_type = String)]
|
||||
pub id: id_type::GlobalAttemptId,
|
||||
/// The status of the attempt
|
||||
#[schema(value_type = AttemptStatus, example = "charged")]
|
||||
pub status: enums::AttemptStatus,
|
||||
/// Additional data that might be required by hyperswitch based on the requested features by the merchants.
|
||||
#[schema(value_type = Option<FeatureMetadata>)]
|
||||
pub payment_intent_feature_metadata: Option<FeatureMetadata>,
|
||||
/// Additional data that might be required by hyperswitch, to enable some specific features.
|
||||
pub payment_attempt_feature_metadata: Option<PaymentAttemptFeatureMetadata>,
|
||||
}
|
||||
#[cfg(feature = "v2")]
|
||||
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize, PartialEq, ToSchema)]
|
||||
pub struct PaymentAttemptFeatureMetadata {
|
||||
@ -8513,7 +8528,7 @@ pub struct PaymentRevenueRecoveryMetadata {
|
||||
#[schema(value_type = u16,example = "1")]
|
||||
pub total_retry_count: u16,
|
||||
/// Flag for the payment connector's call
|
||||
pub payment_connector_transmission: PaymentConnectorTransmission,
|
||||
pub payment_connector_transmission: Option<PaymentConnectorTransmission>,
|
||||
/// Billing Connector Id to update the invoices
|
||||
#[schema(value_type = String, example = "mca_1234567890")]
|
||||
pub billing_connector_id: id_type::MerchantConnectorAccountId,
|
||||
@ -8539,7 +8554,7 @@ impl PaymentRevenueRecoveryMetadata {
|
||||
&mut self,
|
||||
payment_connector_transmission: PaymentConnectorTransmission,
|
||||
) {
|
||||
self.payment_connector_transmission = payment_connector_transmission;
|
||||
self.payment_connector_transmission = Some(payment_connector_transmission);
|
||||
}
|
||||
pub fn get_payment_token_for_api_request(&self) -> ProcessorPaymentToken {
|
||||
ProcessorPaymentToken {
|
||||
|
||||
Reference in New Issue
Block a user