Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PLUG-104: Add instructions for testing webhooks locally and update do… #14

Merged
merged 1 commit into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,13 @@ You can login as an admin user at http://localhost:1234/admin using the followin

| Username | Password |
| -------- | -------- |
| exampleuser | examplepassword123 |
| exampleuser | examplepassword123 |

# Testing webhooks
Webhook signature includes the path so make sure the webhook URL is configured in your Console and the path is set to rest/V1/webhook/transfer.
The domain does not matter, as we will be using `truelayer-cli` to forward webhooks.

Run the following to forward webhooks to your local instance:
```
docker run --network="host" truelayer/truelayer-cli route-webhooks --to-addr http://localhost:1234/rest/V1/webhook/transfer --client-secret <client_secret> --client-id <client_id>
```
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.9"

services:
web:
image: michielgerritsen/magento-project-community-edition:php81-fpm-magento2.4.4
image: michielgerritsen/magento-project-community-edition:php81-fpm-magento2.4.6
ports:
- 1234:80
- 3307:3306
Expand All @@ -12,6 +12,6 @@ services:
- DOCKER_BUILDKIT=1
- COMPOSE_DOCKER_CLI_BUILD=1
- DOCKER_DEFAULT_PLATFORM=linux/amd64
- CUSTOM_ENTRYPOINT_COMMAND=php bin/magento module:disable Magento_TwoFactorAuth && composer require truelayer/magento2 --no-plugins --with-all-dependencies && php bin/magento module:enable TrueLayer_Connect && php bin/magento setup:upgrade && php bin/magento setup:di:compile
- CUSTOM_ENTRYPOINT_COMMAND=php bin/magento module:disable {Magento_AdminAdobeImsTwoFactorAuth,Magento_TwoFactorAuth} && composer require truelayer/magento2 --no-plugins --with-all-dependencies && php bin/magento module:enable TrueLayer_Connect && php bin/magento setup:upgrade && php bin/magento setup:di:compile && php bin/magento config:set admin/security/password_lifetime 0 && php bin/magento config:set admin/security/password_is_forced 0 && php bin/magento cache:clean
volumes:
- ./:/data/extensions/tl-magento2
Loading