Name | django-alipay2 JSON |
Version |
1.1.8
JSON |
| download |
home_page | |
Summary | alipay for django |
upload_time | 2023-04-03 01:40:51 |
maintainer | |
docs_url | None |
author | Your Name |
requires_python | |
license | BSD License |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
==============
django-alipay2
==============
提供django下alipay直接支付接口
Quick start
-----------
1. Install::
pip install django_alipay2
2. Add "alipay" to your INSTALLED_APPS setting like this::
INSTALLED_APPS = [
...
'alipay',
]
3. [Optional] Include the alipay URLconf in your project urls.py like this::
url(r'^alipay/', include('alipay.urls')),
4. Migrate::
python manage.py migrate
5. Add config 'ALIPAY' to settings.py like this::
# account below is for sandbox
ALIPAY = {
'pid': '2088101122136241',
'key': '760bdzec6y9goq7ctyx96ezkz78287de',
'seller_email': 'overseas_kgtest@163.com',
'gateway': 'https://openapi.alipaydev.com/gateway.do?',
'server_url': 'http://localhost:8000'
# RSA specified
'rsa_public_raw_key': '',
'sign_type': 'RSA',
}
# you may add an 'api_provider' to support multiple seller
ALIPAY = {
'api_provider': 'some_package.sub_package.get_alipay_alipay' # input:seller_email, output:AlipayAPI
}
6. Create alipay redirect::
import uuid
payment = AlipayPayment.objects.create(
out_no=uuid.uuid4(),
subject='充值',
body='1年365元',
amount_total=0.01,
user=None, # 可以指定user
seller_email='your_seller_email@domain.com',
# reference_id='1' # 可选
)
return redirect('alipay_redirect', out_no=payment.out_no)
Raw data
{
"_id": null,
"home_page": "",
"name": "django-alipay2",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Your Name",
"author_email": "yourname@example.com",
"download_url": "https://files.pythonhosted.org/packages/e1/3b/0ee9bddd2261db6da9334ae5a06200b2216e5e51aea0c49d7c757fe3e5a9/django-alipay2-1.1.8.tar.gz",
"platform": null,
"description": "==============\ndjango-alipay2\n==============\n\n\u63d0\u4f9bdjango\u4e0balipay\u76f4\u63a5\u652f\u4ed8\u63a5\u53e3\n\nQuick start\n-----------\n1. Install::\n\n pip install django_alipay2\n\n2. Add \"alipay\" to your INSTALLED_APPS setting like this::\n\n INSTALLED_APPS = [\n ...\n 'alipay',\n ]\n\n3. [Optional] Include the alipay URLconf in your project urls.py like this::\n\n url(r'^alipay/', include('alipay.urls')),\n\n4. Migrate::\n\n python manage.py migrate\n\n5. Add config 'ALIPAY' to settings.py like this::\n\n # account below is for sandbox\n ALIPAY = {\n 'pid': '2088101122136241',\n 'key': '760bdzec6y9goq7ctyx96ezkz78287de',\n 'seller_email': 'overseas_kgtest@163.com',\n 'gateway': 'https://openapi.alipaydev.com/gateway.do?',\n 'server_url': 'http://localhost:8000'\n\n # RSA specified\n 'rsa_public_raw_key': '',\n 'sign_type': 'RSA',\n }\n\n # you may add an 'api_provider' to support multiple seller\n ALIPAY = {\n 'api_provider': 'some_package.sub_package.get_alipay_alipay' # input:seller_email, output:AlipayAPI\n }\n\n6. Create alipay redirect::\n\n import uuid\n payment = AlipayPayment.objects.create(\n out_no=uuid.uuid4(),\n subject='\u5145\u503c',\n body='1\u5e74365\u5143',\n amount_total=0.01,\n user=None, # \u53ef\u4ee5\u6307\u5b9auser\n seller_email='your_seller_email@domain.com',\n # reference_id='1' # \u53ef\u9009\n )\n return redirect('alipay_redirect', out_no=payment.out_no)\n\n\n\n",
"bugtrack_url": null,
"license": "BSD License",
"summary": "alipay for django",
"version": "1.1.8",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e13b0ee9bddd2261db6da9334ae5a06200b2216e5e51aea0c49d7c757fe3e5a9",
"md5": "610e17be633896c81e164314798a78f5",
"sha256": "fe6d65ad54be840b211faabf60bd0d98006d9bc7a6b58e19b21c115d01dc26b6"
},
"downloads": -1,
"filename": "django-alipay2-1.1.8.tar.gz",
"has_sig": false,
"md5_digest": "610e17be633896c81e164314798a78f5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 18842,
"upload_time": "2023-04-03T01:40:51",
"upload_time_iso_8601": "2023-04-03T01:40:51.786120Z",
"url": "https://files.pythonhosted.org/packages/e1/3b/0ee9bddd2261db6da9334ae5a06200b2216e5e51aea0c49d7c757fe3e5a9/django-alipay2-1.1.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-03 01:40:51",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "django-alipay2"
}