'Generate the shasign for incoming or outgoing communications.
:param dict values: transaction values
:return string: shasign'

def _sips_generate_shasign(self, values):

    if (self.provider != 'sips'):
        raise ValidationError(_('Incorrect    payment    acquirer    provider'))
    data = values['Data']
    key = u'002001000000001_KEY1'
    if (self.environment == 'prod'):
        key = getattr(self, 'sips_secret')
    shasign = sha256((data + key))
    return shasign.hexdigest()
