PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.8.1
GiveWP – Donation Plugin and Fundraising Platform v4.16.8.1
4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 2.31.0 All 254 releases
give / src / Route / PayPalWebhooks.php

PayPalWebhooks.php in GiveWP – Donation Plugin and Fundraising Platform 4.16.8.1, at src/Route/PayPalWebhooks.php

44 lines 868 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Give\Route;
4
5 use Give\Controller\PayPalWebhooks as Controller;
6
7 class PayPalWebhooks implements Route
8 {
9 /**
10 * @inheritDoc
11 */
12 public function init()
13 {
14 add_action('wp', [$this, 'callController']);
15 }
16
17 /**
18 * Calls the corresponding controller for the route in the appropriate context
19 *
20 * @since 2.8.0
21 */
22 public function callController()
23 {
24 if (isset($_GET['give-listener']) && $_GET['give-listener'] === 'paypal-commerce') {
25 give(Controller::class)->handle();
26
27 http_response_code(200);
28 die();
29 }
30 }
31
32 /**
33 * Returns the route URL
34 *
35 * @since 2.8.0
36 *
37 * @return string
38 */
39 public function getRouteUrl()
40 {
41 return get_site_url(null, 'index.php?give-listener=paypal-commerce', 'https');
42 }
43 }
44