refactor(timeout): set timeout
This commit is contained in:
@@ -14,10 +14,11 @@ class AppMarketPurchaseVerifier
|
||||
$packageName = config('services.app_markets.package_name');
|
||||
$url = "https://pardakht.cafebazaar.ir/devapi/v2/api/applications/{$packageName}/subscriptions/{$subscriptionId}/purchases/{$purchaseToken}";
|
||||
|
||||
$response = Http::withHeaders([
|
||||
$response = Http::timeout(3)->connectTimeout(2)->withHeaders([
|
||||
'CAFEBAZAAR-PISHKHAN-API-SECRET' => config('services.app_markets.bazaar_secret'),
|
||||
])->get($url);
|
||||
|
||||
|
||||
if (!$response->successful()) {
|
||||
Log::error('Failed to verify Bazaar subscription', [
|
||||
'status' => $response->status(),
|
||||
@@ -63,7 +64,7 @@ class AppMarketPurchaseVerifier
|
||||
$packageName = config('services.app_markets.package_name');
|
||||
$url = "https://developer.myket.ir/api/partners/applications/{$packageName}/purchases/products/{$skuId}/verify";
|
||||
|
||||
$response = Http::withHeaders([
|
||||
$response = Http::timeout(3)->connectTimeout(2)->withHeaders([
|
||||
'X-Access-Token' => config('services.app_markets.myket_access_token'),
|
||||
])->post($url, [
|
||||
'tokenId' => $token,
|
||||
|
||||
Reference in New Issue
Block a user