invoiceninja/app/Ninja/Intents/WebApp/ListPaymentIntent.php

22 lines
409 B
PHP
Raw Normal View History

2017-04-04 17:51:01 +03:00
<?php
namespace App\Ninja\Intents\WebApp;
use App\Ninja\Intents\BaseIntent;
class ListPaymentIntent extends BaseIntent
{
public function process()
{
2017-04-05 22:20:11 +03:00
$this->loadStates(ENTITY_PAYMENT);
2017-04-06 16:47:37 +03:00
if ($client = $this->requestClient()) {
2017-04-05 18:04:44 +03:00
$url = $client->present()->url . '#payments';
} else {
$url = '/payments';
}
return redirect($url);
2017-04-04 17:51:01 +03:00
}
}