mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 10:54:34 -04:00
Fixes for stripe authorize card
This commit is contained in:
parent
64f1e8024e
commit
06a242625b
@ -127,6 +127,8 @@ class InvoiceController extends Controller
|
|||||||
|
|
||||||
$payment_methods = auth()->user()->client->service()->getPaymentMethods($total);
|
$payment_methods = auth()->user()->client->service()->getPaymentMethods($total);
|
||||||
|
|
||||||
|
//if there is only one payment method -> lets return straight to the payment page
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'settings' => auth()->user()->client->getMergedSettings(),
|
'settings' => auth()->user()->client->getMergedSettings(),
|
||||||
'invoices' => $invoices,
|
'invoices' => $invoices,
|
||||||
@ -136,8 +138,6 @@ class InvoiceController extends Controller
|
|||||||
'total' => $total,
|
'total' => $total,
|
||||||
];
|
];
|
||||||
|
|
||||||
// nlog($data);
|
|
||||||
|
|
||||||
return $this->render('invoices.payment', $data);
|
return $this->render('invoices.payment', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -407,7 +407,7 @@ class StripePaymentDriver extends BaseDriver
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$stripe_payment_method = $this->getStripePaymentMethod($payment_method);
|
$stripe_payment_method = $this->getStripePaymentMethod($payment_method);
|
||||||
$stripe_payment_method->attach(['customer' => $customer->id], $this->stripe_connect_auth);
|
$stripe_payment_method->attach(['customer' => $customer->id], null, $this->stripe_connect_auth);
|
||||||
} catch (ApiErrorException | Exception $e) {
|
} catch (ApiErrorException | Exception $e) {
|
||||||
$this->processInternallyFailedPayment($this, $e);
|
$this->processInternallyFailedPayment($this, $e);
|
||||||
}
|
}
|
||||||
@ -427,7 +427,9 @@ class StripePaymentDriver extends BaseDriver
|
|||||||
);
|
);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$stripe->paymentMethods->detach($token->token, $this->stripe_connect_auth);
|
$stripe_payment_method = $this->getStripePaymentMethod($token->token);
|
||||||
|
$stripe_payment_method->detach($token->token, null, $this->stripe_connect_auth);
|
||||||
|
//$stripe->paymentMethods->detach($token->token, $this->stripe_connect_auth);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
SystemLogger::dispatch([
|
SystemLogger::dispatch([
|
||||||
'server_response' => $e->getMessage(), 'data' => request()->all(),
|
'server_response' => $e->getMessage(), 'data' => request()->all(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user