Skip to main content

Client library for Global Processing Services

Project description

Client library for Global Processing Services

🚧 WARNING: This repository is experimental at this stage and should be used with caution 🚧

Only a handful of methods are implemented at this stage.

Installation

$ pip install globalprocessing-client

Getting started

The first thing you need to do is initialise the client:

from globalprocessing_client import GPSClient

client = GPSClient(
    "username",
    "password",
    "iss_code",
    "https://wsdl.globalprocessing.com/",
    "Australia/Sydney"
)

Once you have a client up and running, you can run the various commands

Create Card

To create a new card, simply call create_card on the newly initiated client:

card_design_id = 123
client.create_card(card_design_id)

If you want to change any of the default arguments, just pass in a dictionary with the changes as the second argument:

card_design_id = 123
default_overrides = {
    "WSID": "A different ID",
    "LoadValue": 10.0,
}
client.create_card(card_design_id, default_overrides)

Update Status

Update Status works much the same as Create Card:

card_public_token = "public token"

client.status_change(
    card_public_token,
    GPSClient.ACCOUNT_CLOSED,
)

To override default, pass a dictionary as the third argument:

card_public_token = "public token"

client.status_change(
    card_public_token,
    GPSClient.ACCOUNT_CLOSED,
    {
        "WSID": "something unique",
        "ItemSrc": "test",
    },
)

Status codes

The available status codes are available as constants on the GPSClient class:

  • OK = "00"
  • NOT_ACTIVATED = "02"
  • CAPTURE_CARD = "04"
  • DO_NOT_HONOUR = "05"
  • LOST_CARD = "41"
  • STOLEN_CARD = "43"
  • ACCOUNT_CLOSED = "46"
  • TRANSACTION_NOT_PERMITTED_TO_CARDHOLDER = "57"
  • SUSPECTED_FRAUD = "59"
  • RESTRICTED_CARD = "62"
  • SECURITY_VIOLATION = "63"
  • CARDHOLDER_CONTACT_ISSUER = "70"
  • ALLOWABLE_NUMBER_OF_PIN_TRIED_EXCEEDED = "75"
  • CARD_DESTROYED = "83"
  • REFUND_GIVEN_TO_CUSTOMER = "98"
  • CARD_VOIDED = "99"
  • SHORT_TERM_BLOCK = "G1"
  • SHORT_TERM_FULL_BLOCK = "G2"
  • LONG_TERM_BLOCK = "G3"
  • LONG_TERM_FULL_BLOCK = "G4"

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

Global Processing Services Client-0.0.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file Global Processing Services Client-0.0.1.tar.gz.

File metadata

File hashes

Hashes for Global Processing Services Client-0.0.1.tar.gz
Algorithm Hash digest
SHA256 42ce60aa7a061e776158fa0756a3f02a0454f6611fd9e47228bd329e510ec3b2
MD5 215812b65e9db3b52704bedc5882e4fd
BLAKE2b-256 13947c5cdaab802e83b26e65564abe9235e011b11f5f53246d535ca85f9d4ee3

See more details on using hashes here.

File details

Details for the file Global_Processing_Services_Client-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for Global_Processing_Services_Client-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ae4df33d7266272f9fb068587b6f7d240fa69c01771c0f349583fe928d632ed0
MD5 0c028bbf777abf3878c9b66aba39f507
BLAKE2b-256 a52a08dcb4d2a38f98230370ea24b1ecc7461cd5dc94c22b6801dde58ebf6651

See more details on using hashes here.

Supported by

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