Skip to content

Commit

Permalink
minor #50 readme with instructions how to install plugin (SirDomin, Z…
Browse files Browse the repository at this point in the history
…ales0123)

This PR was merged into the 1.0-dev branch.

Discussion
----------

![image](https://user-images.githubusercontent.com/22825722/90122868-41deb480-dd5e-11ea-9a88-a353dcc678c9.png)


Commits
-------

47c3a8c readme with instructions how to install plugin
59545ad Instalation instruction improvements
  • Loading branch information
Zales0123 authored Aug 14, 2020
2 parents 0a52e32 + 59545ad commit d8fe821
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,63 @@

<h1 align="center">PayPal Plugin</h1>

## Installation

1. Run

```bash
composer require sylius/paypal-plugin
```

2. Import routes

```yaml
# config/routes/sylius_shop.yaml
sylius_paypal:
resource: "@SyliusPayPalPlugin/Resources/config/shop_routing.yaml"
prefix: /{_locale}
requirements:
_locale: ^[A-Za-z]{2,4}(_([A-Za-z]{4}|[0-9]{3}))?(_([A-Za-z]{2}|[0-9]{3}))?$
#config/routes/sylius_admin.yaml
sylius_paypal_admin:
resource: "@SyliusPayPalPlugin/Resources/config/admin_routing.yml"
prefix: /admin
```

3. Import configuration

```yaml
# config/packages/_sylius.yaml
imports:
# ...
- { resource: "@SyliusPayPalPlugin/Resources/config/config.yaml" }
```
3. Override Sylius' templates
```bash
cp -R vendor/sylius/paypal-plugin/src/Resources/views/bundles/* templates/bundles/
```
4. Add env variables
```
#.env
PAYPAL_API_BASE_URL='https://api.sandbox.paypal.com/'
# just for now, it will be eventually hardcoded (as we always want to use Sylius PayPal facilitator)
PAYPAL_FACILITATOR_URL='https://paypal.sylius.com'
```
> BEWARE!
To make PayPal integration working, your local Sylius URL should be accessible for the PayPal servers. Therefore you can
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/).
## PayPal reports
To be able to download reports about your payouts, you need to have reports feature enabled on your PayPal account. Also,
Expand Down

0 comments on commit d8fe821

Please sign in to comment.