Skip to content

Commit

Permalink
Merge pull request #1190 from magento-tsg/2.0-pr20
Browse files Browse the repository at this point in the history
[TSG] Preparing 2.0.15 (pr20) (2.0)
  • Loading branch information
wert2all authored Jun 13, 2017
2 parents a3fca93 + e9de99f commit 1020fb9
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/code/Magento/Paypal/Model/AbstractIpn.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ protected function _postBack()
{
$httpAdapter = $this->_curlFactory->create();
$postbackQuery = http_build_query($this->getRequestData()) . '&cmd=_notify-validate';
$postbackUrl = $this->_config->getPaypalUrl();
$postbackUrl = $this->_config->getPayPalIpnUrl();
$this->_addDebugData('postback_to', $postbackUrl);

$httpAdapter->setConfig(['verifypeer' => $this->_config->getValue('verifyPeer')]);
Expand Down
15 changes: 14 additions & 1 deletion app/code/Magento/Paypal/Model/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/**
* Config model that is aware of all \Magento\Paypal payment methods
* Works with PayPal-specific system configuration
* @SuppressWarnings(PHPMD.ExcesivePublicCount)
* @SuppressWarnings(PHPMD.ExcessivePublicCount)
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
*/
class Config extends AbstractConfig
Expand Down Expand Up @@ -918,6 +918,19 @@ public function getPaypalUrl(array $params = [])
);
}

/**
* PayPal web URL for IPN
*
* @return string
*/
public function getPayPalIpnUrl()
{
return sprintf(
'https://ipnpb.%spaypal.com/cgi-bin/webscr',
$this->getValue('sandboxFlag') ? 'sandbox.' : ''
);
}

/**
* Whether Express Checkout button should be rendered dynamically
*
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Paypal/Test/Unit/Model/IpnTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ protected function setUp()
$configMock->expects($this->any())->method('isMethodActive')->will($this->returnValue(true));
$configMock->expects($this->any())->method('isMethodAvailable')->will($this->returnValue(true));
$configMock->expects($this->any())->method('getValue')->will($this->returnValue(null));
$configMock->expects($this->any())->method('getPaypalUrl')
->will($this->returnValue('http://paypal_url'));
$configMock->expects($this->any())->method('getPayPalIpnUrl')
->will($this->returnValue('https://ipnpb_paypal_url'));

$this->curlFactory = $this->getMock(
'Magento\Framework\HTTP\Adapter\CurlFactory',
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/magento2ce",
"description": "Magento 2 (Community Edition)",
"type": "project",
"version": "2.0.14",
"version": "2.0.15",
"license": [
"OSL-3.0",
"AFL-3.0"
Expand Down
4 changes: 2 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/internal/Magento/Framework/AppInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface AppInterface
/**
* Magento version
*/
const VERSION = '2.0.14';
const VERSION = '2.0.15';

/**
* Launch application
Expand Down

0 comments on commit 1020fb9

Please sign in to comment.