|
@@ -6,6 +6,7 @@ import time
|
|
|
|
|
|
import itunesiap
|
|
|
from django.db.models import Q
|
|
|
+from django.http import HttpResponseRedirect
|
|
|
from django.views import View
|
|
|
from Ansjer.config import LOGGER, CONFIG_INFO, CONFIG_TEST, PAY_TYPE_IN_APP_PURCHASE
|
|
|
from Controller.CheckUserData import DataValid
|
|
@@ -170,10 +171,12 @@ class InAppPurchaseView(View):
|
|
|
cls.do_vod_msg_notice(uid, user_id, lang, sys_msg_text_list)
|
|
|
|
|
|
redis_obj.del_data(redis_key)
|
|
|
- return response.json(0)
|
|
|
+ pay_success_url = CommonService.get_payment_status_url(lang, 'success')
|
|
|
+ return HttpResponseRedirect(pay_success_url)
|
|
|
except Exception as e:
|
|
|
redis_obj.del_data(redis_key)
|
|
|
- return response.json(500, 'error_line:{}, error_msg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
|
|
|
+ pay_failed_url = CommonService.get_payment_status_url(lang, 'fail')
|
|
|
+ return HttpResponseRedirect(pay_failed_url)
|
|
|
|
|
|
@classmethod
|
|
|
def do_vod_msg_notice(cls, uid, user_id, lang, sys_msg_text_list):
|