File tree 6 files changed +21
-8
lines changed
lib/internal/Magento/Framework
6 files changed +21
-8
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ protected function _postBack()
82
82
{
83
83
$ httpAdapter = $ this ->_curlFactory ->create ();
84
84
$ postbackQuery = http_build_query ($ this ->getRequestData ()) . '&cmd=_notify-validate ' ;
85
- $ postbackUrl = $ this ->_config ->getPaypalUrl ();
85
+ $ postbackUrl = $ this ->_config ->getPayPalIpnUrl ();
86
86
$ this ->_addDebugData ('postback_to ' , $ postbackUrl );
87
87
88
88
$ httpAdapter ->setConfig (['verifypeer ' => $ this ->_config ->getValue ('verifyPeer ' )]);
Original file line number Diff line number Diff line change 11
11
/**
12
12
* Config model that is aware of all \Magento\Paypal payment methods
13
13
* Works with PayPal-specific system configuration
14
- * @SuppressWarnings(PHPMD.ExcesivePublicCount )
14
+ * @SuppressWarnings(PHPMD.ExcessivePublicCount )
15
15
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
16
16
*/
17
17
class Config extends AbstractConfig
@@ -918,6 +918,19 @@ public function getPaypalUrl(array $params = [])
918
918
);
919
919
}
920
920
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
+
921
934
/**
922
935
* Whether Express Checkout button should be rendered dynamically
923
936
*
Original file line number Diff line number Diff line change @@ -78,8 +78,8 @@ protected function setUp()
78
78
$ configMock ->expects ($ this ->any ())->method ('isMethodActive ' )->will ($ this ->returnValue (true ));
79
79
$ configMock ->expects ($ this ->any ())->method ('isMethodAvailable ' )->will ($ this ->returnValue (true ));
80
80
$ 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 ' ));
83
83
84
84
$ this ->curlFactory = $ this ->getMock (
85
85
'Magento\Framework\HTTP\Adapter\CurlFactory ' ,
Original file line number Diff line number Diff line change 2
2
"name" : " magento/magento2ce" ,
3
3
"description" : " Magento 2 (Community Edition)" ,
4
4
"type" : " project" ,
5
- "version" : " 2.0.14 " ,
5
+ "version" : " 2.0.15 " ,
6
6
"license" : [
7
7
" OSL-3.0" ,
8
8
" AFL-3.0"
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ interface AppInterface
17
17
/**
18
18
* Magento version
19
19
*/
20
- const VERSION = '2.0.14 ' ;
20
+ const VERSION = '2.0.15 ' ;
21
21
22
22
/**
23
23
* Launch application
You can’t perform that action at this time.
0 commit comments