mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-04 15:44:34 -04:00
Fixes for payment links
This commit is contained in:
parent
d40da3c7f2
commit
e1d50eff70
@ -522,17 +522,18 @@ class Payment extends BaseModel
|
||||
event(new PaymentWasVoided($this, $this->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null)));
|
||||
}
|
||||
|
||||
// public function getLink()
|
||||
// {
|
||||
// return route('client.payments.show', $this->hashed_id);
|
||||
// }
|
||||
|
||||
public function getLink() :string
|
||||
{
|
||||
// if (Ninja::isHosted()) {
|
||||
// $domain = isset($this->company->portal_domain) ? $this->company->portal_domain : $this->company->domain();
|
||||
// } else {
|
||||
// $domain = config('ninja.app_url');
|
||||
// }
|
||||
|
||||
if (Ninja::isHosted()) {
|
||||
$domain = isset($this->company->portal_domain) ? $this->company->portal_domain : $this->company->domain();
|
||||
$domain = $this->company->domain();
|
||||
} else {
|
||||
$domain = config('ninja.app_url');
|
||||
$domain = strlen($this->company->portal_domain) > 5 ? $this->company->portal_domain : config('ninja.app_url');
|
||||
}
|
||||
|
||||
return $domain.'/client/payment/'.$this->client->contacts()->first()->contact_key.'/'.$this->hashed_id.'?next=/client/payments/'.$this->hashed_id;
|
||||
|
@ -101,7 +101,6 @@ trait Inviteable
|
||||
break;
|
||||
case 'iframe':
|
||||
return $domain.'/client/'.$entity_type.'/'.$this->key;
|
||||
//return $domain . $entity_type .'/'. $this->contact->client->client_hash .'/'. $this->key;
|
||||
break;
|
||||
case 'domain':
|
||||
return $domain.'/client/'.$entity_type.'/'.$this->key;
|
||||
@ -127,7 +126,6 @@ trait Inviteable
|
||||
break;
|
||||
case 'iframe':
|
||||
return $domain.'/client/';
|
||||
//return $domain . $entity_type .'/'. $this->contact->client->client_hash .'/'. $this->key;
|
||||
break;
|
||||
case 'domain':
|
||||
return $domain.'/client/';
|
||||
|
Loading…
x
Reference in New Issue
Block a user