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 44
55use App \Enums \Subscription ;
66use Illuminate \Support \Facades \Cache ;
7+ use Laravel \Cashier \Cashier ;
78use Livewire \Attributes \Layout ;
89use Livewire \Attributes \Title ;
910use Livewire \Component ;
10- use Stripe \StripeClient ;
1111
1212#[Layout('components.layout ' )]
1313#[Title('Thank You for Your Purchase ' )]
@@ -41,7 +41,7 @@ private function loadEmail(): ?string
4141 return $ email ;
4242 }
4343
44- $ stripe = app (StripeClient::class );
44+ $ stripe = Cashier:: stripe ( );
4545 $ checkoutSession = $ stripe ->checkout ->sessions ->retrieve ($ this ->checkoutSessionId );
4646
4747 if (! ($ email = $ checkoutSession ?->customer_details?->email)) {
@@ -76,7 +76,7 @@ private function loadSubscription(): ?Subscription
7676 return Subscription::tryFrom ($ subscription );
7777 }
7878
79- $ stripe = app (StripeClient::class );
79+ $ stripe = Cashier:: stripe ( );
8080 $ priceId = $ stripe ->checkout ->sessions ->allLineItems ($ this ->checkoutSessionId )->first ()?->price->id ;
8181
8282 if (! $ priceId ) {
You can’t perform that action at this time.
0 commit comments