mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-09 09:34:37 -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)));
|
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
|
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()) {
|
if (Ninja::isHosted()) {
|
||||||
$domain = isset($this->company->portal_domain) ? $this->company->portal_domain : $this->company->domain();
|
$domain = $this->company->domain();
|
||||||
} else {
|
} 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;
|
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;
|
break;
|
||||||
case 'iframe':
|
case 'iframe':
|
||||||
return $domain.'/client/'.$entity_type.'/'.$this->key;
|
return $domain.'/client/'.$entity_type.'/'.$this->key;
|
||||||
//return $domain . $entity_type .'/'. $this->contact->client->client_hash .'/'. $this->key;
|
|
||||||
break;
|
break;
|
||||||
case 'domain':
|
case 'domain':
|
||||||
return $domain.'/client/'.$entity_type.'/'.$this->key;
|
return $domain.'/client/'.$entity_type.'/'.$this->key;
|
||||||
@ -127,7 +126,6 @@ trait Inviteable
|
|||||||
break;
|
break;
|
||||||
case 'iframe':
|
case 'iframe':
|
||||||
return $domain.'/client/';
|
return $domain.'/client/';
|
||||||
//return $domain . $entity_type .'/'. $this->contact->client->client_hash .'/'. $this->key;
|
|
||||||
break;
|
break;
|
||||||
case 'domain':
|
case 'domain':
|
||||||
return $domain.'/client/';
|
return $domain.'/client/';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user