fix: 🚑️ getStripeClient()
This commit is contained in:
parent
ef2c271257
commit
962ddb2fc3
|
@ -232,9 +232,9 @@ class PaymentController extends Controller
|
||||||
*/
|
*/
|
||||||
public function StripePay(Request $request, CreditProduct $creditProduct)
|
public function StripePay(Request $request, CreditProduct $creditProduct)
|
||||||
{
|
{
|
||||||
|
|
||||||
$stripeClient = $this->getStripeClient();
|
$stripeClient = $this->getStripeClient();
|
||||||
|
|
||||||
|
|
||||||
$request = $stripeClient->checkout->sessions->create([
|
$request = $stripeClient->checkout->sessions->create([
|
||||||
'line_items' => [
|
'line_items' => [
|
||||||
[
|
[
|
||||||
|
@ -340,12 +340,12 @@ class PaymentController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return StripeClient
|
* @return \Stripe\StripeClient
|
||||||
*/
|
*/
|
||||||
protected function getStripeClient()
|
protected function getStripeClient()
|
||||||
{
|
{
|
||||||
return new \Stripe\StripeClient($this->getStripeClient());
|
return new \Stripe\StripeClient($this->getStripeSecret());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -355,7 +355,7 @@ class PaymentController extends Controller
|
||||||
{
|
{
|
||||||
return env('APP_ENV') == 'local'
|
return env('APP_ENV') == 'local'
|
||||||
? env('STRIPE_TEST_SECRET')
|
? env('STRIPE_TEST_SECRET')
|
||||||
: env('STRIPE_SECRET');
|
: env('STRIPE_SECRET');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue