{ "info": { "author": "leavesfan", "author_email": "leavesfan@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "WechatPay\n=============\n\nWechatPay is a sdk for wechat pay, Before using this, you need to set up the configuration of wechat pay.\n\n\nAbout pay, please read the [wechat pay document](https://pay.weixin.qq.com/wiki/doc/api/index.html)\n\n#### how to install\n\n```\ngit clone git@github.com:fanhan/wechatpay.git\n\ncd wechatpay\npython setup.py install\n```\n\n[how to get openid](https://pay.weixin.qq.com/wiki/doc/api/app.php?chapter=4_4)\n\n#### how to use?\n\n```python\nfrom wechatpay import WechatPay\n\nclass Pay(WechatPay):\n\tappid = 'your_appid'\n\tmch_id = 'your_mch_id'\n\tappSecret = 'your_appSecret'\n\tpartnerKey = 'your_partnerKey'\n\tnotify_url = 'your_notify_url'\n\t# if need cert\n\tcert = '/path/your_cert.pem'\n\n# for app sdk pay\nparams = {\n\t'body': '',\n\t'out_trade_no': '',\n\t'total_fee': 1,\n\t'fee_type': 'CNY',\n\t'spbill_create_ip': '127.0.0.1'\n}\n\nret = Pay().app_pay(params)\n\n# for qr code pay\nparams = {\n\t'body': '',\n\t'out_trade_no': '',\n\t'total_fee': 1,\n\t'fee_type': 'CNY',\n\t'spbill_create_ip': '127.0.0.1',\n\t'product_id': '1111'\n}\n\nret = Pay().qrcode_pay(params)\n\n# for jsapi pay\nparams = {\n\t'body': '',\n\t'out_trade_no': '',\n\t'total_fee': 1,\n\t'fee_type': 'CNY',\n\t'spbill_create_ip': '127.0.0.1',\n\t'openid': 'xxxxxx' # from wechat service get openid\n}\n\nret = Pay().jsapi_pay(params)\n\n# for micropay\nparams = {\n\t'body': '',\n\t'out_trade_no': '',\n\t'total_fee': 1,\n\t'fee_type': 'CNY',\n\t'spbill_create_ip': '127.0.0.1',\n\t'auth_code': 'xxxxxx'\n}\n\nret = Pay().micropay(params)\n\n# order query\nret = Pay().order_query(transaction_id='xxxxx') or Pay().order_query(out_trade_no='xxxx')\n\n# order reverse\n# need cert\nout_trade_no = 'xxxx'\nret = Pay().order_reverse(out_trade_no)\n\n# order refund\n# need cert\nparams = {\n\t'out_order_no': 'xxxx',\n\t'out_refund_no': 'xxxx',\n\t'total_fee': 1,\n\t'refund_fee': 1,\n}\nret = Pay().order_refund(params)\n\n# refund order query\nparams = {\n\t'out_order_no': 'xxxx',\n}\nret = Pay().refund_order_query(params)\n```", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/fanhan/wechatpay", "keywords": null, "license": "Public domain", "maintainer": null, "maintainer_email": null, "name": "wechat_pay", "package_url": "https://pypi.org/project/wechat_pay/", "platform": "any", "project_url": "https://pypi.org/project/wechat_pay/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/fanhan/wechatpay" }, "release_url": "https://pypi.org/project/wechat_pay/0.2/", "requires_dist": null, "requires_python": null, "summary": "A relative to wechat pay project", "version": "0.2" }, "last_serial": 1757985, "releases": { "0.1": [], "0.2": [ { "comment_text": "", "digests": { "md5": "959872352c7542e6585c6f00aaaf08be", "sha256": "672c066bc4d9ca5eb71e6f0e3fb3c4ac6a10906be1eb05144413c138e3387edf" }, "downloads": -1, "filename": "wechat_pay-0.2.tar.gz", "has_sig": false, "md5_digest": "959872352c7542e6585c6f00aaaf08be", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5589, "upload_time": "2015-10-08T09:34:15", "url": "https://files.pythonhosted.org/packages/14/17/9c6a91ee18d88eee1c5e06945b399c4796254b49fa887c12780e12f5358e/wechat_pay-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "959872352c7542e6585c6f00aaaf08be", "sha256": "672c066bc4d9ca5eb71e6f0e3fb3c4ac6a10906be1eb05144413c138e3387edf" }, "downloads": -1, "filename": "wechat_pay-0.2.tar.gz", "has_sig": false, "md5_digest": "959872352c7542e6585c6f00aaaf08be", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5589, "upload_time": "2015-10-08T09:34:15", "url": "https://files.pythonhosted.org/packages/14/17/9c6a91ee18d88eee1c5e06945b399c4796254b49fa887c12780e12f5358e/wechat_pay-0.2.tar.gz" } ] }