code: def process_response(data):
      
      # We check if the signature is valid. If not return
      if not is_signature_valid(data):
          logger.warning(
              "Django-Payzen : Response signature detected as invalid",
              extra={"stack": True}
          )
          return None
  
      from . import forms
      from . import models
  
      # The signature is valid
      vads_trans_id = data.get("vads_trans_id")
      vads_trans_date = data.get("vads_trans_date")
      vads_site_id = data.get("vads_site_id")
      try:
          instance = models.PaymentResponse.objects.get(
              vads_trans_id=vads_trans_id,
              vads_trans_date=vads_trans_date,
              vads_site_id=vads_site_id)
          form = forms.PaymentResponseForm(data, instance=instance)
      except models.PaymentResponse.DoesNotExist:
          form = forms.PaymentResponseForm(data)
      if form.is_valid():
          response = form.save()
          logger.info("Django-Payzen : Transaction {} response received !"
                      .format(response.vads_trans_id))
      else:
          logger.error("Django-Payzen : Response could not be saved - {} {}"
                       .format(form.errors, data),
                       extra={"stack": True})
          response = None
      return response
docs: Process a payment response.