PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 2.1
Booking for Appointments and Events Calendar – Amelia v2.1
2.4.3 2.4.2 2.4.1 2.4 trunk 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.2 1.2.20 1.2.21 1.2.22 1.2.23 1.2.24 1.2.25 1.2.26 1.2.27 1.2.28 1.2.29 1.2.3 1.2.30 1.2.31 1.2.32 1.2.33 1.2.34 1.2.35 1.2.36 1.2.37 1.2.38 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.3
ameliabooking / src / Infrastructure / ContainerConfig / request.php
ameliabooking / src / Infrastructure / ContainerConfig Last commit date
application.services.php 6 months ago command.bus.php 2 years ago container.php 6 months ago domain.event.bus.php 1 year ago domain.services.php 1 year ago infrastructure.services.php 4 months ago infrastructure.user.php 1 year ago repositories.php 6 months ago request.php 6 months ago
request.php
56 lines
1 <?php
2
3 use Slim\Http\Request;
4 use Slim\Http\Uri;
5
6 $entries['request'] = function (AmeliaBooking\Infrastructure\Common\Container $c) {
7
8 $curUri = Uri::createFromEnvironment($c->get('environment'));
9
10 // fix callback url for Razorpay payment through link since Razorpay encodes callback urls
11 $newRoute = str_replace(
12 '__payments__callback',
13 '/payments/callback',
14 $curUri->getQuery()
15 );
16
17 // fix callback url for whatsapp webhooks
18 $newRoute = str_replace(
19 '__notifications__whatsapp__webhook',
20 '/notifications/whatsapp/webhook',
21 $newRoute
22 );
23
24 $newRoute = str_replace(
25 ['XDEBUG_SESSION_START=PHPSTORM&' . AMELIA_ACTION_SLUG, AMELIA_ACTION_SLUG],
26 '',
27 $newRoute
28 );
29
30 $newPath = strpos($newRoute, '&') ? substr(
31 $newRoute,
32 0,
33 strpos($newRoute, '&')
34 ) : $newRoute;
35
36 $newQuery = strpos($newRoute, '&') ? substr(
37 $newRoute,
38 strpos($newRoute, '&') + 1
39 ) : '';
40
41 $request = Request::createFromEnvironment($c->get('environment'))
42 ->withUri(
43 $curUri
44 ->withPath($newPath)
45 ->withQuery($newQuery)
46 );
47
48 if (method_exists($request, 'getParam') && $request->getParam('showAmeliaErrors')) {
49 ini_set('display_errors', 1);
50 ini_set('display_startup_errors', 1);
51 error_reporting(E_ALL);
52 }
53
54 return $request;
55 };
56