parameters: (self, values, incoming=True)
return_statement: return md5(data_string.encode('utf-8')).hexdigest()
docstring: Generate the signature for incoming or outgoing communications.
  
          :param dict values: The values used to generate the signature
          :param bool incoming: Whether the signature must be generated for an incoming (PayU Latam to
                                Odoo) or outgoing (Odoo to PayU Latam) communication.
          :return: The signature
          :rtype: str
docstring_summary: Generate the signature for incoming or outgoing communications.
docstring_tokens: Generate the signature for incoming or outgoing communications .
function: def _payulatam_generate_sign(self, values, incoming=True):
          """ Generate the signature for incoming or outgoing communications.
  
          :param dict values: The values used to generate the signature
          :param bool incoming: Whether the signature must be generated for an incoming (PayU Latam to
                                Odoo) or outgoing (Odoo to PayU Latam) communication.
          :return: The signature
          :rtype: str
          """
          if incoming:
              data_string = '~'.join([
                  self.payulatam_api_key,
                  self.payulatam_merchant_id,
                  values['referenceCode'],
                  # http://developers.payulatam.com/en/web_checkout/integration.html
                  # Section: 2. Response page > Signature validation
                  # PayU Latam use the "Round half to even" rounding method
                  # to generate their signature. This happens to be Python 3's
                  # default rounding method.
                  float_repr(float(values.get('TX_VALUE')), 1),
                  values['currency'],
                  values.get('transactionState'),
              ])
          else:
              data_string = '~'.join([
                  self.payulatam_api_key,
                  self.payulatam_merchant_id,
                  values['referenceCode'],
                  float_repr(float(values['amount']), 1),
                  values['currency'],
              ])
          return md5(data_string.encode('utf-8')).hexdigest()
function_tokens: def _payulatam_generate_sign ( self , values , incoming = True ) : if incoming : data_string = '~' . join ( [ self . payulatam_api_key , self . payulatam_merchant_id , values [ 'referenceCode' ] , # http://developers.payulatam.com/en/web_checkout/integration.html # Section: 2. Response page > Signature validation # PayU Latam use the "Round half to even" rounding method # to generate their signature. This happens to be Python 3's # default rounding method. float_repr ( float ( values . get ( 'TX_VALUE' ) ) , 1 ) , values [ 'currency' ] , values . get ( 'transactionState' ) , ] ) else : data_string = '~' . join ( [ self . payulatam_api_key , self . payulatam_merchant_id , values [ 'referenceCode' ] , float_repr ( float ( values [ 'amount' ] ) , 1 ) , values [ 'currency' ] , ] ) return md5 ( data_string . encode ( 'utf-8' ) ) . hexdigest ( )