parameters: (self, source_tx, data)
return_statement: return source_tx._create_refund_transaction(
              amount_to_refund=converted_amount, acquirer_reference=refund_acquirer_reference
          )
docstring: 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
docstring_summary: Create a refund transaction based on Adyen data.
docstring_tokens: Create a refund transaction based on Adyen data .
function: 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
          )
function_tokens: 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 )