diff --git a/app/PaymentDrivers/Stripe/Charge.php b/app/PaymentDrivers/Stripe/Charge.php index 2e8ecb0de396..467a87fad651 100644 --- a/app/PaymentDrivers/Stripe/Charge.php +++ b/app/PaymentDrivers/Stripe/Charge.php @@ -79,7 +79,7 @@ class Charge 'payment_method' => $cgt->token, 'customer' => $cgt->gateway_customer_reference, 'confirm' => true, - 'off_session' => true, + // 'off_session' => true, 'description' => $description, 'metadata' => [ 'payment_hash' => $payment_hash->hash, @@ -91,6 +91,11 @@ class Charge $data['payment_method_types'] = ['sepa_debit']; } + /* Should improve token billing with client not present */ + if (!auth()->guard('contact')->check()) { + $data['off_session'] = true; + } + $response = $this->stripe->createPaymentIntent($data, $this->stripe->stripe_connect_auth); SystemLogger::dispatch($response, SystemLog::CATEGORY_GATEWAY_RESPONSE, SystemLog::EVENT_GATEWAY_SUCCESS, SystemLog::TYPE_STRIPE, $this->stripe->client, $this->stripe->client->company);