Skip to content

Commit 1020fb9

Browse files
authored
Merge pull request #1190 from magento-tsg/2.0-pr20
[TSG] Preparing 2.0.15 (pr20) (2.0)
2 parents a3fca93 + e9de99f commit 1020fb9

File tree

6 files changed

+21
-8
lines changed

6 files changed

+21
-8
lines changed

app/code/Magento/Paypal/Model/AbstractIpn.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ protected function _postBack()
8282
{
8383
$httpAdapter = $this->_curlFactory->create();
8484
$postbackQuery = http_build_query($this->getRequestData()) . '&cmd=_notify-validate';
85-
$postbackUrl = $this->_config->getPaypalUrl();
85+
$postbackUrl = $this->_config->getPayPalIpnUrl();
8686
$this->_addDebugData('postback_to', $postbackUrl);
8787

8888
$httpAdapter->setConfig(['verifypeer' => $this->_config->getValue('verifyPeer')]);

app/code/Magento/Paypal/Model/Config.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
/**
1212
* Config model that is aware of all \Magento\Paypal payment methods
1313
* Works with PayPal-specific system configuration
14-
* @SuppressWarnings(PHPMD.ExcesivePublicCount)
14+
* @SuppressWarnings(PHPMD.ExcessivePublicCount)
1515
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
1616
*/
1717
class Config extends AbstractConfig
@@ -918,6 +918,19 @@ public function getPaypalUrl(array $params = [])
918918
);
919919
}
920920

921+
/**
922+
* PayPal web URL for IPN
923+
*
924+
* @return string
925+
*/
926+
public function getPayPalIpnUrl()
927+
{
928+
return sprintf(
929+
'https://ipnpb.%spaypal.com/cgi-bin/webscr',
930+
$this->getValue('sandboxFlag') ? 'sandbox.' : ''
931+
);
932+
}
933+
921934
/**
922935
* Whether Express Checkout button should be rendered dynamically
923936
*

app/code/Magento/Paypal/Test/Unit/Model/IpnTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ protected function setUp()
7878
$configMock->expects($this->any())->method('isMethodActive')->will($this->returnValue(true));
7979
$configMock->expects($this->any())->method('isMethodAvailable')->will($this->returnValue(true));
8080
$configMock->expects($this->any())->method('getValue')->will($this->returnValue(null));
81-
$configMock->expects($this->any())->method('getPaypalUrl')
82-
->will($this->returnValue('http://paypal_url'));
81+
$configMock->expects($this->any())->method('getPayPalIpnUrl')
82+
->will($this->returnValue('https://ipnpb_paypal_url'));
8383

8484
$this->curlFactory = $this->getMock(
8585
'Magento\Framework\HTTP\Adapter\CurlFactory',

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/magento2ce",
33
"description": "Magento 2 (Community Edition)",
44
"type": "project",
5-
"version": "2.0.14",
5+
"version": "2.0.15",
66
"license": [
77
"OSL-3.0",
88
"AFL-3.0"

composer.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/internal/Magento/Framework/AppInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ interface AppInterface
1717
/**
1818
* Magento version
1919
*/
20-
const VERSION = '2.0.14';
20+
const VERSION = '2.0.15';
2121

2222
/**
2323
* Launch application

0 commit comments

Comments
 (0)