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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file Global Processing Services Client-0.0.1.tar.gz.
File metadata
- Download URL: Global Processing Services Client-0.0.1.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42ce60aa7a061e776158fa0756a3f02a0454f6611fd9e47228bd329e510ec3b2
|
|
| MD5 |
215812b65e9db3b52704bedc5882e4fd
|
|
| BLAKE2b-256 |
13947c5cdaab802e83b26e65564abe9235e011b11f5f53246d535ca85f9d4ee3
|
File details
Details for the file Global_Processing_Services_Client-0.0.1-py3-none-any.whl.
File metadata
- Download URL: Global_Processing_Services_Client-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae4df33d7266272f9fb068587b6f7d240fa69c01771c0f349583fe928d632ed0
|
|
| MD5 |
0c028bbf777abf3878c9b66aba39f507
|
|
| BLAKE2b-256 |
a52a08dcb4d2a38f98230370ea24b1ecc7461cd5dc94c22b6801dde58ebf6651
|