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') {
|
||||
$this->mollie->payment_hash->withData('payment_id', $payment->id);
|
||||
|
||||
if(!$payment->getCheckoutUrl())
|
||||
return render('gateways.mollie.mollie_placeholder');
|
||||
else
|
||||
return redirect()->away($payment->getCheckoutUrl());
|
||||
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
return $this->processUnsuccessfulPayment($e);
|
||||
@ -151,6 +155,12 @@ class CreditCard
|
||||
if ($payment->status === 'open') {
|
||||
$this->mollie->payment_hash->withData('payment_id', $payment->id);
|
||||
|
||||
nlog("Mollie");
|
||||
nlog($payment);
|
||||
|
||||
if(!$payment->getCheckoutUrl())
|
||||
return render('gateways.mollie.mollie_placeholder');
|
||||
else
|
||||
return redirect()->away($payment->getCheckoutUrl());
|
||||
}
|
||||
} catch (\Exception $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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user