GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - DHFinance/dhf-pay-python: Python SDK to integrate with DHFinance in minutes

BranchesTags
Open more actions menu

Latest commit

 

History

38 Commits
38 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
dhf_wrapper
dhf_wrapper
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.rst
README.rst
 
 
SECURITY.md
SECURITY.md
 
 
setup.cfg
setup.cfg
 
 
setup.py
setup.py
 
 

Repository files navigation

DHF-SDK

Python SDK to integrate with DHFinance in minutes.

Getting Started

  1. Sign up - Before you begin, you need to sign up for your payment gateway account (https://pay.dhfi.online as example) and retrieve your store API token (add Store - APIKey Generate) and API_URL (https://pay.dhfi.online/api as example).
  2. Requirements – To run the SDK, your system will need to have Python >= 3.7.
  3. Install

Local build:

python setup.py install --user

From PyPi:

pip install dhf-sdk

Usage

from dhf_wrapper.client import TransactionClient, PaymentClient
from dhf_wrapper.entities.transaction import TransactionParamsDTO
from dhf_wrapper.entities.payment import PaymentDTO

transaction_client = TransactionClient('http://example.com', token='xxxxx')

#Get transactions list
transactions = transaction_client.get_transactions(
    params=TransactionParamsDTO(limit=1)
)

payment_client = PaymentClient('http://example.com', token='xxxxx')

#Get payments list
payments = payment_client.get_payments()

#Get payments by id
payment = payment_client.get_payment(payment_id=1)

#Add new payment
new_payment = payment_client.create_payment(payment=PaymentDTO(
    amount=2500000000,
    comment="test",
))

Note: amount should be in motes, for example 1 cspr = 1000000000 in motes

Run tests

To run unit tests:

nosetests --verbosity=2 tests/unit

To run integration tests set up environment variables:

TOKEN - Store API key.
API_BASE_URL - Base URL.

And then call for tests:

nosetests --verbosity=2 tests/integration

About

Python SDK to integrate with DHFinance in minutes

dhfi.io/

Topics

blockchaincaspercsprpayment-gatewaypython-sdk

Resources

Readme
Apache-2.0 license

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

6 stars

Watchers

3 watching

Forks

7 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.