File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 1010 }
1111 ],
1212 "require" : {
13+ "php" : " ^7.1.3" ,
1314 "laravel/framework" : " 5.*|6.*" ,
1415 "stripe/stripe-php" : " 4.*|5.*|6.*"
1516 },
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ public function handle()
4646
4747 try {
4848 $ this ->createEndpoints ();
49- } catch (\Stripe \Error \InvalidRequest $ e ) {
49+ } catch (\Stripe \Error \InvalidRequest | \ Stripe \ Exception \ InvalidRequest $ e ) {
5050 $ this ->error ($ e ->getMessage ());
5151 }
5252
@@ -60,7 +60,7 @@ public function handle()
6060 */
6161 protected function createEndpoints ()
6262 {
63- $ endpoint = \Stripe \WebhookEndpoint::create ([
63+ \Stripe \WebhookEndpoint::create ([
6464 'url ' => config ('app.url ' ).'/webhook/stripe ' ,
6565 'enabled_events ' => [
6666 'customer.subscription.updated ' ,
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ protected function createProduct()
7979 ]);
8080
8181 $ this ->info ('Stripe product created: ' . $ id );
82- } catch (\Stripe \Error \InvalidRequest $ e ) {
82+ } catch (\Stripe \Error \InvalidRequest | \ Stripe \ Exception \ InvalidRequest $ e ) {
8383 $ this ->line ('Stripe product ' . $ id . ' already exists ' );
8484 }
8585
@@ -111,7 +111,7 @@ protected function createStripePlans($plans)
111111 ]);
112112
113113 $ this ->info ('Stripe plan created: ' . $ plan ->id );
114- } catch (\Stripe \Error \InvalidRequest $ e ) {
114+ } catch (\Stripe \Error \InvalidRequest | \ Stripe \ Exception \ InvalidRequest $ e ) {
115115 $ this ->line ('Stripe plan ' . $ plan ->id . ' already exists ' );
116116 }
117117 }
You can’t perform that action at this time.
0 commit comments