定制 yadivyanshu/magento2-order-webhook 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

  1. Log in to Magento admin
  2. Go to Stores → Configuration → Yadivyanshu → Order Webhook
  3. Fill in:
    • Enable Module: Yes
    • API Base URL: your webhook platform base URL (no trailing slash)
    • API Key: the bearer token your platform expects
  4. Click Save Config
  5. 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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固