8000 GitHub - duitkupg/duitku-python: Duitku API Library for Python
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

duitkupg/duitku-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Duitku Python API Client Library

pypi Build Status License: MIT

Duitku API Library for Python

Supported Feature

Feature Function HTTP Request Description
Get Payment Method duitku.payment.get_methods POST /merchant/paymentmethod/getpaymentmethod Get list of available payment methods
Craete New Invoice duitku.invoice.create POST /merchant/createInvoice Create Transaction via POP API
Create New Transaction duitku.transaction.create POST /merchant/v2/inquiry Create Transaction via V2 API
Get Transaction duitku.transaction.get_status POST /merchant/transactionStatus Get Transaction via V2 API

Requirements

Documentation

Installation

Get this library, add to your project

pip install Duitku

Example Usage

import requests
import Duitku

from http import HTTPStatus
from datetime import datetime

duitku = Duitku.Duitku()

client = duitku.client
client.merchant_code = "YOUR MERCHANT CODE"
client.api_key = "YOUR API KEY"
client.environment = client.SandboxEnv

create_invoice_req = {
    "paymentAmount": 10001,
    "merchantOrderId": datetime.now().strfti("%Y%m%d%H%M%S"),
    "productDetails": "test invoice",
    "email": "test@duitku.com",
    "callbackUrl": "https://duitku.com/callback",
    "returnUrl": "https://duitku.com"
}
result = self.duitku.invoice.create(create_invoice_req)
print(result)

More Detailed Example

Support

If you have a feature request or spotted a bug or a techical problem, create an issue here. For other questions, please contact duitku through their live chat on your dashboard.

License

MIT license. For more information, see the LICENSE file.

Packages

No packages published

Languages

0