mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Catch mollie payments if redirect URL is null
This commit is contained in:
parent
62950e7549
commit
b2ff2a1c18
@ -91,7 +91,11 @@ class CreditCard
|
|||||||
if ($payment->status === 'open') {
|
if ($payment->status === 'open') {
|
||||||
$this->mollie->payment_hash->withData('payment_id', $payment->id);
|
$this->mollie->payment_hash->withData('payment_id', $payment->id);
|
||||||
|
|
||||||
return redirect()->away($payment->getCheckoutUrl());
|
if(!$payment->getCheckoutUrl())
|
||||||
|
return render('gateways.mollie.mollie_placeholder');
|
||||||
|
else
|
||||||
|
return redirect()->away($payment->getCheckoutUrl());
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
return $this->processUnsuccessfulPayment($e);
|
return $this->processUnsuccessfulPayment($e);
|
||||||
@ -151,7 +155,13 @@ class CreditCard
|
|||||||
if ($payment->status === 'open') {
|
if ($payment->status === 'open') {
|
||||||
$this->mollie->payment_hash->withData('payment_id', $payment->id);
|
$this->mollie->payment_hash->withData('payment_id', $payment->id);
|
||||||
|
|
||||||
return redirect()->away($payment->getCheckoutUrl());
|
nlog("Mollie");
|
||||||
|
nlog($payment);
|
||||||
|
|
||||||
|
if(!$payment->getCheckoutUrl())
|
||||||
|
return render('gateways.mollie.mollie_placeholder');
|
||||||
|
else
|
||||||
|
return redirect()->away($payment->getCheckoutUrl());
|
||||||
}
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$this->processUnsuccessfulPayment($e);
|
$this->processUnsuccessfulPayment($e);
|
||||||
|
@ -0,0 +1,26 @@
|
|||||||
|
@extends('portal.ninja2020.layout.clean')
|
||||||
|
@section('meta_title', 'Mollie')
|
||||||
|
|
||||||
|
@section('body')
|
||||||
|
<div class="grid lg:grid-cols-3">
|
||||||
|
<div class="hidden lg:block col-span-1 bg-red-100 h-screen">
|
||||||
|
<img src="{{ asset('images/client-portal-new-image.jpg') }}"
|
||||||
|
class="w-full h-screen object-cover"
|
||||||
|
alt="Background image">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-span-2 h-screen flex">
|
||||||
|
<div class="m-auto md:w-1/2 lg:w-1/4 flex flex-col items-center">
|
||||||
|
<span class="flex items-center text-2xl">
|
||||||
|
{{ ctrans('texts.payment_error_code',['code' => 500]) }}
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<a class="button-link text-sm mt-2" href="{{ url(request()->getSchemeAndHttpHost() . '/client') }}">
|
||||||
|
{{ ctrans('texts.back_to', ['url' => parse_url(request()->getHttpHost())['host'] ?? request()->getHttpHost()]) }}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
<head>
|
<head>
|
||||||
<!-- Error: {{ session('error') }} -->
|
<!-- Error: {{ session('error') }} -->
|
||||||
@if (isset($company) && $company->matomo_url && $company->matomo_id)
|
@if (isset($company) && $company->matomo_url && $company->matomo_id)
|
||||||
<script>
|
<script>
|
||||||
var _paq = window._paq = window._paq || [];
|
var _paq = window._paq = window._paq || [];
|
||||||
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user