@@ -25,13 +25,13 @@ 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 | - $notification = Notification::from_json( $json ); |
|
| 34 | + $notification = Notification::from_json($json); |
|
| 35 | 35 | |
| 36 | 36 | $query = new \WP_Query( |
| 37 | 37 | array( |
@@ -47,10 +47,10 @@ discard block |
||
| 47 | 47 | ) |
| 48 | 48 | ); |
| 49 | 49 | |
| 50 | - foreach ( $query->posts as $post ) { |
|
| 51 | - $gateway = Plugin::get_gateway( $post->ID ); |
|
| 50 | + foreach ($query->posts as $post) { |
|
| 51 | + $gateway = Plugin::get_gateway($post->ID); |
|
| 52 | 52 | |
| 53 | - $gateway->handle_notification( $notification ); |
|
| 53 | + $gateway->handle_notification($notification); |
|
| 54 | 54 | } |
| 55 | 55 | } |
| 56 | 56 | } |