Skip to content

Commit 411cbde

Browse files
committed
chore: prepare for release
1 parent 8343294 commit 411cbde

File tree

3 files changed

+111
-303
lines changed

3 files changed

+111
-303
lines changed

README.md

Lines changed: 47 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -1,112 +1,54 @@
11
<p align="center">
2-
<a href="https://sylius.com" target="_blank">
3-
<img src="https://demo.sylius.com/assets/shop/img/logo.png" />
4-
</a>
2+
<img src="https://getalma.eu/static/website/new/img/logo.png" alt="logo alma" />
3+
<img src="https://demo.sylius.com/assets/shop/img/logo.png" height="75" />
54
</p>
65

7-
<h1 align="center">Plugin Skeleton</h1>
6+
<h1 align="center">Sylius Alma Payment Plugin</h1>
87

9-
<p align="center">Skeleton for starting Sylius plugins.</p>
8+
<p align="center">Integrate Alma installments and pay later payments with your Sylius shop</p>
109

1110
## Documentation
1211

13-
For a comprehensive guide on Sylius Plugins development please go to Sylius documentation,
14-
there you will find the <a href="https://docs.sylius.com/en/latest/plugin-development-guide/index.html">Plugin Development Guide</a>, that is full of examples.
15-
16-
## Quickstart Installation
17-
18-
1. Run `composer create-project sylius/plugin-skeleton ProjectName`.
19-
20-
2. From the plugin skeleton root directory, run the following commands:
21-
22-
```bash
23-
$ (cd tests/Application && yarn install)
24-
$ (cd tests/Application && yarn build)
25-
$ (cd tests/Application && APP_ENV=test bin/console assets:install public)
26-
27-
$ (cd tests/Application && APP_ENV=test bin/console doctrine:database:create)
28-
$ (cd tests/Application && APP_ENV=test bin/console doctrine:schema:create)
29-
```
30-
31-
To be able to setup a plugin's database, remember to configure you database credentials in `tests/Application/.env` and `tests/Application/.env.test`.
32-
33-
## Usage
34-
35-
### Running plugin tests
36-
37-
- PHPUnit
38-
39-
```bash
40-
vendor/bin/phpunit
41-
```
42-
43-
- PHPSpec
44-
45-
```bash
46-
vendor/bin/phpspec run
47-
```
48-
49-
- Behat (non-JS scenarios)
50-
51-
```bash
52-
vendor/bin/behat --strict --tags="~@javascript"
53-
```
54-
55-
- Behat (JS scenarios)
56-
57-
1. [Install Symfony CLI command](https://symfony.com/download).
58-
59-
2. Start Headless Chrome:
60-
61-
```bash
62-
google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --allow-insecure-localhost --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server='direct://' --proxy-bypass-list='*' http://127.0.0.1
63-
```
64-
65-
3. Install SSL certificates (only once needed) and run test application's webserver on `127.0.0.1:8080`:
66-
67-
```bash
68-
symfony server:ca:install
69-
APP_ENV=test symfony server:start --port=8080 --dir=tests/Application/public --daemon
70-
```
71-
72-
4. Run Behat:
73-
74-
```bash
75-
vendor/bin/behat --strict --tags="@javascript"
76-
```
77-
78-
- Static Analysis
79-
80-
- Psalm
81-
82-
```bash
83-
vendor/bin/psalm
84-
```
85-
86-
- PHPStan
87-
88-
```bash
89-
vendor/bin/phpstan analyse -c phpstan.neon -l max src/
90-
```
91-
92-
- Coding Standard
93-
94-
```bash
95-
vendor/bin/ecs check src
96-
```
97-
98-
### Opening Sylius with your plugin
99-
100-
- Using `test` environment:
101-
102-
```bash
103-
(cd tests/Application && APP_ENV=test bin/console sylius:fixtures:load)
104-
(cd tests/Application && APP_ENV=test bin/console server:run -d public)
105-
```
106-
107-
- Using `dev` environment:
108-
109-
```bash
110-
(cd tests/Application && APP_ENV=dev bin/console sylius:fixtures:load)
111-
(cd tests/Application && APP_ENV=dev bin/console server:run -d public)
112-
```
12+
### Installation
13+
Use Composer to install the plugin:
14+
15+
```
16+
$ composer require alma/sylius-payment-plugin
17+
```
18+
19+
Update your shop's translation catalogs:
20+
21+
```
22+
$ php bin/console translation:update --dump-messages fr AlmaSyliusPaymentPlugin
23+
$ php bin/console translation:update --dump-messages en AlmaSyliusPaymentPlugin
24+
```
25+
26+
Finally, clear your cache:
27+
28+
```
29+
$ php bin/console cache:clear
30+
```
31+
32+
### Requirements
33+
Alma currently accepts Euros only; make sure you activate your payment method on channels that use that currency, else
34+
you won't see it at checkout.
35+
36+
Your Alma payment methods will only show for eligible carts. Eligibility is mainly based on the purchased amount, which
37+
by default should be between 100€ and 2000€; if you want those limits changed, you can talk to your sales representative
38+
at Alma, or contact [[email protected]](mailto:[email protected]).
39+
40+
### Usage
41+
1. Go to the Payment Methods admin page and choose to create a new "Alma Payments" method
42+
43+
2. Grab your API keys [from your dashboard](https://dashboard.getalma.eu/api) and paste them into the appropriate fields
44+
45+
3. Choose the installments count to apply for this payment method. If you want to offer multiple installments counts to
46+
your customers, you can create one Alma payment method per installments count.
47+
48+
4. Set the API mode to Test if you want to first test the integration with a fake credit card, on your preproduction
49+
servers for instance.
50+
When you're ready for production, set the API mode to Live.
51+
52+
5. Choose a name for your method in the languages relevant to your shop.
53+
54+
6. You're done! Save the payment method to start accepting instalments payments on your shop!

UPGRADE.md

Lines changed: 0 additions & 122 deletions
This file was deleted.

0 commit comments

Comments
 (0)