Skip to content

Commit

Permalink
Merge branch 'hotfix-1.105.0' into boa-meta-hot-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
deepanshu-iiitu authored Jan 11, 2024
2 parents db3665c + 833ee62 commit 7f57cb2
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions crates/router/src/connector/bluesnap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1043,11 +1043,19 @@ impl api::IncomingWebhook for Bluesnap {
| bluesnap::BluesnapWebhookEvents::Charge
| bluesnap::BluesnapWebhookEvents::Chargeback
| bluesnap::BluesnapWebhookEvents::ChargebackStatusChanged => {
Ok(api_models::webhooks::ObjectReferenceId::PaymentId(
api_models::payments::PaymentIdType::PaymentAttemptId(
webhook_body.merchant_transaction_id,
),
))
if webhook_body.merchant_transaction_id.is_empty() {
Ok(api_models::webhooks::ObjectReferenceId::PaymentId(
api_models::payments::PaymentIdType::ConnectorTransactionId(
webhook_body.reference_number,
),
))
} else {
Ok(api_models::webhooks::ObjectReferenceId::PaymentId(
api_models::payments::PaymentIdType::PaymentAttemptId(
webhook_body.merchant_transaction_id,
),
))
}
}
bluesnap::BluesnapWebhookEvents::Refund => {
Ok(api_models::webhooks::ObjectReferenceId::RefundId(
Expand Down

0 comments on commit 7f57cb2

Please sign in to comment.