mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Add subdomain check for applepay
This commit is contained in:
parent
d0bd49e0a6
commit
7c5633b224
@ -425,20 +425,23 @@ class OnlinePaymentController extends BaseController
|
||||
{
|
||||
if (Utils::isNinja()) {
|
||||
$subdomain = Utils::getSubdomain(\Request::server('HTTP_HOST'));
|
||||
if (! $subdomain || $subdomain == 'app') {
|
||||
exit('Invalid subdomain');
|
||||
}
|
||||
$account = Account::whereSubdomain($subdomain)->first();
|
||||
} else {
|
||||
$account = Account::first();
|
||||
}
|
||||
|
||||
if (! $account) {
|
||||
exit("Account not found");
|
||||
exit('Account not found');
|
||||
}
|
||||
|
||||
$accountGateway = $account->account_gateways()
|
||||
->whereGatewayId(GATEWAY_STRIPE)->first();
|
||||
|
||||
if (! $account) {
|
||||
exit("Apple merchant id not set");
|
||||
exit('Apple merchant id not set');
|
||||
}
|
||||
|
||||
echo $accountGateway->getConfigField('appleMerchantId');
|
||||
|
Loading…
Reference in New Issue
Block a user