Skip to content

Commit

Permalink
fix: include client columns in payment attempts response struct
Browse files Browse the repository at this point in the history
  • Loading branch information
vsrivatsa-juspay committed May 24, 2024
1 parent f04c6ac commit 3f0aca6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/api_models/src/payments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,10 @@ pub struct PaymentAttemptResponse {
pub unified_code: Option<String>,
/// error message unified across the connectors is received here if there was an error while calling connector
pub unified_message: Option<String>,
/// Value passed in X-CLIENT-SOURCE header during payments confirm request by the client
pub client_source: Option<String>,
/// Value passed in X-CLIENT-VERSION header during payments confirm request by the client
pub client_version: Option<String>,
}

#[derive(
Expand Down
2 changes: 2 additions & 0 deletions crates/router/src/types/transformers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -931,6 +931,8 @@ impl ForeignFrom<storage::PaymentAttempt> for payments::PaymentAttemptResponse {
reference_id: payment_attempt.connector_response_reference_id,
unified_code: payment_attempt.unified_code,
unified_message: payment_attempt.unified_message,
client_source: payment_attempt.client_source,
client_version: payment_attempt.client_version,
}
}
}
Expand Down

0 comments on commit 3f0aca6

Please sign in to comment.