From 96991da6215c2ec1ba681f80a5c6f4389b7635bf Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 29 Aug 2019 13:12:27 +0300 Subject: [PATCH] IAP --- app/Http/Controllers/AccountApiController.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/AccountApiController.php b/app/Http/Controllers/AccountApiController.php index 3ca39b8c50..d43b1dc261 100644 --- a/app/Http/Controllers/AccountApiController.php +++ b/app/Http/Controllers/AccountApiController.php @@ -298,12 +298,8 @@ class AccountApiController extends BaseAPIController $timestamp = $request->timestamp; $productId = $request->product_id; - if (Company::where('app_store_order_id', '=', $orderId)->first()) { - return 'Order Id has already been used'; - } - if (Carbon::createFromTimestamp($timestamp) < Carbon::now()->subYear()) { - return 'The order is expired'; + return '{"message":"The order is expired"}'; } if ($productId == 'v1_pro_yearly') { @@ -336,6 +332,6 @@ class AccountApiController extends BaseAPIController $company->trial_plan = null; $company->save(); - return RESULT_SUCCESS; + return '{"message":"success"}'; } }