Skip to content

Commit

Permalink
remove unused bearerToken in IPN_Handler, update author and author ur…
Browse files Browse the repository at this point in the history
…i, add developer
  • Loading branch information
PatryQHyper committed Jan 14, 2025
1 parent 088bbc1 commit 061e60e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
10 changes: 5 additions & 5 deletions simpay-woocommerce-payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
* Plugin Name: SimPay.pl Płatności Online WooCommerce
* Plugin URI: https://simpay.pl
* Description: Wtyczka WooCommerce, która umożliwi Ci przyjmowanie płatności Online
* Version: 1.0.0
* Author: Patryk Vizauer
* Author URI: https://github.com/PatryQHyper
* Version: 1.0.1
* Author: Payments Solution Sp. z o.o.
* Author URI: https://simpay.pl
* Developer: Patryk Vizauer
* Developer URI: https://github.com/PatryQHyper
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: simpay_woocommerce_payment
Expand Down Expand Up @@ -49,5 +51,3 @@ function simpay_woocommerce_payment_block_assets() {
true
);
}

//simpay_payment_gateway
1 change: 0 additions & 1 deletion src/SimPay_Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public function simpay_handle_ipn() {
return ( new SimPay_IPN_Handler() )->handle(
$this->get_option( 'simpay_service_hash' ),
$this->get_option( 'simpay_service_id' ),
$this->get_option( 'simpay_bearer' ),
$this->get_option( 'simpay_ipn_check_ip' ) === 'yes',
);
}
Expand Down
5 changes: 4 additions & 1 deletion src/SimPay_IPN_Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ class SimPay_IPN_Handler {
public function handle(
string $serviceHash,
string $serviceId,
string $bearerToken,
bool $validateIp,
) {
if ( $_SERVER['REQUEST_METHOD'] !== 'POST' ) {
Expand Down Expand Up @@ -42,6 +41,10 @@ public function handle(
$this->error( 'invalid signature' );
}

if ( $payload['service_id'] !== $serviceId ) {
$this->error( 'invalid service_id' );
}

if ( $payload['status'] !== 'transaction_paid' ) {
header( 'Content-Type: text/plain', true, 200 );
echo 'OK';
Expand Down

0 comments on commit 061e60e

Please sign in to comment.