Facilitates the intereaction with Vpos API
Project description
# vPOS Python
![package](https://github.com/nextbss/vpos-python/workflows/package/badge.svg?branch=main) [![](https://img.shields.io/badge/nextbss-opensource-blue.svg)](https://www.nextbss.co.ao)
This python package allows you to interact with the vPOS API
## Installation
`python pip install vpos `
## Configuration | Variable | Description | Required | | — | — | — | | GPO_POS_ID | The Point of Sale ID provided by EMIS | true | | GPO_SUPERVISOR_CARD | The Supervisor card ID provided by EMIS | true | | MERCHANT_VPOS_TOKEN | The API token provided by vPOS | true | | PAYMENT_CALLBACK_URL | The URL that will handle payment notifications | false | | REFUND_CALLBACK_URL | The URL that will handle refund notifications | false | | VPOS_ENVIRONMENT | The vPOS environment, leave empty for sandbox mode and use “prd” for production. | false |
Don’t have this information? [Talk to us](suporte@vpos.ao)
## Use
### Get all transactions This method retrieves all transactions
`python import vpos transactions = vpos.get_transactions() `
### Get a specific Transaction Retrieves a transaction given a valid transaction ID `python import vpos transaction = vpos.get_transaction("1kTFGhJH8i58uD9MdJpMjWnoE") `
### New Payment `python import vpos transactions = vpos.new_payment("900111222", "123.45") ` | Argument | Description | Type | | — | — | — | | mobile | The mobile number of the client who will pay | string | amount | The amount the client should pay, eg. “259.99”, “259,000.00” | string
### Request Refund `python import vpos transaction = vpos.new_refund("1jHbXEbRTIbbwaoJ6w06nLcRG7X") `
### Poll Transaction Status Poll the status of a transaction given a valid request_id.
Note: The request_id in this context is essentially the transaction_id of an existing request.
`python import vpos transaction = vpos.get_request("1jHbXEbRTIbbwaoJ6w06nLcRG7X") `
### Have any doubts? In case of any doubts, bugs, or the like, please leave an issue. We would love to help.
License
The library is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
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
File details
Details for the file vpos-1.0.tar.gz
.
File metadata
- Download URL: vpos-1.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.23.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e504fa79eabd997afa3dc4042905eba2d862a43cf53dcbd55a337b596dfeccd2 |
|
MD5 | 6ade0ccbbb6ba687ba62f664eb145e28 |
|
BLAKE2b-256 | 7d556037a1f5fa1153d6de2dfa0a4e5f24c028ed45ba98c2718cd9bbb470a3fc |
File details
Details for the file vpos-1.0-py3-none-any.whl
.
File metadata
- Download URL: vpos-1.0-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.23.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 738797799fa230931c5c7c6a2b54c3f60f8501161c364e705c15badcd3968894 |
|
MD5 | b964b68641f090fb1c507eb8daef3494 |
|
BLAKE2b-256 | c263c8b165512e064e2c000bfea6af3017561d14e4624791025534fee208cf07 |