Skip to main content

Korta Client library

Project description

Korta

Python client fyrir Kortaþjónustuna. Mjög minimal og mjög beta í augnablikinu.

Notkun

Af því gefnu að þú sért með aðgangsupplýsingar frá kortu:

>>> from korta.client import Client, CreditCard, Order, korta_reference
>>> c = Client('/path/to/my/pem', '/path/to/my/crt',
...    'user_id', 'password', 'site_id', 'acceptor_id',
...    'acceptor_terminal')
>>> ref = korta_reference()
>>> c.one_off(Order(ref, 2000), CreditCard(number, month, year, ccv))

Uppsetning

Til að setja upp þarf að keyra:

$ python setup.py install

Prófanir

Af því gefnu að þú sért með aðgangsupplýsingar frá kortu.

  1. Búðu til userconfig.ini á sama leveli og setup.py með eftirfarandi gildum:

    [korta]
    user = user
    password = password
    site_id = number_from_korta
    card_acceptor_id = number_from_korta
    card_acceptor_identity = number_from_korta
    host = test.kortathjonustan.is
    pem_path = certs/test.rpcs.kortathjonustan.is.crt.pem
    ca_path = certs/ca-bundle.crt
  2. Setja upp nose:

    $ pip install nose
  3. Keyra:

    $ nosetests

Athugasemdir

  • Þarfnast pycurl, hef því ekki hugmynd hvort það virki á Windows.

  • Default ssl pakkinn í Python styður ekki password callbackið úr openssl, ástæðan fyrir pycurl

Böggar og patchar

Þróun fer fram á github: http://github.com/StefanKjartansson/Korta

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

korta-0.1.4.2.tar.gz (12.0 kB view details)

Uploaded Source

File details

Details for the file korta-0.1.4.2.tar.gz.

File metadata

  • Download URL: korta-0.1.4.2.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for korta-0.1.4.2.tar.gz
Algorithm Hash digest
SHA256 28569a92099bb70a5cb5023f32d9aea548b5037e71a2ade602cc0429d47f2058
MD5 7b167b75624e70c66d6ae653da5aa7c8
BLAKE2b-256 04fab9324767875b1bf8dbbffbab9f98d266ce5c8efa2adeabdef98e6876cbd5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page