Skip to content

Commit 75d88b0

Browse files
BB-20309: Updated allowed Payflow IP addresses (#29052)
1 parent 3f847c2 commit 75d88b0

File tree

3 files changed

+51
-0
lines changed

3 files changed

+51
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
.. _bundle-docs-commerce-paypal-bundle:
2+
3+
OroPayPalBundle
4+
===============
5+
6+
OroPayPalBundle adds |PayPal| integration to the OroCommerce application. For the OroCommerce management console administrator, the bundle provides the ability to enable and configure PayPal payment methods for customer orders. Once PayPal payment methods are enabled, customer users can pay for orders using their existing PayPal account or credit and debit cards.
7+
8+
Testing PayPal Response
9+
-----------------------
10+
11+
The process of purchasing through PayPal Payments Pro or Payflow Gateway includes listening to a notify response from PayPal servers. To make payments more secure, we have implemented the IP address filtering which only accepts responses from the PayPal server addresses` white list. The white list itself is stored in the *PayflowIPCheckListener* class by default.
12+
13+
For this IP check to work, the bundle has to be able to resolve the IP address from the request that is coming from a PayPal server. This is usually the case in the production environment when you have your server exposed to the internet.
14+
15+
To test the payments on the developer machine, you can use some kind of tunneling service, for example |Ngrok|. However, there can be some issues with the tunneling services. They tend to put the original request IP address in the header (e.g., `X-Forwarded-For`), and Symfony doesn't resolve this address as client IP by default.
16+
17+
Luckily, there is a way for Symfony to do that by enabling trusted proxies. For the detailed explanation, refer to |How to Configure Symfony to Work behind a Load Balancer or a Reverse Proxy|.
18+
19+
IP Address Whitelist Settings
20+
-----------------------------
21+
22+
To change whitelist of IP addresses, define it in the ``oro_paypal`` section with the ``allowed_ips`` property:
23+
24+
.. code-block:: yaml
25+
:linenos:
26+
27+
oro_paypal:
28+
allowed_ips:
29+
- 255.255.255.1
30+
- 255.255.255.2
31+
- 255.255.255.3
32+
- 255.255.254.0/24
33+
- 2001:db8::85a3:0:8a2e:370:7334,
34+
- 2001:db8::85a3:0:8a2e:370:7334/64
35+
36+
.. include:: /include/include-links-dev.rst
37+
:start-after: begin

backend/bundles/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ All documentation that relates to OroCommerce-specific bundles is collected belo
5959
":ref:`FrontendBundle <bundle-docs-commerce-customer-portal-frontend-bundle>`", "**T**"
6060
"**I**", ":ref:`TaxBundle <bundle-docs-commerce-tax-bundle>`"
6161
":ref:`InventoryBundle <bundle-docs-commerce-inventory-bundle>`"
62+
":ref:`PayPalBundle <bundle-docs-commerce-paypal-bundle>`"
6263

6364

6465
.. toctree::
@@ -140,6 +141,7 @@ All documentation that relates to OroCommerce-specific bundles is collected belo
140141
FrontendBundle <commerce/FrontendBundle/index>
141142
InventoryBundle <commerce/InventoryBundle/index>
142143
OrderBundle <commerce/OrderBundle/index>
144+
PayPalBundle <commerce/PayPalBundle/index>
143145
PricingBundle <commerce/PricingBundle/index>
144146
ProductBundle <commerce/ProductBundle/index>
145147
SEOBundle <commerce/SEOBundle/index>

include/include-links-dev.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,14 @@ Links (Dev)
171171

172172
<a href="https://github.com/tjko/jpegoptim" target="_blank">jpegoptim</a>
173173

174+
.. |PayPal| raw:: html
175+
176+
<a href="https://www.paypal.com/" target="_blank">PayPal</a>
177+
178+
.. |Ngrok| raw:: html
179+
180+
<a href="https://ngrok.com" target="_blank">Ngrok</a>
181+
174182
.. |MySQL| raw:: html
175183

176184
<a href="https://www.mysql.com/" target="_blank">MySQL</a>
@@ -736,6 +744,10 @@ Links (Dev)
736744

737745
<a href="https://symfony.com/doc/4.4/index.html" target="_blank">Symfony documentation</a>
738746

747+
.. |How to Configure Symfony to Work behind a Load Balancer or a Reverse Proxy| raw:: html
748+
749+
<a href="https://symfony.com/doc/4.4/deployment/proxies.html" target="_blank">How to Configure Symfony to Work behind a Load Balancer or a Reverse Proxy</a>
750+
739751
.. |Symfony applications| raw:: html
740752

741753
<a href="https://symfony.com/doc/4.4/introduction/http_fundamentals.html#the-symfony-application-flow" target="_blank">Symfony applications </a>

0 commit comments

Comments
 (0)