code: def verify(self):
          
          self.response = self._postback().decode('ascii')
          self.clear_flag()
          self._verify_postback()
          if not self.flag:
              if self.is_transaction():
                  if self.payment_status not in self.PAYMENT_STATUS_CHOICES:
                      self.set_flag("Invalid payment_status. (%s)" % self.payment_status)
                  if duplicate_txn_id(self):
                      self.set_flag("Duplicate txn_id. (%s)" % self.txn_id)
  
          self.save()
docs: Verifies an IPN and a PDT.
          Checks for obvious signs of weirdness in the payment and flags appropriately.