improve off session token billing with stripe
This commit is contained in:
parent
b1b9b5d120
commit
252416a5b0
1 changed files with 6 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue