@@ -73,6 +73,6 @@ urlpatterns += [ |
||
73 | 73 |
|
74 | 74 |
# 支付相关 |
75 | 75 |
urlpatterns += [ |
76 |
- url(r'^order/create$', pay_views.order_create_api, name='order_create_api'), # 订单创建 |
|
77 |
- url(r'^order/notify_url$', pay_views.notify_url_api, name='notify_url_api'), # 支付异步通知回调地址 |
|
76 |
+ url(r'^wx/order_create$', pay_views.wx_order_create_api, name='wx_order_create_api'), # 订单创建 |
|
77 |
+ url(r'^wx/notify_url$', pay_views.wx_notify_url_api, name='wx_notify_url_api'), # 支付异步通知回调地址 |
|
78 | 78 |
] |
@@ -21,7 +21,7 @@ wxpay = WeChatPay(WECHAT['appID'], WECHAT['apiKey'], WECHAT['mchID']) |
||
21 | 21 |
|
22 | 22 |
|
23 | 23 |
@transaction.atomic |
24 |
-def order_create_api(request): |
|
24 |
+def wx_order_create_api(request): |
|
25 | 25 |
from_uid = request.POST.get('from_uid', '') |
26 | 26 |
to_lid = request.POST.get('to_lid', '') |
27 | 27 |
to_uid = request.POST.get('to_uid', '') |
@@ -38,7 +38,7 @@ def order_create_api(request): |
||
38 | 38 |
try: |
39 | 39 |
prepay_data = wxpay.order.create( |
40 | 40 |
body=body, |
41 |
- notify_url=settings.API_DOMAIN + '/order/notify_url', |
|
41 |
+ notify_url=settings.API_DOMAIN + '/wx/notify_url', |
|
42 | 42 |
out_trade_no=order.order_id, |
43 | 43 |
total_fee=total_fee, |
44 | 44 |
trade_type=trade_type, |
@@ -70,7 +70,7 @@ def order_paid_success(order): |
||
70 | 70 |
|
71 | 71 |
|
72 | 72 |
@transaction.atomic |
73 |
-def notify_url_api(request): |
|
73 |
+def wx_notify_url_api(request): |
|
74 | 74 |
try: |
75 | 75 |
data = xmltodict.parse(request.body)['xml'] |
76 | 76 |
except xmltodict.ParsingInterrupted: |