Skip to content

Commit

Permalink
Merge pull request #1246 from magento-east/MAGETWO-69822
Browse files Browse the repository at this point in the history
MAGETWO-69822: Prepare code base for 2.0.16
  • Loading branch information
wert2all authored Jun 30, 2017
2 parents 062d50f + 6322ad8 commit 6a8995b
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 10 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 app/code/Magento/Paypal/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"magento/module-checkout-agreements": "100.0.*"
},
"type": "magento2-module",
"version": "100.0.9",
"version": "100.0.10",
"license": [
"proprietary"
],
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
"magento/module-offline-shipping": "100.0.6",
"magento/module-page-cache": "100.0.8",
"magento/module-payment": "100.0.11",
"magento/module-paypal": "100.0.9",
"magento/module-paypal": "100.0.10",
"magento/module-persistent": "100.0.6",
"magento/module-product-alert": "100.0.7",
"magento/module-product-video": "100.0.9",
Expand Down Expand Up @@ -182,7 +182,7 @@
"magento/language-nl_nl": "100.0.6",
"magento/language-pt_br": "100.0.6",
"magento/language-zh_hans_cn": "100.0.6",
"magento/framework": "100.0.16",
"magento/framework": "100.0.17",
"trentrichardson/jquery-timepicker-addon": "1.4.3",
"colinmollenhour/cache-backend-redis": "1.8",
"components/jquery": "1.11.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/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/framework",
"description": "N/A",
"type": "magento2-library",
"version": "100.0.16",
"version": "100.0.17",
"license": [
"OSL-3.0",
"AFL-3.0"
Expand Down

0 comments on commit 6a8995b

Please sign in to comment.