From 4babfe3b644aec5bbc0f319ce0413178cedd2750 Mon Sep 17 00:00:00 2001 From: Daniel STANCU Date: Thu, 26 Jul 2018 21:59:11 +0300 Subject: [PATCH 01/12] Mobilpay.ro Payment Gateway recipe --- .../1.0/config/netopia_mobilpay/.gitignore | 5 +++++ .../1.0/config/packages/netopia_mobilpay.yaml | 13 ++++++++++++ .../netopia-mobilpay-bundle/1.0/manifest.json | 20 +++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 birkof/netopia-mobilpay-bundle/1.0/config/netopia_mobilpay/.gitignore create mode 100644 birkof/netopia-mobilpay-bundle/1.0/config/packages/netopia_mobilpay.yaml create mode 100644 birkof/netopia-mobilpay-bundle/1.0/manifest.json diff --git a/birkof/netopia-mobilpay-bundle/1.0/config/netopia_mobilpay/.gitignore b/birkof/netopia-mobilpay-bundle/1.0/config/netopia_mobilpay/.gitignore new file mode 100644 index 00000000..ad8502c8 --- /dev/null +++ b/birkof/netopia-mobilpay-bundle/1.0/config/netopia_mobilpay/.gitignore @@ -0,0 +1,5 @@ +# Ignore everything +* + +# But not these files... +!.gitignore diff --git a/birkof/netopia-mobilpay-bundle/1.0/config/packages/netopia_mobilpay.yaml b/birkof/netopia-mobilpay-bundle/1.0/config/packages/netopia_mobilpay.yaml new file mode 100644 index 00000000..6d874aca --- /dev/null +++ b/birkof/netopia-mobilpay-bundle/1.0/config/packages/netopia_mobilpay.yaml @@ -0,0 +1,13 @@ +parameters: + env(NETOPIA_MOBILPAY_PAYMENT_URL): 'http://sandboxsecure.mobilpay.ro' # http://sandboxsecure.mobilpay.ro or https://secure.mobilpay.ro + env(NETOPIA_MOBILPAY_PUBLIC_CERT): 'config/netopia_mobilpay/public.cer' + env(NETOPIA_MOBILPAY_PRIVATE_KEY): 'config/netopia_mobilpay/private.key' + env(NETOPIA_MOBILPAY_SIGNATURE): 'XXXX-XXXX-XXXX-XXXX-XXXX' # Signature from mobilpay + +netopia_mobilpay: + payment_url: '%env(string:NETOPIA_MOBILPAY_PAYMENT_URL)%' + public_cert: '%env(resolve:NETOPIA_MOBILPAY_PUBLIC_CERT)%' + private_key: '%env(resolve:NETOPIA_MOBILPAY_PRIVATE_KEY)%' + signature: '%env(string:NETOPIA_MOBILPAY_SIGNATURE)%' + return_url: 'netopia_mobilpay_return_url' + confirm_url: 'netopia_mobilpay_confirm_url' diff --git a/birkof/netopia-mobilpay-bundle/1.0/manifest.json b/birkof/netopia-mobilpay-bundle/1.0/manifest.json new file mode 100644 index 00000000..85ee8b78 --- /dev/null +++ b/birkof/netopia-mobilpay-bundle/1.0/manifest.json @@ -0,0 +1,20 @@ +{ + "bundles": { + "birkof\NetopiaMobilPay\\NetopiaMobilPayBundle": ["all"] + }, + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/" + }, + "aliases": ["netopia-mobilpay"], + "gitignore": [ + "/%CONFIG_DIR%/netopia_mobilpay/*.key", + "/%CONFIG_DIR%/netopia_mobilpay/*.cer" + ], + "env": { + "NETOPIA_MOBILPAY_PAYMENT_URL": "http://sandboxsecure.mobilpay.ro", + "NETOPIA_MOBILPAY_PUBLIC_CERT": "%kernel.project_dir%/%CONFIG_DIR%/netopia_mobilpay/public.cer", + "NETOPIA_MOBILPAY_PRIVATE_KEY": "%kernel.project_dir%/%CONFIG_DIR%/netopia_mobilpay/private.key", + "NETOPIA_MOBILPAY_SIGNATURE": "XXXX-XXXX-XXXX-XXXX-XXXX" + } +} + From 3bb33bc334aaf82eb40e90a5c99fb6ed9c7b8369 Mon Sep 17 00:00:00 2001 From: Daniel STANCU Date: Thu, 26 Jul 2018 22:10:19 +0300 Subject: [PATCH 02/12] Minor fixes --- .../1.0/config/packages/netopia_mobilpay.yaml | 14 ++++---------- birkof/netopia-mobilpay-bundle/1.0/manifest.json | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/birkof/netopia-mobilpay-bundle/1.0/config/packages/netopia_mobilpay.yaml b/birkof/netopia-mobilpay-bundle/1.0/config/packages/netopia_mobilpay.yaml index 6d874aca..f520c013 100644 --- a/birkof/netopia-mobilpay-bundle/1.0/config/packages/netopia_mobilpay.yaml +++ b/birkof/netopia-mobilpay-bundle/1.0/config/packages/netopia_mobilpay.yaml @@ -1,13 +1,7 @@ -parameters: - env(NETOPIA_MOBILPAY_PAYMENT_URL): 'http://sandboxsecure.mobilpay.ro' # http://sandboxsecure.mobilpay.ro or https://secure.mobilpay.ro - env(NETOPIA_MOBILPAY_PUBLIC_CERT): 'config/netopia_mobilpay/public.cer' - env(NETOPIA_MOBILPAY_PRIVATE_KEY): 'config/netopia_mobilpay/private.key' - env(NETOPIA_MOBILPAY_SIGNATURE): 'XXXX-XXXX-XXXX-XXXX-XXXX' # Signature from mobilpay - netopia_mobilpay: - payment_url: '%env(string:NETOPIA_MOBILPAY_PAYMENT_URL)%' - public_cert: '%env(resolve:NETOPIA_MOBILPAY_PUBLIC_CERT)%' - private_key: '%env(resolve:NETOPIA_MOBILPAY_PRIVATE_KEY)%' - signature: '%env(string:NETOPIA_MOBILPAY_SIGNATURE)%' + payment_url: '%env(NETOPIA_MOBILPAY_PAYMENT_URL)%' + public_cert: '%env(NETOPIA_MOBILPAY_PUBLIC_CERT)%' + private_key: '%env(NETOPIA_MOBILPAY_PRIVATE_KEY)%' + signature: '%env(NETOPIA_MOBILPAY_SIGNATURE)%' return_url: 'netopia_mobilpay_return_url' confirm_url: 'netopia_mobilpay_confirm_url' diff --git a/birkof/netopia-mobilpay-bundle/1.0/manifest.json b/birkof/netopia-mobilpay-bundle/1.0/manifest.json index 85ee8b78..35bf06f3 100644 --- a/birkof/netopia-mobilpay-bundle/1.0/manifest.json +++ b/birkof/netopia-mobilpay-bundle/1.0/manifest.json @@ -1,6 +1,6 @@ { "bundles": { - "birkof\NetopiaMobilPay\\NetopiaMobilPayBundle": ["all"] + "birkof\\NetopiaMobilPay\\NetopiaMobilPayBundle": ["all"] }, "copy-from-recipe": { "config/": "%CONFIG_DIR%/" From 2d0cc17d0fc2f029f89f88e24ac06d4c25de2cee Mon Sep 17 00:00:00 2001 From: Daniel STANCU Date: Thu, 26 Jul 2018 22:21:37 +0300 Subject: [PATCH 03/12] Aliases not supported in the contrib repository --- birkof/netopia-mobilpay-bundle/1.0/manifest.json | 1 - 1 file changed, 1 deletion(-) diff --git a/birkof/netopia-mobilpay-bundle/1.0/manifest.json b/birkof/netopia-mobilpay-bundle/1.0/manifest.json index 35bf06f3..dfb65e29 100644 --- a/birkof/netopia-mobilpay-bundle/1.0/manifest.json +++ b/birkof/netopia-mobilpay-bundle/1.0/manifest.json @@ -5,7 +5,6 @@ "copy-from-recipe": { "config/": "%CONFIG_DIR%/" }, - "aliases": ["netopia-mobilpay"], "gitignore": [ "/%CONFIG_DIR%/netopia_mobilpay/*.key", "/%CONFIG_DIR%/netopia_mobilpay/*.cer" From 750697b5258032aae897bbcb82930302b40e39fb Mon Sep 17 00:00:00 2001 From: Daniel STANCU Date: Thu, 26 Jul 2018 22:39:06 +0300 Subject: [PATCH 04/12] Added post-install script --- birkof/netopia-mobilpay-bundle/1.0/post-install.txt | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 birkof/netopia-mobilpay-bundle/1.0/post-install.txt diff --git a/birkof/netopia-mobilpay-bundle/1.0/post-install.txt b/birkof/netopia-mobilpay-bundle/1.0/post-install.txt new file mode 100644 index 00000000..7b6f07f2 --- /dev/null +++ b/birkof/netopia-mobilpay-bundle/1.0/post-install.txt @@ -0,0 +1,5 @@ + + What's next? + + + * Read the documentation at https://github.com/birkof/netopia-mobilpay-bundle \ No newline at end of file From dfa450e285d5cf5ea34834b47534fb7819d599fe Mon Sep 17 00:00:00 2001 From: Daniel STANCU Date: Thu, 26 Jul 2018 22:40:42 +0300 Subject: [PATCH 05/12] Added newline --- birkof/netopia-mobilpay-bundle/1.0/post-install.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/birkof/netopia-mobilpay-bundle/1.0/post-install.txt b/birkof/netopia-mobilpay-bundle/1.0/post-install.txt index 7b6f07f2..defe4974 100644 --- a/birkof/netopia-mobilpay-bundle/1.0/post-install.txt +++ b/birkof/netopia-mobilpay-bundle/1.0/post-install.txt @@ -2,4 +2,4 @@ What's next? - * Read the documentation at https://github.com/birkof/netopia-mobilpay-bundle \ No newline at end of file + * Read the documentation at https://github.com/birkof/netopia-mobilpay-bundle From 4e6ec84c3a48410b6264c0b668c650fb92f27d14 Mon Sep 17 00:00:00 2001 From: Daniel STANCU Date: Wed, 8 Aug 2018 11:34:44 +0300 Subject: [PATCH 06/12] config/netopia_mobilpay/.gitignore --- .../1.0/config/netopia_mobilpay/.gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/birkof/netopia-mobilpay-bundle/1.0/config/netopia_mobilpay/.gitignore b/birkof/netopia-mobilpay-bundle/1.0/config/netopia_mobilpay/.gitignore index ad8502c8..e43b10ba 100644 --- a/birkof/netopia-mobilpay-bundle/1.0/config/netopia_mobilpay/.gitignore +++ b/birkof/netopia-mobilpay-bundle/1.0/config/netopia_mobilpay/.gitignore @@ -1,4 +1,4 @@ -# Ignore everything +# Exclude SSL files from pushing * # But not these files... From 8c9ff08dc30982eb925b6594529d852b6e011ef9 Mon Sep 17 00:00:00 2001 From: Daniel STANCU Date: Wed, 8 Aug 2018 21:48:47 +0300 Subject: [PATCH 07/12] Refactor confirm & return urls --- .../1.0/config/packages/netopia_mobilpay.yaml | 3 +-- .../1.0/config/routes/netopia_mobilpay.yaml | 9 +++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 birkof/netopia-mobilpay-bundle/1.0/config/routes/netopia_mobilpay.yaml diff --git a/birkof/netopia-mobilpay-bundle/1.0/config/packages/netopia_mobilpay.yaml b/birkof/netopia-mobilpay-bundle/1.0/config/packages/netopia_mobilpay.yaml index f520c013..12525826 100644 --- a/birkof/netopia-mobilpay-bundle/1.0/config/packages/netopia_mobilpay.yaml +++ b/birkof/netopia-mobilpay-bundle/1.0/config/packages/netopia_mobilpay.yaml @@ -3,5 +3,4 @@ netopia_mobilpay: public_cert: '%env(NETOPIA_MOBILPAY_PUBLIC_CERT)%' private_key: '%env(NETOPIA_MOBILPAY_PRIVATE_KEY)%' signature: '%env(NETOPIA_MOBILPAY_SIGNATURE)%' - return_url: 'netopia_mobilpay_return_url' - confirm_url: 'netopia_mobilpay_confirm_url' + sms_service: '%env(NETOPIA_MOBILPAY_SMS_SERVICE)%' diff --git a/birkof/netopia-mobilpay-bundle/1.0/config/routes/netopia_mobilpay.yaml b/birkof/netopia-mobilpay-bundle/1.0/config/routes/netopia_mobilpay.yaml new file mode 100644 index 00000000..83daa3cd --- /dev/null +++ b/birkof/netopia-mobilpay-bundle/1.0/config/routes/netopia_mobilpay.yaml @@ -0,0 +1,9 @@ +netopia_mobilpay_return_url: + controller: "@NetopiaMobilPayBundle/Controller/NetopiaMobilpayController.php::returnUrlAction" + path: /netopia-mobilpay/thank-you + methods: GET + +netopia_mobilpay_confirm_url: + controller: "@NetopiaMobilPayBundle/Controller/NetopiaMobilpayController.php::confirmUrlAction" + path: /netopia-mobilpay/confirm + methods: POST From efc8936aa19f96e1d756317febd94a5ff9eb99fa Mon Sep 17 00:00:00 2001 From: Daniel STANCU Date: Wed, 8 Aug 2018 22:21:21 +0300 Subject: [PATCH 08/12] Added configuration for SMS gateway --- birkof/netopia-mobilpay-bundle/1.0/manifest.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/birkof/netopia-mobilpay-bundle/1.0/manifest.json b/birkof/netopia-mobilpay-bundle/1.0/manifest.json index dfb65e29..b80c648c 100644 --- a/birkof/netopia-mobilpay-bundle/1.0/manifest.json +++ b/birkof/netopia-mobilpay-bundle/1.0/manifest.json @@ -13,7 +13,8 @@ "NETOPIA_MOBILPAY_PAYMENT_URL": "http://sandboxsecure.mobilpay.ro", "NETOPIA_MOBILPAY_PUBLIC_CERT": "%kernel.project_dir%/%CONFIG_DIR%/netopia_mobilpay/public.cer", "NETOPIA_MOBILPAY_PRIVATE_KEY": "%kernel.project_dir%/%CONFIG_DIR%/netopia_mobilpay/private.key", - "NETOPIA_MOBILPAY_SIGNATURE": "XXXX-XXXX-XXXX-XXXX-XXXX" + "NETOPIA_MOBILPAY_SIGNATURE": "XXXX-XXXX-XXXX-XXXX-XXXX", + "NETOPIA_MOBILPAY_SMS_SERVICE": "000000-000000-000000" } } From 63fbc581f676942b0f18f455ca98f58867e642b9 Mon Sep 17 00:00:00 2001 From: Daniel STANCU Date: Thu, 9 Aug 2018 12:50:54 +0300 Subject: [PATCH 09/12] Already ignored from config folder --- birkof/netopia-mobilpay-bundle/1.0/manifest.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/birkof/netopia-mobilpay-bundle/1.0/manifest.json b/birkof/netopia-mobilpay-bundle/1.0/manifest.json index b80c648c..cfc1d39c 100644 --- a/birkof/netopia-mobilpay-bundle/1.0/manifest.json +++ b/birkof/netopia-mobilpay-bundle/1.0/manifest.json @@ -5,10 +5,6 @@ "copy-from-recipe": { "config/": "%CONFIG_DIR%/" }, - "gitignore": [ - "/%CONFIG_DIR%/netopia_mobilpay/*.key", - "/%CONFIG_DIR%/netopia_mobilpay/*.cer" - ], "env": { "NETOPIA_MOBILPAY_PAYMENT_URL": "http://sandboxsecure.mobilpay.ro", "NETOPIA_MOBILPAY_PUBLIC_CERT": "%kernel.project_dir%/%CONFIG_DIR%/netopia_mobilpay/public.cer", From dafa2013dfe42cd81aeff1c387ae740fe9b586b4 Mon Sep 17 00:00:00 2001 From: Daniel STANCU Date: Mon, 13 Aug 2018 16:38:07 +0300 Subject: [PATCH 10/12] Added SMS payment details --- .../1.0/config/packages/netopia_mobilpay.yaml | 2 +- birkof/netopia-mobilpay-bundle/1.0/manifest.json | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/birkof/netopia-mobilpay-bundle/1.0/config/packages/netopia_mobilpay.yaml b/birkof/netopia-mobilpay-bundle/1.0/config/packages/netopia_mobilpay.yaml index 12525826..2ef246b8 100644 --- a/birkof/netopia-mobilpay-bundle/1.0/config/packages/netopia_mobilpay.yaml +++ b/birkof/netopia-mobilpay-bundle/1.0/config/packages/netopia_mobilpay.yaml @@ -3,4 +3,4 @@ netopia_mobilpay: public_cert: '%env(NETOPIA_MOBILPAY_PUBLIC_CERT)%' private_key: '%env(NETOPIA_MOBILPAY_PRIVATE_KEY)%' signature: '%env(NETOPIA_MOBILPAY_SIGNATURE)%' - sms_service: '%env(NETOPIA_MOBILPAY_SMS_SERVICE)%' + diff --git a/birkof/netopia-mobilpay-bundle/1.0/manifest.json b/birkof/netopia-mobilpay-bundle/1.0/manifest.json index cfc1d39c..aac9eeb2 100644 --- a/birkof/netopia-mobilpay-bundle/1.0/manifest.json +++ b/birkof/netopia-mobilpay-bundle/1.0/manifest.json @@ -5,12 +5,16 @@ "copy-from-recipe": { "config/": "%CONFIG_DIR%/" }, + "gitignore": [ + "/%CONFIG_DIR%/netopia_mobilpay/*.key", + "/%CONFIG_DIR%/netopia_mobilpay/*.cer", + "/%CONFIG_DIR%/netopia_mobilpay/*.json" + ], "env": { "NETOPIA_MOBILPAY_PAYMENT_URL": "http://sandboxsecure.mobilpay.ro", "NETOPIA_MOBILPAY_PUBLIC_CERT": "%kernel.project_dir%/%CONFIG_DIR%/netopia_mobilpay/public.cer", "NETOPIA_MOBILPAY_PRIVATE_KEY": "%kernel.project_dir%/%CONFIG_DIR%/netopia_mobilpay/private.key", - "NETOPIA_MOBILPAY_SIGNATURE": "XXXX-XXXX-XXXX-XXXX-XXXX", - "NETOPIA_MOBILPAY_SMS_SERVICE": "000000-000000-000000" + "NETOPIA_MOBILPAY_SIGNATURE": "XXXX-XXXX-XXXX-XXXX-XXXX" } } From 883d32bd0bf5ede40aaf54028a77d279d86dddee Mon Sep 17 00:00:00 2001 From: Daniel STANCU Date: Mon, 13 Aug 2018 20:01:46 +0300 Subject: [PATCH 11/12] Added empty routes --- .../1.0/config/routes/netopia_mobilpay.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/birkof/netopia-mobilpay-bundle/1.0/config/routes/netopia_mobilpay.yaml b/birkof/netopia-mobilpay-bundle/1.0/config/routes/netopia_mobilpay.yaml index 83daa3cd..ca2b78be 100644 --- a/birkof/netopia-mobilpay-bundle/1.0/config/routes/netopia_mobilpay.yaml +++ b/birkof/netopia-mobilpay-bundle/1.0/config/routes/netopia_mobilpay.yaml @@ -1,9 +1,16 @@ netopia_mobilpay_return_url: - controller: "@NetopiaMobilPayBundle/Controller/NetopiaMobilpayController.php::returnUrlAction" path: /netopia-mobilpay/thank-you methods: GET + defaults: + _controller: FrameworkBundle:Redirect:redirect + route: default + permanent: true netopia_mobilpay_confirm_url: - controller: "@NetopiaMobilPayBundle/Controller/NetopiaMobilpayController.php::confirmUrlAction" path: /netopia-mobilpay/confirm methods: POST + defaults: + _controller: FrameworkBundle:Redirect:redirect + route: default + permanent: true + From 7d5e94e02eed6fed0f88283c6dff8bab3348a534 Mon Sep 17 00:00:00 2001 From: Daniel STANCU Date: Mon, 13 Aug 2018 21:18:23 +0300 Subject: [PATCH 12/12] Empty .gitignore file to make sure folder is created --- .../1.0/config/netopia_mobilpay/.gitignore | 5 ----- 1 file changed, 5 deletions(-) diff --git a/birkof/netopia-mobilpay-bundle/1.0/config/netopia_mobilpay/.gitignore b/birkof/netopia-mobilpay-bundle/1.0/config/netopia_mobilpay/.gitignore index e43b10ba..e69de29b 100644 --- a/birkof/netopia-mobilpay-bundle/1.0/config/netopia_mobilpay/.gitignore +++ b/birkof/netopia-mobilpay-bundle/1.0/config/netopia_mobilpay/.gitignore @@ -1,5 +0,0 @@ -# Exclude SSL files from pushing -* - -# But not these files... -!.gitignore