mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-11 13:42:49 +01:00
Fix for upgrading Stripe accounts
This commit is contained in:
parent
a82739de70
commit
bb590830cf
@ -115,6 +115,17 @@ class PaymentController extends BaseController
|
||||
return View::make('payments.edit', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $publicId
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function show($publicId)
|
||||
{
|
||||
Session::reflash();
|
||||
|
||||
return redirect()->to("payments/{$publicId}/edit");
|
||||
}
|
||||
|
||||
/**
|
||||
* @param PaymentRequest $request
|
||||
* @return \Illuminate\Contracts\View\View
|
||||
|
@ -153,7 +153,9 @@ class StripePaymentDriver extends BasePaymentDriver
|
||||
$paymentMethod->source_reference = $source['id'];
|
||||
$paymentMethod->last4 = $source['last4'];
|
||||
|
||||
if ($this->isGatewayType(GATEWAY_TYPE_CREDIT_CARD)) {
|
||||
// For older users the Stripe account may just have the customer token but not the card version
|
||||
// In that case we'd use GATEWAY_TYPE_TOKEN even though we're creating the credit card
|
||||
if ($this->isGatewayType(GATEWAY_TYPE_CREDIT_CARD) || $this->isGatewayType(GATEWAY_TYPE_TOKEN)) {
|
||||
|
||||
$paymentMethod->expiration = $source['exp_year'] . '-' . $source['exp_month'] . '-01';
|
||||
$paymentMethod->payment_type_id = $this->parseCardType($source['brand']);
|
||||
|
Loading…
Reference in New Issue
Block a user