feat(connector): worldpay - add dynamic fields and update terminal status mapping (#6468)

This commit is contained in:
Kashif
2024-11-28 19:53:20 +05:30
committed by GitHub
parent 707f48ceda
commit 5a98ed65a9
17 changed files with 565 additions and 177 deletions

View File

@ -254,7 +254,7 @@ impl PaymentAttemptInterface for MockDb {
#[cfg(feature = "v1")]
async fn find_payment_attempt_by_connector_transaction_id_payment_id_merchant_id(
&self,
_connector_transaction_id: &str,
_connector_transaction_id: &common_utils::types::ConnectorTransactionId,
_payment_id: &common_utils::id_type::PaymentId,
_merchant_id: &common_utils::id_type::MerchantId,
_storage_scheme: storage_enums::MerchantStorageScheme,

View File

@ -151,7 +151,7 @@ impl<T: DatabaseStore> PaymentAttemptInterface for RouterStore<T> {
#[instrument(skip_all)]
async fn find_payment_attempt_by_connector_transaction_id_payment_id_merchant_id(
&self,
connector_transaction_id: &str,
connector_transaction_id: &ConnectorTransactionId,
payment_id: &common_utils::id_type::PaymentId,
merchant_id: &common_utils::id_type::MerchantId,
_storage_scheme: MerchantStorageScheme,
@ -786,7 +786,7 @@ impl<T: DatabaseStore> PaymentAttemptInterface for KVRouterStore<T> {
#[instrument(skip_all)]
async fn find_payment_attempt_by_connector_transaction_id_payment_id_merchant_id(
&self,
connector_transaction_id: &str,
connector_transaction_id: &ConnectorTransactionId,
payment_id: &common_utils::id_type::PaymentId,
merchant_id: &common_utils::id_type::MerchantId,
storage_scheme: MerchantStorageScheme,
@ -811,8 +811,9 @@ impl<T: DatabaseStore> PaymentAttemptInterface for KVRouterStore<T> {
MerchantStorageScheme::RedisKv => {
// We assume that PaymentAttempt <=> PaymentIntent is a one-to-one relation for now
let lookup_id = format!(
"pa_conn_trans_{}_{connector_transaction_id}",
merchant_id.get_string_repr()
"pa_conn_trans_{}_{}",
merchant_id.get_string_repr(),
connector_transaction_id.get_id()
);
let lookup = fallback_reverse_lookup_not_found!(
self.get_lookup_by_lookup_id(&lookup_id, storage_scheme)