GWX Payment
Payment gateway integration bridge for python, specifically flask based applications.
Dependencies
- Python 3.7^
- PyYAML
- stripe
- Werkzeug 0.16^
Installation
- Install the package using pip, by executing:
pip install -U gwx-payment
- Create the
<your_config_name>.yamlfile, this MUST follow the following convention:
# This indicates the current `Active` payment service
provider: stripe
stripe:
api_url: <api_url>
public_key: <public_key>
api_key: <api_key>
success_url: <success_url>
cancel_url: <cancel_url>
paypal:
api_url: <api_url>
public_key: <public_key>
api_key: <api_key>
success_url: <success_url>
cancel_url: <cancel_url>
Quickstart
First import the Provider Service class
from gwx_payment.provider_service import ProviderService
Then instantiate the ProviderService class along with it's config dependencies:
payment_variable = ProviderService('/path/to/config/dir', 'your_config_name.yaml').get_payment_service()
The provider service accepts a .yaml file type as it's config file.
Viola! you can now use it for your payment transactions.
Usage
The following are the methods available within the AbstractPaymentService and their functionality.
| Method Name | Functionality |
|---|---|
| create_payment | Checkout method, this will initiate the payment transaction. |
| :param kwargs: the parameters for the payment creation. | |
| :return: structured value required for response composition. | |
| get_payment | Retrieve a specific payment record |
| :param payment_id: the primary id used to reference against an endpoint. | |
| :return: the retrieved record, null if none found. | |
| confirm_payment | Confirm the payment, this states that the payment has been accepted, |
| and sent to the vendor. | |
| :param kwargs: named payload parameters | |
| :return: structured value required for response composition. |
Metadata
Release files for gwx-payment 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gwx-payment-0.0.3.tar.gz | 5.8 kB | Without provenance | Details for gwx-payment-0.0.3.tar.gz |
Release files / gwx-payment-0.0.3.tar.gz
| Download URL | gwx-payment-0.0.3.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0bc3a5c6ebfb2978d1fdc2d8ea2781539cd81ed5bc53f1f4dbf32616472aa277
|
|
BLAKE2b-256 checksum How to use checksums |
37522bb9b3da415ad8e1accc9b1e74b7e7405072481465a2a4a2f7e401393eff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5
|
Security for gwx-payment 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.