1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00
This commit is contained in:
Hillel Coren 2019-08-29 13:12:27 +03:00
parent a4a757f288
commit 96991da621

View File

@ -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"}';
}
}