Skip to main content

A Python library for the CredoPay payment gateway.

Project description

CredoPay Payment Gateway

CredoPay Payment Gateway is a Python library that provides an easy-to-use interface for interacting with the CredoPay payment gateway API. This library allows you to create orders, check order statuses, and manage transactions securely and efficiently.

Features

  • Order Management: Create and manage orders through CredoPay.
  • Transaction Management: Handle transactions with ease.
  • Secure Authentication: Uses secure basic authentication for API requests.
  • System Information: Attaches system and server information to each request for better tracking and security.

Installation

You can install the package via pip. Run the following command:

pip install credopay-paymentgateway

Usage

Initializing the Gateway

To start using the CredoPay Gateway, initialize the CredoPayPaymentGateway class with your client ID and client secret:

from credopay_paymentgateway import CredoPayPaymentGateway

gateway = CredoPayPaymentGateway('your-client-id', 'your-client-secret')

Creating an Order

To create an order, use the create_order method of the OrderAPI class:

order_data = {
    'receiptId': '00000001',
    'amount': 100,
    'currency': 'INR',
    'description': 'Test Payment',
    'customerFields': {
        'name': 'Sample User',
        'email': 'xxx@yyy.xom',
        'phone': '1234567890'
    },
    'uiMode': 'checkout'
}

try:
    order_response = gateway.order.create_order(order_data)
    print("Order Response:", order_response)
except Exception as e:
    print('Error:', e)

Checking Order Status

To check the status of an existing order, use the check_status method:

order_id = 'order-id'

try:
    status_response = gateway.order.check_status(order_id)
    print("Order Status:", status_response)
except Exception as e:
    print('Error:', e)

License

This project is licensed under the MIT License.

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

credopay_paymentgateway-0.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

credopay_paymentgateway-0.1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file credopay_paymentgateway-0.1.tar.gz.

File metadata

  • Download URL: credopay_paymentgateway-0.1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for credopay_paymentgateway-0.1.tar.gz
Algorithm Hash digest
SHA256 1cf5a1c4108225e4d48a04e38563d146a2fdf936c18c03c8d04ba73c9d7072f0
MD5 cf042b47edfe375924d8b10ebdff2b66
BLAKE2b-256 7ac1bd0e4495dee8c4c870e19fb64bcdecd4748aa6d99db810282684874aefc2

See more details on using hashes here.

File details

Details for the file credopay_paymentgateway-0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for credopay_paymentgateway-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5be303a709b61548000e4064e3829eaf042265ac2639570b4db9483ff219ac8f
MD5 ec8cc569f8f62fa5468d5a2fb418a66e
BLAKE2b-256 c9d0de847b6551ad60bbdc8c9f8a2d1033119cc0bd1492fd73df425c545fa2c8

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