yadivyanshu/magento2-order-webhook
最新稳定版本:v0.1.1
Composer 安装命令:
composer require yadivyanshu/magento2-order-webhook
包简介
Magento 2 module that sends order events to a configurable webhook endpoint. Test package for Packagist deployment pipeline.
README 文档
README
A Magento 2 module that sends order events to a configurable HTTPS webhook endpoint with Bearer token authentication. Useful for piping order data into external automation platforms (WhatsApp, Slack, email, CRM, etc.).
Status: Test package for Packagist deployment pipeline validation. Not intended for production use yet.
Features
- Fires on
sales_order_place_after(order created) - Payload includes order, customer, items, billing/shipping addresses
- Admin config UI (Stores → Configuration → Yadivyanshu → Order Webhook)
- API key stored encrypted in Magento config
- Handshake verification on save — visual "Connected / Failed / Not Connected" status
- Never blocks checkout on webhook failure (errors are logged, not thrown)
Requirements
- Magento 2.4.4+
- PHP 8.1+
Installation
composer require yadivyanshu/magento2-order-webhook bin/magento module:enable Yadivyanshu_OrderWebhook bin/magento setup:upgrade bin/magento cache:flush
Configuration
- Log in to Magento admin
- Go to Stores → Configuration → Yadivyanshu → Order Webhook
- Fill in:
- Enable Module: Yes
- API Base URL: your webhook platform base URL (no trailing slash)
- API Key: the bearer token your platform expects
- Click Save Config
- Confirm the status badge turns green (Connected ✓)
API Contract
The module expects your backend to expose two endpoints:
POST {base_url}/public/magento/verify-store
Called on admin config save. Request:
{
"platform": "magento",
"store_url": "https://example.com/",
"store_code": "default",
"store_name": "Main Website Store",
"store_id": 1
}
Return 2xx to mark the connection as verified.
POST {base_url}/public/magento/webhooks/order
Called on every order placed. Includes full order payload. Return 2xx to acknowledge.
Both endpoints receive Authorization: Bearer <api_key> header.
License
MIT
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-04-11