mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
Remove old code from processPaymentView
This commit is contained in:
parent
b589814d7b
commit
fb793fe2f2
@ -173,28 +173,6 @@ class StripePaymentDriver extends BasePaymentDriver
|
|||||||
public function processPaymentView(array $data)
|
public function processPaymentView(array $data)
|
||||||
{
|
{
|
||||||
return $this->payment_method->paymentView($data);
|
return $this->payment_method->paymentView($data);
|
||||||
|
|
||||||
$payment_intent_data = [
|
|
||||||
'amount' => $this->convertToStripeAmount($data['amount_with_fee'], $this->client->currency()->precision),
|
|
||||||
'currency' => $this->client->getCurrencyCode(),
|
|
||||||
'customer' => $this->findOrCreateCustomer(),
|
|
||||||
'description' => $data['invoices']->pluck('id'), //todo more meaningful description here:
|
|
||||||
];
|
|
||||||
|
|
||||||
if ($data['token']) {
|
|
||||||
$payment_intent_data['payment_method'] = $data['token']->token;
|
|
||||||
} else {
|
|
||||||
$payment_intent_data['setup_future_usage'] = 'off_session';
|
|
||||||
// $payment_intent_data['save_payment_method'] = true;
|
|
||||||
// $payment_intent_data['confirm'] = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$data['intent'] = $this->createPaymentIntent($payment_intent_data);
|
|
||||||
|
|
||||||
$data['gateway'] = $this;
|
|
||||||
|
|
||||||
return render($this->viewForType($data['payment_method_id']), $data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user