mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
improve off session token billing with stripe
This commit is contained in:
parent
b1b9b5d120
commit
252416a5b0
@ -79,7 +79,7 @@ class Charge
|
|||||||
'payment_method' => $cgt->token,
|
'payment_method' => $cgt->token,
|
||||||
'customer' => $cgt->gateway_customer_reference,
|
'customer' => $cgt->gateway_customer_reference,
|
||||||
'confirm' => true,
|
'confirm' => true,
|
||||||
'off_session' => true,
|
// 'off_session' => true,
|
||||||
'description' => $description,
|
'description' => $description,
|
||||||
'metadata' => [
|
'metadata' => [
|
||||||
'payment_hash' => $payment_hash->hash,
|
'payment_hash' => $payment_hash->hash,
|
||||||
@ -91,6 +91,11 @@ class Charge
|
|||||||
$data['payment_method_types'] = ['sepa_debit'];
|
$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);
|
$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);
|
SystemLogger::dispatch($response, SystemLog::CATEGORY_GATEWAY_RESPONSE, SystemLog::EVENT_GATEWAY_SUCCESS, SystemLog::TYPE_STRIPE, $this->stripe->client, $this->stripe->client->company);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user