diff --git a/jpmmartin/sylius-nmi-plugin/1.0/config/packages/jpm_martin_sylius_nmi.yaml b/jpmmartin/sylius-nmi-plugin/1.0/config/packages/jpm_martin_sylius_nmi.yaml new file mode 100644 index 00000000..886b4275 --- /dev/null +++ b/jpmmartin/sylius-nmi-plugin/1.0/config/packages/jpm_martin_sylius_nmi.yaml @@ -0,0 +1,2 @@ +imports: + - { resource: "@JpmMartinSyliusNmiPlugin/config/config.yaml" } diff --git a/jpmmartin/sylius-nmi-plugin/1.0/config/routes/jpm_martin_sylius_nmi.yaml b/jpmmartin/sylius-nmi-plugin/1.0/config/routes/jpm_martin_sylius_nmi.yaml new file mode 100644 index 00000000..5a2f02a4 --- /dev/null +++ b/jpmmartin/sylius-nmi-plugin/1.0/config/routes/jpm_martin_sylius_nmi.yaml @@ -0,0 +1,18 @@ +jpm_martin_sylius_nmi_shop: + resource: "@JpmMartinSyliusNmiPlugin/config/routes/shop.yaml" + +jpm_martin_sylius_nmi_admin: + resource: "@JpmMartinSyliusNmiPlugin/config/routes/admin.yaml" + prefix: /%sylius_admin.path_name% + +# Required if you want NMI to tell your store what it did. Without it there is no endpoint and +# nothing arrives. No prefix: not the locale, not the admin path. See the README's "Webhooks". +jpm_martin_sylius_nmi_webhook: + resource: "@JpmMartinSyliusNmiPlugin/config/routes/webhook.yaml" + +# Required if you turn saved cards on, and harmless if you do not. See the README's "Saved cards". +jpm_martin_sylius_nmi_shop_account: + resource: "@JpmMartinSyliusNmiPlugin/config/routes/shop_account.yaml" + prefix: /{_locale}/account + requirements: + _locale: ^[A-Za-z]{2,4}(_([A-Za-z]{4}|[0-9]{3}))?(_([A-Za-z]{2}|[0-9]{3}))?$ diff --git a/jpmmartin/sylius-nmi-plugin/1.0/manifest.json b/jpmmartin/sylius-nmi-plugin/1.0/manifest.json new file mode 100644 index 00000000..59c12aa2 --- /dev/null +++ b/jpmmartin/sylius-nmi-plugin/1.0/manifest.json @@ -0,0 +1,20 @@ +{ + "bundles": { + "JpmMartin\\SyliusNmiPlugin\\JpmMartinSyliusNmiPlugin": ["all"] + }, + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/" + }, + "add-lines": [ + { + "file": "assets/shop/entrypoint.js", + "content": "import '@vendor/jpmmartin/sylius-nmi-plugin/assets/shop/entrypoint';", + "position": "bottom", + "warn_if_missing": true + } + ], + "gitignore": [ + "/config/encryption/*.key", + "!/config/encryption/test.key" + ] +} diff --git a/jpmmartin/sylius-nmi-plugin/1.0/post-install.txt b/jpmmartin/sylius-nmi-plugin/1.0/post-install.txt new file mode 100644 index 00000000..20da3529 --- /dev/null +++ b/jpmmartin/sylius-nmi-plugin/1.0/post-install.txt @@ -0,0 +1,14 @@ + * Four things no recipe can do, in this order: + + yarn add @nmipayments/nmi-pay && yarn build the browser component and the shop build + bin/console doctrine:migrations:migrate the plugin's four tables + + * A key of your own, before the first payment method is saved. The skeleton's test.key is + published; point the store at a new path first, then generate — the generator writes + wherever the store points at that moment: + + .env.local: SYLIUS_PAYMENT_ENCRYPTION_KEY_PATH=%kernel.project_dir%/config/encryption/payment.key + bin/console sylius:payment:generate-key + + * Then Configuration → Payment methods → Create → NMI, and read Testing against the sandbox + before the first payment: https://github.com/jpmmartin/SyliusNmiPlugin#readme