Socket
Socket
Sign inDemoInstall

ksher

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ksher

python implementation for Khser Payment API.


Maintainers
1

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)


Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc