mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-14 15:13:29 +01:00
Fixes for Stripe
This commit is contained in:
parent
35c79dbc50
commit
690ed95c9a
@ -173,7 +173,7 @@ class CreditCard implements LivewireMethodInterface
|
||||
}
|
||||
}
|
||||
|
||||
return redirect()->route('client.payments.show', ['payment' => $this->stripe->encodePrimaryKey($payment->id)]);
|
||||
return redirect()->route('client.payments.show', ['payment' => $payment->hashed_id]);
|
||||
}
|
||||
|
||||
public function processUnsuccessfulPayment($server_response)
|
||||
|
@ -1021,4 +1021,31 @@ class StripePaymentDriver extends BaseDriver
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
public function processPaymentViewData(array $data): array
|
||||
{
|
||||
$data = $this->payment_method->paymentData($data);
|
||||
|
||||
$data['stripe_account_id'] = $this->company_gateway->getConfigField('account_id');
|
||||
|
||||
if (array_key_exists('intent', $data)) {
|
||||
$data['client_secret'] = $data['intent']->client_secret;
|
||||
}
|
||||
|
||||
unset($data['intent']);
|
||||
|
||||
$token_billing_string = 'true';
|
||||
|
||||
if($this->company_gateway->token_billing == 'off' || $this->company_gateway->token_billing == 'optin') {
|
||||
$token_billing_string = 'false';
|
||||
}
|
||||
|
||||
if (isset($data['pre_payment']) && $data['pre_payment'] == '1' && isset($data['is_recurring']) && $data['is_recurring'] == '1') {
|
||||
$token_billing_string = 'true';
|
||||
}
|
||||
|
||||
$data['token_billing_string'] = $token_billing_string;
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user