@@ -15,28 +15,28 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | class Listener { |
| 17 | 17 | public static function listen() { |
| 18 | - if ( ! filter_has_var( INPUT_GET, 'mollie_webhook' ) || ! filter_has_var( INPUT_POST, 'id' ) ) { |
|
| 18 | + if ( ! filter_has_var(INPUT_GET, 'mollie_webhook') || ! filter_has_var(INPUT_POST, 'id')) { |
|
| 19 | 19 | return; |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | - $transaction_id = filter_input( INPUT_POST, 'id', FILTER_SANITIZE_STRING ); |
|
| 22 | + $transaction_id = filter_input(INPUT_POST, 'id', FILTER_SANITIZE_STRING); |
|
| 23 | 23 | |
| 24 | - $payment = get_pronamic_payment_by_transaction_id( $transaction_id ); |
|
| 24 | + $payment = get_pronamic_payment_by_transaction_id($transaction_id); |
|
| 25 | 25 | |
| 26 | - if ( null === $payment ) { |
|
| 26 | + if (null === $payment) { |
|
| 27 | 27 | return; |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | // Add note. |
| 31 | 31 | $note = sprintf( |
| 32 | 32 | /* translators: %s: Mollie */ |
| 33 | - __( 'Webhook requested by %s.', 'pronamic_ideal' ), |
|
| 34 | - __( 'Mollie', 'pronamic_ideal' ) |
|
| 33 | + __('Webhook requested by %s.', 'pronamic_ideal'), |
|
| 34 | + __('Mollie', 'pronamic_ideal') |
|
| 35 | 35 | ); |
| 36 | 36 | |
| 37 | - $payment->add_note( $note ); |
|
| 37 | + $payment->add_note($note); |
|
| 38 | 38 | |
| 39 | 39 | // Update payment. |
| 40 | - Plugin::update_payment( $payment, false ); |
|
| 40 | + Plugin::update_payment($payment, false); |
|
| 41 | 41 | } |
| 42 | 42 | } |