File tree Expand file tree Collapse file tree 1 file changed +57
-0
lines changed
Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Original file line number Diff line number Diff line change 66
77<h1 align =" center " >PayPal Plugin</h1 >
88
9+ ## Installation
10+
11+ 1 . Run
12+
13+ ``` bash
14+ composer require sylius/paypal-plugin
15+ ```
16+
17+ 2. Import routes
18+
19+ ` ` ` yaml
20+ # config/routes/sylius_shop.yaml
21+
22+ sylius_paypal:
23+ resource: " @SyliusPayPalPlugin/Resources/config/shop_routing.yaml"
24+ prefix: /{_locale}
25+ requirements:
26+ _locale: ^[A-Za-z]{2,4}(_([A-Za-z]{4}| [0-9]{3}))? (_([A-Za-z]{2}| [0-9]{3}))? $
27+
28+ # config/routes/sylius_admin.yaml
29+
30+ sylius_paypal_admin:
31+ resource: " @SyliusPayPalPlugin/Resources/config/admin_routing.yml"
32+ prefix: /admin
33+ ` ` `
34+
35+ 3. Import configuration
36+
37+ ` ` ` yaml
38+ # config/packages/_sylius.yaml
39+
40+ imports:
41+ # ...
42+ - { resource: " @SyliusPayPalPlugin/Resources/config/config.yaml" }
43+ ` ` `
44+
45+ 3. Override Sylius' templates
46+
47+ ```bash
48+ cp -R vendor/sylius/paypal-plugin/src/Resources/views/bundles/* templates/bundles/
49+ ```
50+
51+ 4. Add env variables
52+
53+ ```
54+ #.env
55+
56+ PAYPAL_API_BASE_URL=' https://api.sandbox.paypal.com/'
57+ # just for now, it will be eventually hardcoded (as we always want to use Sylius PayPal facilitator)
58+ PAYPAL_FACILITATOR_URL=' https://paypal.sylius.com'
59+ ```
60+
61+ > BEWARE!
62+
63+ To make PayPal integration working, your local Sylius URL should be accessible for the PayPal servers. Therefore you can
64+ add the proper directive to your `/etc/hosts` (something like `127.0.0.1 sylius.local`) or use a service as [ngrok](https://ngrok.com/).
65+
966## PayPal reports
1067
1168To be able to download reports about your payouts, you need to have reports feature enabled on your PayPal account. Also,
You can’t perform that action at this time.
0 commit comments