Skip to content

aibaq/django-paybox-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

pip install git+ssh://[email protected]/aibaq/[email protected]

Settings

INSTALLED_APPS += ['paybox_api']

PG_URL = 'https://api.paybox.money/payment.php'
PG_REVOKE_URL = 'https://api.paybox.money/revoke.php'
PG_SECRET = os.getenv('PG_SECRET')
PG_SECRET_TICKET = os.getenv('PG_SECRET_TICKET')
PG_MERCHANT_ID = os.getenv('PG_MERCHANT_ID')
PG_TESTING_MODE = '1'
PG_RESULT_URL = 'http://yourdomain/payments/paybox/result/'
PG_SUCCESS_URL = 'http://yourdomain/payments/paybox/success/'
PG_CHECK_URL = 'http://yourdomain/payments/paybox/check/'
PG_REFUND_URL = 'http://yourdomain/payments/paybox/refund/'
PG_CAPTURE_URL = 'http://yourdomain/payments/paybox/capture/'
PG_FAILURE_URL = 'http://yourdomain/payments/paybox/failure/'

Usage

from paybox_api import PayboxAPI

PayboxAPI().get_url(
    order_id=1,
    amount=1000,
    description='Iphone11',
    salt=PayboxAPI.generate_salt(),
    email='[email protected]',
    phone='+77777777777',
)

Open generated url in browser

handle callbacks at views.py : see test_app

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages