Skip to content

Commit

Permalink
1.0.21 API addressing changes
Browse files Browse the repository at this point in the history
- IP address change (whitelist) for receiving notifications!!!
- API addressing changes
- change of names and logo of Dotpay -> Przelewy24
  • Loading branch information
wpawel committed Jul 18, 2024
1 parent 34b03aa commit 5caa51a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 26 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@



You can implement payment gateway via dotpay in easy way.
You can implement payment gateway in easy way.

Soon it will be developed additional documentation and examples.

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dotpay/php-sdk",
"version": "1.0.20",
"version": "1.0.21",
"description": "Universal API to creating payment gateways for e-commerce thanks to Dotpay services",
"keywords": [
"dotpay",
Expand Down
19 changes: 6 additions & 13 deletions src/Model/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ class Configuration
/**
* Version of the SDK.
*/
const SDK_VERSION = '1.0.20';
const SDK_VERSION = '1.0.21';

const DOTPAY_SSL_URL = 'https://ssl.dotpay.pl';

/**
* Url of Dotpay payment production server.
*/
const PAYMENT_URL_PROD = 'https://ssl.dotpay.pl/t2/';
const PAYMENT_URL_PROD = 'https://dproxy.przelewy24.pl/t2/';

/**
* Url of Dotpay payment test server.
Expand All @@ -66,7 +66,7 @@ class Configuration
/**
* Url of Dotpay seller production server.
*/
const SELLER_URL_PROD = 'https://ssl.dotpay.pl/s2/login/';
const SELLER_URL_PROD = 'https://dproxy.przelewy24.pl/s2/login/';

/**
* Url of Dotpay seller test server.
Expand All @@ -76,22 +76,15 @@ class Configuration
/**
* Addresses IP of Dotpay confirmation server.
*/
//const CALLBACK_IP = '195.150.9.37';
//

const DOTPAY_CALLBACK_IP_WHITE_LIST = array(
'195.150.9.37',
'91.216.191.181',
'91.216.191.182',
'91.216.191.183',
'91.216.191.184',
'91.216.191.185',
'5.252.202.254',
'5.252.202.255',
'20.215.81.124'
);

/**
* Address IP od Dotpay office.
*/
const OFFICE_IP = '77.79.195.34';

/**
* Address IP of the localhost.
Expand Down
4 changes: 2 additions & 2 deletions src/Model/Instruction.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ class Instruction
/**
* Street of the recipient of payment.
*/
const RECIPIENT_STREET = 'ul. Kanclerska 15';
const RECIPIENT_STREET = 'ul. Pastelowa 8';

/**
* Post code and city of the recipient of payment.
*/
const RECIPIENT_CITY = '60-327 Poznań';
const RECIPIENT_CITY = '60-198 Poznań';

/**
* @var int|null Id of the instruction in a shop
Expand Down
11 changes: 2 additions & 9 deletions src/Processor/Diagnostics.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public function execute()
$dp_debug_allow = false;
}

if ( (strtoupper($_SERVER['REQUEST_METHOD']) == 'GET') && ($clientIp == $config::OFFICE_IP || $dp_debug_allow == true) )
if ( (strtoupper($_SERVER['REQUEST_METHOD']) == 'GET') && ($dp_debug_allow == true) )
{
$this->completeInformations();
die($this->outputMessage);
Expand All @@ -154,14 +154,7 @@ public function execute()
$this->addOutputMessage('IP: '.IpDetector::detect($this->config).'/'.$_SERVER['REMOTE_ADDR'].', PROXY: '.$proxy_desc.', METHOD: '.$_SERVER['REQUEST_METHOD'].", TIME: ".date('YmdHi'), true);
die($this->outputMessage);
}
/*
else if ((strtoupper($_SERVER['REQUEST_METHOD']) == 'GET') && ($clientIp != $config::OFFICE_IP) && (!isset($this->get_dp_debug) || $this->get_dp_debug != "time") )
{
$this->addOutputMessage('IP: '.IpDetector::detect($this->config).'/'.$_SERVER['REMOTE_ADDR'].', PROXY: '.$proxy_desc.', METHOD: '.$_SERVER['REQUEST_METHOD']);
die($this->outputMessage);
}
*/

else {
return false;
}
Expand Down

0 comments on commit 5caa51a

Please sign in to comment.