李帅

1.打印苹果日志

...@@ -110,7 +110,14 @@ class PayController extends Controller ...@@ -110,7 +110,14 @@ class PayController extends Controller
110 { 110 {
111 $all = $request->all(); 111 $all = $request->all();
112 112
113 + if ($service == 'apple') {
114 + $factory->init($service)->notify('');
115 + }elseif ($service == 'apple-sandbox'){
116 + $factory->init($service)->notifySandbox($all);
117 + } else {
113 $factory->init($service)->notify($all['message']['data']); 118 $factory->init($service)->notify($all['message']['data']);
119 + }
120 +
114 121
115 return Response::ok(); 122 return Response::ok();
116 } 123 }
......
...@@ -35,4 +35,25 @@ class ApplePayment implements PaymentInterface ...@@ -35,4 +35,25 @@ class ApplePayment implements PaymentInterface
35 { 35 {
36 // 查询订单对应的产品id 36 // 查询订单对应的产品id
37 } 37 }
38 +
39 + public function notify($all)
40 + {
41 + Log::debug(print_r($all,true));
42 +
43 + Log::debug('apple返回的数据:====================');
44 + $data = json_decode(base64_decode($all['signedPayload']),true);
45 + Log::debug(print_r($data,true));
46 + }
47 +
48 + public function notifySandbox($all)
49 + {
50 + Log::debug(print_r($all,true));
51 +
52 + Log::debug('sandbox返回的数据:====================');
53 + $data = json_decode(base64_decode($all['signedPayload']),true);
54 + Log::debug(print_r($data,true));
55 +
56 +
57 +
58 + }
38 } 59 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -23,6 +23,8 @@ class PaymentFactory ...@@ -23,6 +23,8 @@ class PaymentFactory
23 return new GooglePayment(); 23 return new GooglePayment();
24 case 'apple': 24 case 'apple':
25 return new ApplePayment(); 25 return new ApplePayment();
26 + case 'apple-sandbox':
27 + return new ApplePayment();
26 default: 28 default:
27 return new \Exception('未知的支付方式'); 29 return new \Exception('未知的支付方式');
28 } 30 }
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
2 2
3 namespace App\Providers; 3 namespace App\Providers;
4 4
5 +use Illuminate\Support\Facades\Log;
5 use Illuminate\Support\ServiceProvider; 6 use Illuminate\Support\ServiceProvider;
7 +use Laravel\Horizon\Horizon;
6 8
7 class AppServiceProvider extends ServiceProvider 9 class AppServiceProvider extends ServiceProvider
8 { 10 {
...@@ -24,5 +26,8 @@ class AppServiceProvider extends ServiceProvider ...@@ -24,5 +26,8 @@ class AppServiceProvider extends ServiceProvider
24 public function boot() 26 public function boot()
25 { 27 {
26 // 28 //
29 + Horizon::auth(function () {
30 + return true;
31 + });
27 } 32 }
28 } 33 }
......
...@@ -84,7 +84,7 @@ return [ ...@@ -84,7 +84,7 @@ return [
84 */ 84 */
85 85
86 'waits' => [ 86 'waits' => [
87 - 'redis:default' => 60, 87 + 'redis:default' => 60 * 3,
88 ], 88 ],
89 89
90 /* 90 /*
...@@ -151,7 +151,7 @@ return [ ...@@ -151,7 +151,7 @@ return [
151 | 151 |
152 */ 152 */
153 153
154 - 'memory_limit' => 64, 154 + 'memory_limit' => 256,
155 155
156 /* 156 /*
157 |-------------------------------------------------------------------------- 157 |--------------------------------------------------------------------------
......
...@@ -28,7 +28,7 @@ Route::prefix('v1')->namespace('App\Http\Controllers\V1')->group(function (Route ...@@ -28,7 +28,7 @@ Route::prefix('v1')->namespace('App\Http\Controllers\V1')->group(function (Route
28 $api->any('auth/{service}/callback', 'AuthController@apiHandleProviderCallback'); 28 $api->any('auth/{service}/callback', 'AuthController@apiHandleProviderCallback');
29 29
30 /** 社会化用户登录*/ 30 /** 社会化用户登录*/
31 - $api->post('socialite/{service}', 'AuthController@socialite'); 31 + $api->post('/socialite/{service}', 'AuthController@socialite');
32 32
33 /** 增加观看次数 */ 33 /** 增加观看次数 */
34 $api->get('/addview/{id}', 'ImmerseController@addview'); 34 $api->get('/addview/{id}', 'ImmerseController@addview');
...@@ -52,7 +52,7 @@ Route::prefix('v1')->namespace('App\Http\Controllers\V1')->group(function (Route ...@@ -52,7 +52,7 @@ Route::prefix('v1')->namespace('App\Http\Controllers\V1')->group(function (Route
52 $api->post('/upload/audio', 'SettingController@uploadAudio'); 52 $api->post('/upload/audio', 'SettingController@uploadAudio');
53 53
54 /** 调起支付 */ 54 /** 调起支付 */
55 - $api->any('pay/{service}/callback', 'PayController@iapCallback'); 55 + $api->any('/pay/{service}/callback', 'PayController@iapCallback');
56 }); 56 });
57 57
58 58
......