Skip to main content

Merchant payment library for wallet API

Project description

Merchant Payment Lib

Python library for merchant payments via wallet API.

Installation

pip install tango-merpay-lib
from merchant_payment import MerchantPaymentService

service = MerchantPaymentService(
    url="https://api.example.com",
    addon_id="your_addon_id",
    country_id="CD",
    api_key="your_api_key"
)

data = {
    "currency": "CDF",
    "mercode": "MERCH123",
    "msisdn": "243999999999",
    "amount": "1000",
    "pin": "1234"
}

merchant_payment_response = service.do_payment(data)

merchant_payment_status = merchant_payment_response["mapping_response"]["mapping_code"]
merchant_payment_reference = merchant_payment_response["wallet_response"]["txnid"]
merchant_payment_message = merchant_payment_response["wallet_response"]["message"]

if merchant_payment_status != "SUCCESS":
    pass

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

tango_merpay_lib-0.1.0.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.

tango_merpay_lib-0.1.0-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file tango_merpay_lib-0.1.0.tar.gz.

File metadata

  • Download URL: tango_merpay_lib-0.1.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for tango_merpay_lib-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8ff80e2b2e105572889796b506d4db918d0795b01b5685c10b2c4f711c3dd08a
MD5 56ea5ddfeafbcea9be15cea20a949faf
BLAKE2b-256 c50929fbf07b57aa462966ac7bb0f3112b4eabe8e60c69ed694ac36b55aab762

See more details on using hashes here.

File details

Details for the file tango_merpay_lib-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for tango_merpay_lib-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e10981e48a38ea09ad3a27356091461ee33755ae80af03a4ea855c78269b43b0
MD5 9bdebc1673d0fc938eeb7903c2b43ba2
BLAKE2b-256 a7c5aec6043ab52598e22da35dab6dc1dc749f741d7725285d6b0de30f0b2fc9

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