mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 20:52:56 +01:00
Better Stripe support
This commit is contained in:
parent
fc029a62e1
commit
981045b28b
@ -558,14 +558,8 @@ class PaymentService extends BaseService
|
||||
|
||||
if (!empty($paymentDetails['card'])) {
|
||||
$card = $paymentDetails['card'];
|
||||
$payment->last4 = substr($card->number, -4);
|
||||
$year = $card->expiryYear;
|
||||
if (strlen($year) == 2) {
|
||||
$year = '20' . $year;
|
||||
}
|
||||
|
||||
$payment->expiration = $year . '-' . $card->expiryMonth . '-00';
|
||||
$payment->payment_type_id = $this->detectCardType($card->number);
|
||||
$payment->last4 = $card->getNumberLastFour();
|
||||
$payment->payment_type_id = $this->detectCardType($card->getNumber());
|
||||
}
|
||||
|
||||
if ($accountGateway->gateway_id == GATEWAY_STRIPE) {
|
||||
|
@ -82,6 +82,7 @@
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
@if($gateway->gateway_id != GATEWAY_STRIPE || $gateway->getPublishableStripeKey())
|
||||
<center>
|
||||
{!! Button::success(strtoupper(trans('texts.add_credit_card')))
|
||||
->asLinkTo(URL::to('/client/paymentmethods/add/'.($gateway->getPaymentType() == PAYMENT_TYPE_STRIPE ? 'stripe_credit_card' : 'credit_card'))) !!}
|
||||
@ -98,6 +99,7 @@
|
||||
<div id="paypal-container"></div>
|
||||
@endif
|
||||
</center>
|
||||
@endif
|
||||
|
||||
<div class="modal fade" id="completeVerificationModal" tabindex="-1" role="dialog" aria-labelledby="completeVerificationModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" style="min-width:150px">
|
||||
|
Loading…
Reference in New Issue
Block a user