Skip to content

Commit 6a8995b

Browse files
authored
Merge pull request #1246 from magento-east/MAGETWO-69822
MAGETWO-69822: Prepare code base for 2.0.16
2 parents 062d50f + 6322ad8 commit 6a8995b

File tree

7 files changed

+23
-10
lines changed

7 files changed

+23
-10
lines changed

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

+1-1
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

+14-1
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

+2-2
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',

app/code/Magento/Paypal/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"magento/module-checkout-agreements": "100.0.*"
2525
},
2626
"type": "magento2-module",
27-
"version": "100.0.9",
27+
"version": "100.0.10",
2828
"license": [
2929
"proprietary"
3030
],

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
"magento/module-offline-shipping": "100.0.6",
135135
"magento/module-page-cache": "100.0.8",
136136
"magento/module-payment": "100.0.11",
137-
"magento/module-paypal": "100.0.9",
137+
"magento/module-paypal": "100.0.10",
138138
"magento/module-persistent": "100.0.6",
139139
"magento/module-product-alert": "100.0.7",
140140
"magento/module-product-video": "100.0.9",
@@ -182,7 +182,7 @@
182182
"magento/language-nl_nl": "100.0.6",
183183
"magento/language-pt_br": "100.0.6",
184184
"magento/language-zh_hans_cn": "100.0.6",
185-
"magento/framework": "100.0.16",
185+
"magento/framework": "100.0.17",
186186
"trentrichardson/jquery-timepicker-addon": "1.4.3",
187187
"colinmollenhour/cache-backend-redis": "1.8",
188188
"components/jquery": "1.11.0",

composer.lock

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/internal/Magento/Framework/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/framework",
33
"description": "N/A",
44
"type": "magento2-library",
5-
"version": "100.0.16",
5+
"version": "100.0.17",
66
"license": [
77
"OSL-3.0",
88
"AFL-3.0"

0 commit comments

Comments
 (0)