1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-19 16:01:34 +02:00

Stripe improvements (port #2863 to master) (#2903)

* View credit card: send more billing data to Stripe when available

As commit 8e8414ab49 shows, this commit had more code that was wrongly commited in ff064367d6 by another author

* Stripe: fill payment card details
This commit is contained in:
Francisco Ferreira 2019-07-18 07:26:08 +01:00 committed by David Bomba
parent 989f114154
commit b0e680ee5c
2 changed files with 6 additions and 1 deletions

View File

@ -437,6 +437,11 @@ class StripePaymentDriver extends BasePaymentDriver
} elseif ($isBitcoin) {
$payment->payment_type_id = PAYMENT_TYPE_BITCOIN;
}
} else if (! $paymentMethod && $this->isGatewayType(GATEWAY_TYPE_CREDIT_CARD) && ! strcmp($this->purchaseResponse['payment_method_details']['type'], "card")) {
$card = $this->purchaseResponse['payment_method_details']['card'];
$payment->last4 = $card['last4'];
$payment->expiration = $card['exp_year'] . '-' . $card['exp_month'] . '-01';
$payment->payment_type_id = PaymentType::parseCardType($card['brand']);
}
return $payment;

View File

@ -254,7 +254,7 @@
<div class="col-md-6">
{!! Former::select('country_id')
->placeholder(trans('texts.country_id'))
->fromQuery($countries, 'name', 'id')
->fromQuery($countries, 'name', ['value' => 'id', 'data-iso_3166_2' => 'iso_3166_2'])
->addGroupClass('country-select')
->label('') !!}
</div>