|
@@ -135,6 +135,14 @@ class InAppPurchaseView(View):
|
|
pay_result_url = CommonService.get_payment_status_url(lang, 'fail')
|
|
pay_result_url = CommonService.get_payment_status_url(lang, 'fail')
|
|
return response.json(0, {'url': pay_result_url})
|
|
return response.json(0, {'url': pay_result_url})
|
|
|
|
|
|
|
|
+ if product_id == "30_days_1_month_subscription" or product_id == "30_days_1_month_ai_subscription":
|
|
|
|
+ # 之前订阅过任意套餐返回不可购买
|
|
|
|
+ transaction_subscription = client.get_all_subscription_statuses(transaction_id)
|
|
|
|
+ if transaction_subscription.data:
|
|
|
|
+ for subscription in transaction_subscription.data[0].lastTransactions:
|
|
|
|
+ if int(subscription.status) != 2 or int(subscription.status) != 5:
|
|
|
|
+ return response.json(10048)
|
|
|
|
+
|
|
pay_type = PAY_TYPE_IN_APP_PURCHASE
|
|
pay_type = PAY_TYPE_IN_APP_PURCHASE
|
|
now_time = int(time.time())
|
|
now_time = int(time.time())
|
|
|
|
|