{"id":18930066,"url":"https://github.com/labd/python-ideal","last_synced_at":"2025-10-30T07:43:44.986Z","repository":{"id":78051760,"uuid":"119386087","full_name":"labd/python-ideal","owner":"labd","description":"Fork of https://bitbucket.org/maykinmedia/python-ideal","archived":false,"fork":false,"pushed_at":"2018-01-31T15:33:32.000Z","size":59,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-01T07:54:11.957Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/labd.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-29T13:29:12.000Z","updated_at":"2018-01-30T13:41:51.000Z","dependencies_parsed_at":"2023-02-24T08:00:34.940Z","dependency_job_id":null,"html_url":"https://github.com/labd/python-ideal","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/labd/python-ideal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labd%2Fpython-ideal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labd%2Fpython-ideal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labd%2Fpython-ideal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labd%2Fpython-ideal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/labd","download_url":"https://codeload.github.com/labd/python-ideal/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labd%2Fpython-ideal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281770029,"owners_count":26558441,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-30T02:00:06.501Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T11:36:23.359Z","updated_at":"2025-10-30T07:43:44.956Z","avatar_url":"https://github.com/labd.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Python iDEAL\r\n============\r\n\r\nImplementation of the iDEAL v3.1.1 specification in Python.\r\n\r\nQuick start\r\n===========\r\n\r\nIt is assumed you have already requested access at your bank for iDEAL.\r\n\r\n1. Install this library in your virtual environment.\r\n\r\n2. Generate or locate your certificates (``cert.cer``, and ``priv.pem``) and your bank's public certificate\r\n   (``ideal_v3.cer``), and place them in a folder where your web application can access them.\r\n\r\n3. Create a config file called ``ideal.cfg`` (or copy and modify the ``ideal-example.cfg``)::\r\n\r\n    [ideal]\r\n    debug = 1\r\n    private_key_file = priv.pem\r\n    private_key_password = secret\r\n    private_certificate = cert.cer\r\n    certificates = ideal_v3.cer\r\n    merchant_id = 123456789\r\n    sub_id = 0\r\n    merchant_return_url = https://www.example.com/ideal/callback/\r\n    acquirer = ING\r\n\r\n4. In Python, make sure your settings are initialized by loading the config file::\r\n\r\n    from ideal.conf import settings\r\n    settings.load('ideal.cfg')\r\n\r\n    # You may adjust (or completely define) your settings (capitalized) in Python as well\r\n    settings.DEBUG = True\r\n\r\n5. After your settings are loaded, you can communicate with iDEAL::\r\n\r\n    from ideal.client import IdealClient\r\n    ideal = IdealClient()\r\n\r\n    response = ideal.get_issuers()\r\n    print response.issuers\r\n\r\n\r\nSettings\r\n========\r\n\r\n*DEBUG* (``boolean``)\r\n    Uses the test URL of the acquirer if set to ``True``, otherwise the production URL is used (default: ``True``).\r\n\r\n*PRIVATE_KEY_FILE* (``string``)\r\n    Absolute path to the merchant's private key (default: ``priv.pem``).\r\n\r\n*PRIVATE_KEY_PASSWORD* (``string``)\r\n    Password to access the merchant's private key.\r\n\r\n*PRIVATE_CERTIFICATE* (``string``)\r\n    Absolute path to the merchant's private certificate (default: ``cert.cer``).\r\n\r\n*CERTIFICATES* (``list`` or comma-separated ``string`` if file config is used)\r\n    Absolute path the the acquirer's iDEAL certificate (default: ``ideal_v3.cer``).\r\n\r\n*MERCHANT_ID* (``string``)\r\n    The ID of the online shop, received by the acceptor during the iDEAL registration process.\r\n\r\n*SUB_ID* (``string``)\r\n    Sub ID of the online shop, also received during the registration process (default: ``0``).\r\n\r\n*MERCHANT_RETURN_URL* (``string``)\r\n    The callback URL for iDEAL. The customer is redirected to this URL after the payment process at the acquirer.\r\n\r\n*EXPIRATION_PERIOD* (``string``)\r\n    The time a transaction is valid for in ISO 8601 format, minimum is 1 minute, maximum is 1 hour (default: ``PT15M``).\r\n\r\n*ACQUIRER* (``string``)\r\n    Acquirer code to identify the endpoint. Valid values are: [``ING``, ``RABOBANK``] (default: ``None``).\r\n\r\n*ACQUIRER_URL* (``string``)\r\n    Overrides the default acquirer URL and ignores the ``ACQUIRER`` and ``DEBUG`` setting (default: ``None``).\r\n\r\n*LANGUAGE* (``string``)\r\n    Response language in ISO 639-1 format, only Dutch (``nl``) and English (``en``) are supported (default: ``nl``).\r\n\r\n\r\nTesting\r\n=======\r\n\r\nTo run all unit tests, download the entire package and run::\r\n\r\n    python setup.py tests --test-suite ideal.tests\r\n\r\n\r\nContrib\r\n=======\r\n\r\nDjango\r\n------\r\n\r\n1. All settings can be capitalized and prefixed with ``IDEAL_`` and placed in Django's ``settings.py`` file, rather than\r\n   using a configuration file. Of course, you may still use the settings file method.\r\n\r\n2. Add ``ideal.contrib.django.ideal_compat`` to your ``INSTALLED_APPS``.\r\n\r\n\r\n3. You should create a view to handle the iDEAL callback and add the URL (as defined in your settings as\r\n   ``MERCHANT_RETURN_URL``) to your ``urls.py``. Below, you'll find an example view to redirect the use depending on the\r\n   transaction status::\r\n\r\n    from django.views.generic.base import RedirectView\r\n    from ideal.client import IdealClient\r\n    from ideal.exceptions import IdealException\r\n\r\n    class IdealCallbackView(RedirectView):\r\n        permanent = False\r\n\r\n        def get_redirect_url(self, **kwargs):\r\n            \"\"\"\r\n            Simplistic view to handle the callback. You probably want to update your database with the transaction\r\n            status as well, or sent a confirmation email, etc.\r\n            \"\"\"\r\n            client = IdealClient()\r\n\r\n            try:\r\n                response = client.get_transaction_status(self.request.GET.get('trxid'))\r\n                if response.status == TransactionStatus.SUCCESS:\r\n                    # Redirect to some view with a success message.\r\n                    return '\u003cpayment success url\u003e'\r\n            except IdealException, e:\r\n                # Do something with the error message.\r\n                error_message = e.message\r\n\r\n            # Redirect to some view with a failure message.\r\n            return '\u003cpayment failed url\u003e'\r\n\r\n4. Optionally, you can add the the following to your main ``urls.py`` to test your configuration and perform all iDEAL\r\n   operations via a web interface::\r\n\r\n    if settings.DEBUG:\r\n        urlpatterns += patterns('',\r\n            (r'^ideal/tests/', include('ideal.contrib.django.ideal_compat.test_urls')),\r\n        )\r\n\r\n5. If you are in DEBUG mode and use ``runserver``, you can point your browser to:\r\n   ``http://localhost:8000/ideal/tests/``.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flabd%2Fpython-ideal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flabd%2Fpython-ideal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flabd%2Fpython-ideal/lists"}