@@ -25,17 +25,17 @@ discard block |
||
25 | 25 | * Listen to OmniKassa 2.0 webhook requests. |
26 | 26 | */ |
27 | 27 | public static function listen() { |
28 | - if ( ! filter_has_var( INPUT_GET, 'omnikassa2_webhook' ) ) { |
|
28 | + if ( ! filter_has_var(INPUT_GET, 'omnikassa2_webhook')) { |
|
29 | 29 | return; |
30 | 30 | } |
31 | 31 | |
32 | - $json = file_get_contents( 'php://input' ); |
|
32 | + $json = file_get_contents('php://input'); |
|
33 | 33 | |
34 | - if ( false === $json ) { |
|
34 | + if (false === $json) { |
|
35 | 35 | return; |
36 | 36 | } |
37 | 37 | |
38 | - $notification = Notification::from_json( $json ); |
|
38 | + $notification = Notification::from_json($json); |
|
39 | 39 | |
40 | 40 | $query = new \WP_Query( |
41 | 41 | array( |
@@ -51,10 +51,10 @@ discard block |
||
51 | 51 | ) |
52 | 52 | ); |
53 | 53 | |
54 | - foreach ( $query->posts as $post ) { |
|
55 | - $gateway = Plugin::get_gateway( $post->ID ); |
|
54 | + foreach ($query->posts as $post) { |
|
55 | + $gateway = Plugin::get_gateway($post->ID); |
|
56 | 56 | |
57 | - $gateway->handle_notification( $notification ); |
|
57 | + $gateway->handle_notification($notification); |
|
58 | 58 | } |
59 | 59 | } |
60 | 60 | } |