Skip to main content

A small example package

Project description

    import collpay

    collpay_obj = collpay.Collpay("0810545410c0dd7822cdd7c7caa336b2", collpay.ENV_SANDBOX, collpay.V1)

    response = collpay_obj.get_exchange_rate("USD", "BTC")
    print(response)

    response = collpay_obj.create_transaction({
        'payment_currency': 'BTC',
        'order_currency': 'USD',
        'order_amount': '10',
        'payer_name': 'Xxx',
        'payer_email': 'xxx@gmail.com',
        'payer_phone': 'xxxxxxxx',
        'payer_address': 'Bangladesh 1216',
        'ipn_url': 'https://webhook.site/3b3ed4bf-8adb-4aec-b360-1d0c1c394766',
        'ipn_secret': 'Cf9mx4nAvRuy5vwBY2FCtaKr',   #Any random secret string of your's, It can be empty.
        'success_url': 'https://www.success.io/success.html',
        'cancel_url': 'https://www.failure.io/cancel.html',
        'cart': '{"item_name":"t-shirt","item_number":"23","invoice":"SDF-453672-PMT"}',   #Send any data format like json
        'webhook_data': '{"order_id":"ABC12345-12"}'    #Send any data format like json
    })
    print(response)

    response = collpay_obj.get_transaction("xxxxxxxxxxx")
    print(response)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dk-test-py2-0.0.14.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dk_test_py2-0.0.14-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file dk-test-py2-0.0.14.tar.gz.

File metadata

  • Download URL: dk-test-py2-0.0.14.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

File hashes

Hashes for dk-test-py2-0.0.14.tar.gz
Algorithm Hash digest
SHA256 66681f9c5c0f616742d1ea578704f0fa1d5ed93dabcd550b3f7726507efe4b95
MD5 f06372a43dad2770d72edf8dc50a4443
BLAKE2b-256 8dedb1b5f0df73fb50d5eb842c339dd76075b026b47f13fb8e0c3b9acff5a5f1

See more details on using hashes here.

File details

Details for the file dk_test_py2-0.0.14-py3-none-any.whl.

File metadata

  • Download URL: dk_test_py2-0.0.14-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

File hashes

Hashes for dk_test_py2-0.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 af9ba181855205c8b905b4a98e7a98db9772a1fe8a8f8421abef5aa8fff0248f
MD5 5fcb60d67f74d983f3a69395d6723e92
BLAKE2b-256 606c94ef77bc1cf79163378c19443dd63e5028ea54b9220e4fb505397cce72d8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page