feat(core): enable payment refund when payment is partially captured (#2991)

Co-authored-by: Gnanasundari24 <118818938+Gnanasundari24@users.noreply.github.com>
This commit is contained in:
Hrithikesh
2023-11-28 20:44:55 +05:30
committed by GitHub
parent ff6a0dd0b5
commit 837480d935
5 changed files with 145 additions and 4 deletions

View File

@ -36,6 +36,13 @@ pub trait PaymentAttemptInterface {
storage_scheme: storage_enums::MerchantStorageScheme,
) -> error_stack::Result<PaymentAttempt, errors::StorageError>;
async fn find_payment_attempt_last_successful_or_partially_captured_attempt_by_payment_id_merchant_id(
&self,
payment_id: &str,
merchant_id: &str,
storage_scheme: storage_enums::MerchantStorageScheme,
) -> error_stack::Result<PaymentAttempt, errors::StorageError>;
async fn find_payment_attempt_by_merchant_id_connector_txn_id(
&self,
merchant_id: &str,