From 06eedeef68a24ea16b0844d38a5d29c84c822460 Mon Sep 17 00:00:00 2001 From: IceToast Date: Thu, 16 Dec 2021 16:15:41 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20Added=20Stripe=5FMETHODS=20?= =?UTF-8?q?to=20.env=20variables=20->=20csl=20of=20methods=20to=20support?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 3 +++ app/Http/Controllers/Admin/PaymentController.php | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index 7fa5188c..2a4e63db 100644 --- a/.env.example +++ b/.env.example @@ -27,6 +27,9 @@ PAYPAL_EMAIL= #stripe details, you only need "test" for testing! you can do this by setting the APP_ENV to local STRIPE_TEST_SECRET= STRIPE_SECRET= +#stripe payment methods, comma seperated list of methods you want to support: +#read into https://stripe.com/docs/payments/payment-methods/integration-options and/or https://stripe.com/docs/payments/payment-methods/overview +STRIPE_METHODS= #set-up for extra discord verification DISCORD_CLIENT_ID= diff --git a/app/Http/Controllers/Admin/PaymentController.php b/app/Http/Controllers/Admin/PaymentController.php index 8f2dd8c0..10bfe6c1 100644 --- a/app/Http/Controllers/Admin/PaymentController.php +++ b/app/Http/Controllers/Admin/PaymentController.php @@ -261,9 +261,7 @@ class PaymentController extends Controller ], 'mode' => 'payment', - 'payment_intent_data' => [ - 'capture_method' => 'manual', - ], + "payment_method_types" => str_getcsv(env('STRIPE_METHODS')), 'success_url' => route('payment.StripeSuccess', ['product' => $creditProduct->id]).'&session_id={CHECKOUT_SESSION_ID}', 'cancel_url' => route('payment.Cancel'), ]);