Skip to content

Commit

Permalink
refactor(connector): [Cryptopay] add psync reference id validation fo…
Browse files Browse the repository at this point in the history
…r Cryptopay (#2668)
  • Loading branch information
prasunna09 authored Oct 25, 2023
1 parent 65319fe commit 27b9762
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions crates/router/src/connector/cryptopay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,6 @@ impl ConnectorCommon for Cryptopay {
}
}

impl ConnectorValidation for Cryptopay {}

impl ConnectorIntegration<api::Session, types::PaymentsSessionData, types::PaymentsResponseData>
for Cryptopay
{
Expand Down Expand Up @@ -279,6 +277,16 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
}
}

impl ConnectorValidation for Cryptopay {
fn validate_psync_reference_id(
&self,
_data: &types::PaymentsSyncRouterData,
) -> CustomResult<(), errors::ConnectorError> {
// since we can make psync call with our reference_id, having connector_transaction_id is not an mandatory criteria
Ok(())
}
}

impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsResponseData>
for Cryptopay
{
Expand Down

0 comments on commit 27b9762

Please sign in to comment.