PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 1.2.20
Booking for Appointments and Events Calendar – Amelia v1.2.20
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 1 year ago command.bus.php 2 years ago container.php 1 year ago domain.event.bus.php 7 years ago domain.services.php 2 years ago infrastructure.services.php 1 year ago infrastructure.user.php 7 years ago repositories.php 2 years ago request.php 1 year ago
request.php
63 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 // fix callback url for square payment
25 $newRoute = str_replace(
26 '__payment__square__notify',
27 '/payment/square/notify',
28 $newRoute
29 );
30
31 $newRoute = str_replace(
32 ['XDEBUG_SESSION_START=PHPSTORM&' . AMELIA_ACTION_SLUG, AMELIA_ACTION_SLUG],
33 '',
34 $newRoute
35 );
36
37 $newPath = strpos($newRoute, '&') ? substr(
38 $newRoute,
39 0,
40 strpos($newRoute, '&')
41 ) : $newRoute;
42
43 $newQuery = strpos($newRoute, '&') ? substr(
44 $newRoute,
45 strpos($newRoute, '&') + 1
46 ) : '';
47
48 $request = Request::createFromEnvironment($c->get('environment'))
49 ->withUri(
50 $curUri
51 ->withPath($newPath)
52 ->withQuery($newQuery)
53 );
54
55 if (method_exists($request, 'getParam') && $request->getParam('showAmeliaErrors')) {
56 ini_set('display_errors', 1);
57 ini_set('display_startup_errors', 1);
58 error_reporting(E_ALL);
59 }
60
61 return $request;
62 };
63