Skip to main content

python implementation for Khser Payment API.

Project description

ksher_sdk_python

Ksher python Library at http://api.ksher.net

How to install

pip3 install ksher
from ksher.ksher_pay_sdk import KsherPay

appid=mch35005
privatekey=/Users/yourpath/repo/ksher_sdk_python/mch_privkey.pem
pubkey=/Users/yourpath/repo/ksher_sdk_python/ksher_pubkey.pem

payment_handle = KsherPay(appid, privatekey, pubkey)
data = {
    "total_fee": "100",
    "fee_type": "THB",
    "mch_code": "",
    "refer_url": "http://www.baidu.com",
    "mch_redirect_url":"http://www.baidu.com/api/gateway_pay/success",
    "mch_redirect_url_fail":"http://www.baidu.com/api/gateway_pay/fail",
    "mch_notify_url":"http://www.baidu.com/api/gateway_pay/notify_url/",
    "product_name":"",
    "channel_list":"promptpay,linepay,airpay,truemoney,atome,card,ktc_instal,kbank_instal,kcc_instal,kfc_instal,scb_easy,bbl_deeplink,baybank_deeplink,kplus,alipay,wechat,card,ktc_instal,kbank_instal,kcc_instal,kfc_instal"
}
data['mch_order_no'] = generate_order_id()
resp = payment_handle.gateway_pay(data)


Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

ksher-0.1.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

ksher-0.1-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ksher-0.1.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for ksher-0.1.tar.gz
Algorithm Hash digest
SHA256 5da911f5f9c4e7d62fc1d72175c42f54ad4ea168e6a7506b156851e1aaa7f04b
MD5 5cbbb7e3a005ff5908a57deaf08f79e4
BLAKE2b-256 bb9b769781e948dae0d92170679e9202e83926a717baabc8f829a9ed850993ff

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ksher-0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for ksher-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 301d22fec63a47cd31e176387377cdc7f42e32ae00efd6da457b7833d278d56a
MD5 c481541e62ea0ba486a491c0cf358510
BLAKE2b-256 303766b52489b4fb5f8a6afec678f21e637c4634c98651dd82bea4313c9be400

See more details on using hashes here.

Supported by

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