(self, source_tx, data)
return source_tx._create_refund_transaction(
            amount_to_refund=converted_amount, acquirer_reference=refund_acquirer_reference
        )
Create a refund transaction based on Adyen data.

        :param recordset source_tx: The source transaction for which a refund is initiated, as a
                                    `payment.transaction` recordset
        :param dict data: The feedback data sent by the provider
        :return: The created refund transaction
        :rtype: recordset of `payment.transaction`
        :raise: ValidationError if inconsistent data were received
Create a refund transaction based on Adyen data.
Create a refund transaction based on Adyen data .
def _adyen_create_refund_tx_from_feedback_data(self, source_tx, data):
        """ Create a refund transaction based on Adyen data.

        :param recordset source_tx: The source transaction for which a refund is initiated, as a
                                    `payment.transaction` recordset
        :param dict data: The feedback data sent by the provider
        :return: The created refund transaction
        :rtype: recordset of `payment.transaction`
        :raise: ValidationError if inconsistent data were received
        """
        refund_acquirer_reference = data.get('pspReference')
        amount_to_refund = data.get('amount', {}).get('value')
        if not refund_acquirer_reference or not amount_to_refund:
            raise ValidationError(
                "Adyen: " + _("Received refund data with missing transaction values")
            )

        converted_amount = payment_utils.to_major_currency_units(
            amount_to_refund, source_tx.currency_id
        )
        return source_tx._create_refund_transaction(
            amount_to_refund=converted_amount, acquirer_reference=refund_acquirer_reference
        )
def _adyen_create_refund_tx_from_feedback_data ( self , source_tx , data ) : refund_acquirer_reference = data . get ( 'pspReference' ) amount_to_refund = data . get ( 'amount' , { } ) . get ( 'value' ) if not refund_acquirer_reference or not amount_to_refund : raise ValidationError ( "Adyen: " + _ ( "Received refund data with missing transaction values" ) ) converted_amount = payment_utils . to_major_currency_units ( amount_to_refund , source_tx . currency_id ) return source_tx . _create_refund_transaction ( amount_to_refund = converted_amount , acquirer_reference = refund_acquirer_reference )