-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProvider.php
More file actions
36 lines (28 loc) · 1.36 KB
/
Copy pathProvider.php
File metadata and controls
36 lines (28 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
/**
* Provides everything needed for the Extension
*/
$config = file_get_contents(__DIR__.'/gp247.json');
$config = json_decode($config, true);
$extensionPath = $config['configGroup'].'/'.$config['configKey'];
$this->loadTranslationsFrom(__DIR__.'/Lang', $extensionPath);
if (gp247_extension_check_active($config['configGroup'], $config['configKey'])) {
if (file_exists(__DIR__.'/config.php')) {
$this->mergeConfigFrom(__DIR__.'/config.php', $extensionPath);
}
if (file_exists(__DIR__.'/function.php')) {
require_once __DIR__.'/function.php';
}
// Stripe also collects / refunds the core's payment requests (pay links).
if (function_exists('stripepayment_register_payment_gateway')) {
stripepayment_register_payment_gateway();
}
if (class_exists(\Livewire\Livewire::class)) {
\Livewire\Livewire::addNamespace('StripePayment', classNamespace: 'App\\GP247\\Plugins\\StripePayment\\Livewire');
}
// storeScope = "store" (gp247.json): each store may use its own Stripe account and the
// root admin sets it through the ConfigForm store picker. WHO may edit is a separate
// knob: this plugin deliberately does NOT add its admin segment to the store-scoped
// segments registry, so store-admins and vendors are kept out of the payment settings
// and cannot redirect where the money goes.
}