File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 4
4
5
5
use App \Enums \Subscription ;
6
6
use Illuminate \Support \Facades \Cache ;
7
+ use Laravel \Cashier \Cashier ;
7
8
use Livewire \Attributes \Layout ;
8
9
use Livewire \Attributes \Title ;
9
10
use Livewire \Component ;
10
- use Stripe \StripeClient ;
11
11
12
12
#[Layout('components.layout ' )]
13
13
#[Title('Thank You for Your Purchase ' )]
@@ -41,7 +41,7 @@ private function loadEmail(): ?string
41
41
return $ email ;
42
42
}
43
43
44
- $ stripe = app (StripeClient::class );
44
+ $ stripe = Cashier:: stripe ( );
45
45
$ checkoutSession = $ stripe ->checkout ->sessions ->retrieve ($ this ->checkoutSessionId );
46
46
47
47
if (! ($ email = $ checkoutSession ?->customer_details?->email)) {
@@ -76,7 +76,7 @@ private function loadSubscription(): ?Subscription
76
76
return Subscription::tryFrom ($ subscription );
77
77
}
78
78
79
- $ stripe = app (StripeClient::class );
79
+ $ stripe = Cashier:: stripe ( );
80
80
$ priceId = $ stripe ->checkout ->sessions ->allLineItems ($ this ->checkoutSessionId )->first ()?->price->id ;
81
81
82
82
if (! $ priceId ) {
You can’t perform that action at this time.
0 commit comments