fix: move connector_refund_id to request (#445)

This commit is contained in:
Nishant Joshi
2023-01-22 13:41:11 +05:30
committed by GitHub
parent da6a026ef7
commit d653fed773
13 changed files with 38 additions and 30 deletions

View File

@ -467,16 +467,17 @@ impl<F> TryFrom<&types::RefundsRouterData<F>> for AuthorizedotnetCreateSyncReque
fn try_from(item: &types::RefundsRouterData<F>) -> Result<Self, Self::Error> {
let transaction_id = item
.response
.as_ref()
.map(|refund_response_data| refund_response_data.connector_refund_id.clone())
.ok();
.request
.connector_refund_id
.clone()
.get_required_value("connector_refund_id")
.change_context(errors::ConnectorError::MissingConnectorRefundID)?;
let merchant_authentication = MerchantAuthentication::try_from(&item.connector_auth_type)?;
let payload = Self {
get_transaction_details_request: TransactionDetails {
merchant_authentication,
transaction_id,
transaction_id: Some(transaction_id),
},
};
Ok(payload)