From a7df129ad6cfbb71dc3150ed5c3ef5923fb47d5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Je=CC=81ro=CC=82me=20Vieilledent?= Date: Mon, 25 Nov 2019 12:28:55 +0100 Subject: [PATCH 1/7] Add PaylineBundle --- .../payline-bundle/2.0/config/payline.yaml | 18 ++++++++++++++++++ lolautruche/payline-bundle/2.0/manifest.json | 14 ++++++++++++++ .../payline-bundle/2.0/post-install.txt | 16 ++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 lolautruche/payline-bundle/2.0/config/payline.yaml create mode 100644 lolautruche/payline-bundle/2.0/manifest.json create mode 100644 lolautruche/payline-bundle/2.0/post-install.txt diff --git a/lolautruche/payline-bundle/2.0/config/payline.yaml b/lolautruche/payline-bundle/2.0/config/payline.yaml new file mode 100644 index 00000000..31ec2ca5 --- /dev/null +++ b/lolautruche/payline-bundle/2.0/config/payline.yaml @@ -0,0 +1,18 @@ +lolautruche_payline: + # Credentials given by Payline. + # Set them as environment variable. + merchant_id: '%env(PAYLINE_MERCHANT_ID)%' + access_key: '%env(PAYLINE_ACCESS_KEY)%' + contract_number: '%env(PAYLINE_CONTRACT_NUMBER)%' + # Payline environment + # e.g. 'homo' for 'Homologation', 'prod' for 'Production', 'int' for 'Integration' + # Valid values are 'homo', 'prod', 'int' and 'dev'. + # Best practice is to define it with PAYLINE_ENVIRONMENT env var. + environment: '%env(PAYLINE_ENVIRONMENT)%' + # Default curreny, as supported by Payline. + # Can be EUR (or €), USD (or $), POUND (or £). + default_currency: '€' + # Route name for the confirmation page the user will be redirected to, once the payment has been processed. + default_confirmation_route: 'route_name_for_confirmation_page' + # Route name for the error page the user will be redirected to if there was an error with the payment. + default_error_route: 'route_name_for_error_page' diff --git a/lolautruche/payline-bundle/2.0/manifest.json b/lolautruche/payline-bundle/2.0/manifest.json new file mode 100644 index 00000000..4dfca9ef --- /dev/null +++ b/lolautruche/payline-bundle/2.0/manifest.json @@ -0,0 +1,14 @@ +{ + "bundles": { + "Lolautruche\\PaylineBundle\\LolautruchePaylineBundle": ["all"] + }, + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/" + }, + "env": { + "PAYLINE_MERCHANT_ID": "your_payline_merchant_id", + "PAYLINE_ACCESS_KEY": "your_payline_access_key", + "PAYLINE_CONTRACT_NUMBER": "your_payline_contract_number", + "PAYLINE_ENVIRONMENT": "homo" + } +} diff --git a/lolautruche/payline-bundle/2.0/post-install.txt b/lolautruche/payline-bundle/2.0/post-install.txt new file mode 100644 index 00000000..b8a6cbd7 --- /dev/null +++ b/lolautruche/payline-bundle/2.0/post-install.txt @@ -0,0 +1,16 @@ + + You just installed lolautruche/playline-bundle! + What's next? + + + * Use the default storage immediately: + + public function __construct(FilesystemInterface $defaultStorage) + { + ... + } + + * Configure Payline environment variables and settings in config/packages/payline.yaml. + + * Read the documentation at: + https://github.com/lolautruche/LolautruchePaylineBundle/blob/master/Resources/doc/00-index.md From 54ed180df535e94c6b8b1de5ed1934cd4c441dfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Je=CC=81ro=CC=82me=20Vieilledent?= Date: Mon, 25 Nov 2019 14:52:16 +0100 Subject: [PATCH 2/7] Add routes --- lolautruche/payline-bundle/2.0/config/routes/payline.yaml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 lolautruche/payline-bundle/2.0/config/routes/payline.yaml diff --git a/lolautruche/payline-bundle/2.0/config/routes/payline.yaml b/lolautruche/payline-bundle/2.0/config/routes/payline.yaml new file mode 100644 index 00000000..e7864c41 --- /dev/null +++ b/lolautruche/payline-bundle/2.0/config/routes/payline.yaml @@ -0,0 +1,3 @@ +LolautruchePaylineBundle: + resource: "@LolautruchePaylineBundle/Resources/config/routing.yml" + prefix: / From 75dbadf42b436c6b98d173489c67c6a252036656 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Je=CC=81ro=CC=82me=20Vieilledent?= Date: Mon, 25 Nov 2019 14:57:46 +0100 Subject: [PATCH 3/7] Move payline.yaml to config/packages --- lolautruche/payline-bundle/2.0/config/{ => packages}/payline.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename lolautruche/payline-bundle/2.0/config/{ => packages}/payline.yaml (100%) diff --git a/lolautruche/payline-bundle/2.0/config/payline.yaml b/lolautruche/payline-bundle/2.0/config/packages/payline.yaml similarity index 100% rename from lolautruche/payline-bundle/2.0/config/payline.yaml rename to lolautruche/payline-bundle/2.0/config/packages/payline.yaml From b748c3521b4de68e952cda8aead8566280b91ebf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Je=CC=81ro=CC=82me=20Vieilledent?= Date: Mon, 25 Nov 2019 15:00:05 +0100 Subject: [PATCH 4/7] Fix post-install.txt --- lolautruche/payline-bundle/2.0/post-install.txt | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lolautruche/payline-bundle/2.0/post-install.txt b/lolautruche/payline-bundle/2.0/post-install.txt index b8a6cbd7..1f6e20f8 100644 --- a/lolautruche/payline-bundle/2.0/post-install.txt +++ b/lolautruche/payline-bundle/2.0/post-install.txt @@ -1,15 +1,8 @@ - You just installed lolautruche/playline-bundle! + You just installed LolautruchePaylineBundle! What's next? - * Use the default storage immediately: - - public function __construct(FilesystemInterface $defaultStorage) - { - ... - } - * Configure Payline environment variables and settings in config/packages/payline.yaml. * Read the documentation at: From ac12d06ff6b303b5ede700c0590b1c7b162b003c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Je=CC=81ro=CC=82me=20Vieilledent?= Date: Mon, 25 Nov 2019 17:20:57 +0100 Subject: [PATCH 5/7] Fix review remarks --- .../payline-bundle/2.0/config/packages/payline.yaml | 7 ------- lolautruche/payline-bundle/2.0/config/routes/payline.yaml | 4 ++-- lolautruche/payline-bundle/2.0/manifest.json | 2 ++ lolautruche/payline-bundle/2.0/post-install.txt | 2 +- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/lolautruche/payline-bundle/2.0/config/packages/payline.yaml b/lolautruche/payline-bundle/2.0/config/packages/payline.yaml index 31ec2ca5..c3e274bb 100644 --- a/lolautruche/payline-bundle/2.0/config/packages/payline.yaml +++ b/lolautruche/payline-bundle/2.0/config/packages/payline.yaml @@ -1,15 +1,8 @@ lolautruche_payline: - # Credentials given by Payline. - # Set them as environment variable. merchant_id: '%env(PAYLINE_MERCHANT_ID)%' access_key: '%env(PAYLINE_ACCESS_KEY)%' contract_number: '%env(PAYLINE_CONTRACT_NUMBER)%' - # Payline environment - # e.g. 'homo' for 'Homologation', 'prod' for 'Production', 'int' for 'Integration' - # Valid values are 'homo', 'prod', 'int' and 'dev'. - # Best practice is to define it with PAYLINE_ENVIRONMENT env var. environment: '%env(PAYLINE_ENVIRONMENT)%' - # Default curreny, as supported by Payline. # Can be EUR (or €), USD (or $), POUND (or £). default_currency: '€' # Route name for the confirmation page the user will be redirected to, once the payment has been processed. diff --git a/lolautruche/payline-bundle/2.0/config/routes/payline.yaml b/lolautruche/payline-bundle/2.0/config/routes/payline.yaml index e7864c41..920c2843 100644 --- a/lolautruche/payline-bundle/2.0/config/routes/payline.yaml +++ b/lolautruche/payline-bundle/2.0/config/routes/payline.yaml @@ -1,3 +1,3 @@ LolautruchePaylineBundle: - resource: "@LolautruchePaylineBundle/Resources/config/routing.yml" - prefix: / + resource: '@LolautruchePaylineBundle/Resources/config/routing.yml' + prefix: / diff --git a/lolautruche/payline-bundle/2.0/manifest.json b/lolautruche/payline-bundle/2.0/manifest.json index 4dfca9ef..b88d40d4 100644 --- a/lolautruche/payline-bundle/2.0/manifest.json +++ b/lolautruche/payline-bundle/2.0/manifest.json @@ -9,6 +9,8 @@ "PAYLINE_MERCHANT_ID": "your_payline_merchant_id", "PAYLINE_ACCESS_KEY": "your_payline_access_key", "PAYLINE_CONTRACT_NUMBER": "your_payline_contract_number", + "#1": "Valid values are 'homo', 'prod', 'int' and 'dev'.", + "#2": "e.g. 'homo' for 'Homologation', 'prod' for 'Production', 'int' for 'Integration'", "PAYLINE_ENVIRONMENT": "homo" } } diff --git a/lolautruche/payline-bundle/2.0/post-install.txt b/lolautruche/payline-bundle/2.0/post-install.txt index 1f6e20f8..21499e15 100644 --- a/lolautruche/payline-bundle/2.0/post-install.txt +++ b/lolautruche/payline-bundle/2.0/post-install.txt @@ -3,7 +3,7 @@ What's next? - * Configure Payline environment variables and settings in config/packages/payline.yaml. + * Configure Payline environment variables in .env. * Read the documentation at: https://github.com/lolautruche/LolautruchePaylineBundle/blob/master/Resources/doc/00-index.md From fd065a57059ae56e1a551be93664371e92aace5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Je=CC=81ro=CC=82me=20Vieilledent?= Date: Tue, 26 Nov 2019 10:50:42 +0100 Subject: [PATCH 6/7] Added a post-install note about encrypted settings --- lolautruche/payline-bundle/2.0/post-install.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lolautruche/payline-bundle/2.0/post-install.txt b/lolautruche/payline-bundle/2.0/post-install.txt index 21499e15..6c4f3174 100644 --- a/lolautruche/payline-bundle/2.0/post-install.txt +++ b/lolautruche/payline-bundle/2.0/post-install.txt @@ -3,7 +3,9 @@ What's next? - * Configure Payline environment variables in .env. + * Configure Payline environment variables in .env; + + * Encrypt sensitive environment variables with bin/console secrets:set command (optional); * Read the documentation at: https://github.com/lolautruche/LolautruchePaylineBundle/blob/master/Resources/doc/00-index.md From 0c784271a7ab36b9662146d2154329c816b7d534 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Je=CC=81ro=CC=82me=20Vieilledent?= Date: Thu, 28 Nov 2019 17:51:47 +0100 Subject: [PATCH 7/7] Comment credentials env vars --- lolautruche/payline-bundle/2.0/manifest.json | 4 ++-- lolautruche/payline-bundle/2.0/post-install.txt | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lolautruche/payline-bundle/2.0/manifest.json b/lolautruche/payline-bundle/2.0/manifest.json index b88d40d4..a849b3c0 100644 --- a/lolautruche/payline-bundle/2.0/manifest.json +++ b/lolautruche/payline-bundle/2.0/manifest.json @@ -6,8 +6,8 @@ "config/": "%CONFIG_DIR%/" }, "env": { - "PAYLINE_MERCHANT_ID": "your_payline_merchant_id", - "PAYLINE_ACCESS_KEY": "your_payline_access_key", + "#PAYLINE_MERCHANT_ID": "your_payline_merchant_id", + "#PAYLINE_ACCESS_KEY": "your_payline_access_key", "PAYLINE_CONTRACT_NUMBER": "your_payline_contract_number", "#1": "Valid values are 'homo', 'prod', 'int' and 'dev'.", "#2": "e.g. 'homo' for 'Homologation', 'prod' for 'Production', 'int' for 'Integration'", diff --git a/lolautruche/payline-bundle/2.0/post-install.txt b/lolautruche/payline-bundle/2.0/post-install.txt index 6c4f3174..c2343b80 100644 --- a/lolautruche/payline-bundle/2.0/post-install.txt +++ b/lolautruche/payline-bundle/2.0/post-install.txt @@ -5,7 +5,10 @@ * Configure Payline environment variables in .env; - * Encrypt sensitive environment variables with bin/console secrets:set command (optional); + * Using Symfony 4.4/5.x: Encrypt sensitive environment variables + with bin/console secrets:set command (optional); + + * Using Symfony 3.4/4.x: Ensure to correctly expose the environment variables commented in `.env` file. * Read the documentation at: https://github.com/lolautruche/LolautruchePaylineBundle/blob/master/Resources/doc/00-index.md