fixstacks / module-zero-adyen
Zero for Magento Open Source: payment on Adyen's hosted page for Zero Checkout: cards, wallets and every local method switched on in the Adyen account; HMAC-signed webhooks.
Package info
github.com/Fixstacks/module-zero-adyen
Type:magento2-module
pkg:composer/fixstacks/module-zero-adyen
Requires
- php: ~8.2.0||~8.3.0||~8.4.0
- fixstacks/module-zero-checkout: ^1.3
- magento/framework: 103.0.*
- magento/module-config: *
- magento/module-directory: *
- magento/module-payment: *
- magento/module-quote: *
- magento/module-sales: *
- magento/module-store: *
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Payment on Adyen's hosted page for Zero Checkout: a payment link for the order; the customer pays with a card, a wallet or a local method switched on in the Adyen account. No libraries: Adyen's Checkout API v71 over Magento's HTTP client.
Install
Requires Magento Open Source 2.4.7–2.4.9 and PHP 8.2–8.4 with the GD extension built with WebP (php -r 'var_dump(function_exists("imagewebp"));' says true; Magento's own PHP requirements cover the rest). Without WebP in GD, Zero skips its WebP image copies and serves the originals.
composer require fixstacks/module-zero-adyen bin/magento setup:upgrade bin/magento setup:di:compile # production mode bin/magento setup:static-content:deploy # production mode bin/magento cache:flush
Composer installs fixstacks/module-zero-checkout with it.
Part of fixstacks/zero, which installs the Zero theme and every Zero module at once.
How a payment goes
- Placing the order creates a single-use payment link for the order's grand total in the order's currency (minor units by currency), valid for an hour. The order waits in pending payment; Zero Checkout sends the customer to the link.
- Adyen's webhook (
zero_adyen/payment/webhook, set up in the Customer Area as a Standard webhook with an HMAC key): each item's HMAC signature is checked. A successful AUTHORISATION for the order's amount and currency marks it paid and keeps the pspReference. A failed attempt changes nothing (the customer may try again on the same link). - Back from Adyen (
zero_adyen/payment/return): the link's status is asked from Adyen: completed (paid), paymentPending, expired (cancelled), active (nobody paid: the link is expired, the order cancelled, the cart restored).
The account should capture automatically (Adyen's default): an authorised payment counts as paid. Refunds: credit memos refund online by the pspReference the webhook brought.
Settings
Stores > Configuration > Sales > Payment Methods > Adyen (Zero): Enabled, Title, Merchant Account, API Key (encrypted; an API credential with the Checkout API), Webhook HMAC Key (encrypted), Test Mode (on by default), Live URL Prefix (live only), countries, sort order.
Tests
Test/Unit/Model/NotificationTest.php: the webhook's HMAC signature, minor
units.
License
OSL-3.0 or AFL-3.0, your choice: see NOTICE.md.
Zero is made by Fixstacks in partnership with Vilmate, a software development company. Documentation: https://fixstacks.com/zero/docs. Demo store: https://zero.fixstacks.com.