def verify(self, transaction):
    "Verifies the transaction with Pay.ir.\n\n        When a transaction returns with status '1', it must be verified with Pay.ir. Otherwise, it will be returned to\n        the payer's bank account in 30 minutes. The method returns the updated transaction object and a boolean value.\n        The boolean value would be True if the `verified` flag of the transaction was switched to True. If the\n        `verified` attribute of transaction object and the returned boolean value do not match, the user might be trying\n        to confirm a payment for a second time.\n\n        :param transaction: The transaction object corresponding to the specified token in request.GET.\n        "
    payload = {'api': self.api_key, 'token': transaction.token}
    response = requests.post(self.verification_url, data=payload)
    data = response.json()
    if response:
        if (not transaction.verified):
            transaction.gateway = self
            transaction.verified = True
            transaction.verified_at = timezone.now()
            transaction.save()
            return (transaction, True)
        else:
            return (transaction, False)
    raise exceptions.GatewayError(error_code=data['errorCode'], error_message=data['errorMessage'])
Verifies the transaction with Pay.ir.

When a transaction returns with status '1', it must be verified with Pay.ir. Otherwise, it will be returned to
the payer's bank account in 30 minutes. The method returns the updated transaction object and a boolean value.
The boolean value would be True if the `verified` flag of the transaction was switched to True. If the
`verified` attribute of transaction object and the returned boolean value do not match, the user might be trying
to confirm a payment for a second time.

:param transaction: The transaction object corresponding to the specified token in request.GET.
def verify(self, transaction):
    "Verifies the transaction with Pay.ir.\n\n        When a transaction returns with status '1', it must be verified with Pay.ir. Otherwise, it will be returned to\n        the payer's bank account in 30 minutes. The method returns the updated transaction object and a boolean value.\n        The boolean value would be True if the `verified` flag of the transaction was switched to True. If the\n        `verified` attribute of transaction object and the returned boolean value do not match, the user might be trying\n        to confirm a payment for a second time.\n\n        :param transaction: The transaction object corresponding to the specified token in request.GET.\n        "
    payload = {'api': self.api_key, 'token': transaction.token}
    response = requests.post(self.verification_url, data=payload)
    data = response.json()
    if response:
        if (not transaction.verified):
            transaction.gateway = self
            transaction.verified = True
            transaction.verified_at = timezone.now()
            transaction.save()
            return (transaction, True)
        else:
            return (transaction, False)
    raise exceptions.GatewayError(error_code=data['errorCode'], error_message=data['errorMessage'])