parameters: (self, data)
docstring: Override of payment to process the transaction based on Alipay data.
  
          Note: self.ensure_one()
  
          :param dict data: The feedback data sent by the provider
          :return: None
          :raise: ValidationError if inconsistent data were received
docstring_summary: Override of payment to process the transaction based on Alipay data.
docstring_tokens: Override of payment to process the transaction based on Alipay data .
function: def _process_feedback_data(self, data):
          """ Override of payment to process the transaction based on Alipay data.
  
          Note: self.ensure_one()
  
          :param dict data: The feedback data sent by the provider
          :return: None
          :raise: ValidationError if inconsistent data were received
          """
          super()._process_feedback_data(data)
          if self.provider != 'alipay':
              return
  
          if float_compare(float(data.get('total_fee', '0.0')), (self.amount + self.fees), 2) != 0:
              # mc_gross is amount + fees
              logging_values = {
                  'amount': data.get('total_fee', '0.0'),
                  'total': self.amount,
                  'fees': self.fees,
                  'reference': self.reference,
              }
              _logger.error(
                  "the paid amount (%(amount)s) does not match the total + fees (%(total)s + "
                  "%(fees)s) for the transaction with reference %(reference)s", logging_values
              )
              raise ValidationError("Alipay: " + _("The amount does not match the total + fees."))
          if self.acquirer_id.alipay_payment_method == 'standard_checkout':
              if data.get('currency') != self.currency_id.name:
                  raise ValidationError(
                      "Alipay: " + _(
                          "The currency returned by Alipay %(rc)s does not match the transaction "
                          "currency %(tc)s.", rc=data.get('currency'), tc=self.currency_id.name
                      )
                  )
          elif data.get('seller_email') != self.acquirer_id.alipay_seller_email:
              _logger.error(
                  "the seller email (%s) does not match the configured Alipay account (%s).",
                  data.get('seller_email'), self.acquirer_id.alipay_seller_email
              )
              raise ValidationError(
                  "Alipay: " + _("The seller email does not match the configured Alipay account.")
              )
  
          self.acquirer_reference = data.get('trade_no')
          status = data.get('trade_status')
          if status in ['TRADE_FINISHED', 'TRADE_SUCCESS']:
              self._set_done()
          elif status == 'TRADE_CLOSED':
              self._set_canceled()
          else:
              _logger.info(
                  "received invalid transaction status for transaction with reference %s: %s",
                  self.reference, status
              )
              self._set_error("Alipay: " + _("received invalid transaction status: %s", status))
function_tokens: def _process_feedback_data ( self , data ) : super ( ) . _process_feedback_data ( data ) if self . provider != 'alipay' : return if float_compare ( float ( data . get ( 'total_fee' , '0.0' ) ) , ( self . amount + self . fees ) , 2 ) != 0 : # mc_gross is amount + fees logging_values = { 'amount' : data . get ( 'total_fee' , '0.0' ) , 'total' : self . amount , 'fees' : self . fees , 'reference' : self . reference , } _logger . error ( "the paid amount (%(amount)s) does not match the total + fees (%(total)s + " "%(fees)s) for the transaction with reference %(reference)s" , logging_values ) raise ValidationError ( "Alipay: " + _ ( "The amount does not match the total + fees." ) ) if self . acquirer_id . alipay_payment_method == 'standard_checkout' : if data . get ( 'currency' ) != self . currency_id . name : raise ValidationError ( "Alipay: " + _ ( "The currency returned by Alipay %(rc)s does not match the transaction " "currency %(tc)s." , rc = data . get ( 'currency' ) , tc = self . currency_id . name ) ) elif data . get ( 'seller_email' ) != self . acquirer_id . alipay_seller_email : _logger . error ( "the seller email (%s) does not match the configured Alipay account (%s)." , data . get ( 'seller_email' ) , self . acquirer_id . alipay_seller_email ) raise ValidationError ( "Alipay: " + _ ( "The seller email does not match the configured Alipay account." ) ) self . acquirer_reference = data . get ( 'trade_no' ) status = data . get ( 'trade_status' ) if status in [ 'TRADE_FINISHED' , 'TRADE_SUCCESS' ] : self . _set_done ( ) elif status == 'TRADE_CLOSED' : self . _set_canceled ( ) else : _logger . info ( "received invalid transaction status for transaction with reference %s: %s" , self . reference , status ) self . _set_error ( "Alipay: " + _ ( "received invalid transaction status: %s" , status ) )