Download the PHP package tourze/wechat-mini-program-delivery-return-bundle without Composer
On this page you can find all versions of the php package tourze/wechat-mini-program-delivery-return-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tourze/wechat-mini-program-delivery-return-bundle
More information about tourze/wechat-mini-program-delivery-return-bundle
Files in tourze/wechat-mini-program-delivery-return-bundle
Package wechat-mini-program-delivery-return-bundle
Short Description A Symfony bundle for managing WeChat Mini Program delivery return orders
License MIT
Informations about the package wechat-mini-program-delivery-return-bundle
wechat-mini-program-delivery-return-bundle
中文
A Symfony bundle for managing WeChat Mini Program delivery return orders. This bundle provides entities, services, and console commands for handling return orders within WeChat Mini Program ecosystem.
Table of Contents
- Features
- Installation
- Dependencies
- Quick Start
- 1. Enable the Bundle
- 2. Configure Database
- 3. Configure Services
- 4. Basic Usage
- Core Components
- Entities
- Services
- Commands
- Event Subscribers
- Repositories
- Enums
- Request Objects
- Configuration
- Advanced Usage
- Return Order Management
- Event Handling
- Custom Extensions
- Console Commands
- API Reference
- Testing
- Contributing
- Security
- Changelog
- License
Features
- Entity Management: Complete entity structure for delivery return orders
- Service Layer: Service for synchronizing return order status with WeChat API
- Console Commands: Commands for manual and automated return order synchronization
- Event Handling: Event subscribers for return order processing
- Repository Pattern: Custom repository for efficient data access
- Enum Support: Type-safe enums for return order statuses
- API Integration: Request/response objects for WeChat API communication
Installation
Dependencies
This bundle requires:
- PHP 8.1 or higher
- Symfony 6.4 or higher
- Doctrine ORM
- WeChat Mini Program Bundle
Quick Start
1. Enable the Bundle
Add the bundle to your config/bundles.php:
2. Create a Return Order
3. Sync Return Order Status
Console Commands
Sync Single Return Order
Synchronize a single return order by shop order ID:
Parameters:
shopOrderId: The shop order ID to synchronize
Sync Valid Return Orders
Automatically synchronize all valid return orders (runs every 15 minutes via cron):
This command:
- Finds all non-cancelled return orders created within the last 15 days
(configurable via
WECHAT_DELIVERY_RETURN_SYNC_RETURN_ORDER_DAY_NUMenvironment variable) - Dispatches asynchronous sync commands for each order
- Runs automatically every 15 minutes via cron job
Advanced Usage
Event Handling
The bundle provides event subscribers for custom processing:
Custom Repository Methods
Access custom repository methods for advanced queries:
Configuration
Environment Variables
Configure the following environment variables:
Services
The bundle registers the following services:
DeliveryReturnService: Main service for return order operationsDeliveryReturnOrderRepository: Repository for return order data access- Console commands for manual and automated synchronization
API Integration
The bundle provides request/response objects for WeChat API integration:
Request Objects
AddRequest: For creating new return ordersQueryStatusRequest: For querying return order statusUnbindRequest: For unbinding return ordersAddressObject: For handling address information
Response Handling
The service automatically handles API responses and updates local entities with:
- Return order status
- Waybill ID
- Delivery company information
- Order status updates
Database Schema
The bundle creates the following database table:
Status Enums
DeliveryReturnStatus
- Represents the return order status from WeChat API
DeliveryReturnOrderStatus
- Represents the logistics order status
Cancelled: Order has been cancelled
Contributing
Please see CONTRIBUTING.md for details.
License
The MIT License (MIT). Please see License File for more information.
All versions of wechat-mini-program-delivery-return-bundle with dependencies
doctrine/doctrine-bundle Version ^2.13
doctrine/orm Version ^3.0
doctrine/persistence Version ^4.1
easycorp/easyadmin-bundle Version ^4
knplabs/knp-menu Version ^3.7
monolog/monolog Version ^3.1
nesbot/carbon Version ^2.72 || ^3
psr/log Version ^3|^2|^1
symfony/config Version ^7.3
symfony/console Version ^7.3
symfony/dependency-injection Version ^7.3
symfony/doctrine-bridge Version ^7.3
symfony/framework-bundle Version ^7.3
symfony/http-kernel Version ^7.3
symfony/messenger Version ^7.3
symfony/property-access Version ^7.3
symfony/yaml Version ^7.3
tourze/arrayable Version 1.*
tourze/async-command-bundle Version 1.0.*
tourze/bundle-dependency Version 1.*
tourze/doctrine-snowflake-bundle Version 1.1.*
tourze/doctrine-timestamp-bundle Version 1.1.*
tourze/easy-admin-enum-field-bundle Version 1.0.*
tourze/easy-admin-menu-bundle Version 1.0.*
tourze/enum-extra Version 1.0.*
tourze/http-client-bundle Version 1.1.*
tourze/json-rpc-core Version 1.0.*
tourze/symfony-aop-async-bundle Version 1.0.*
tourze/symfony-cron-job-bundle Version 1.1.*
tourze/symfony-dependency-service-loader Version 1.0.*
tourze/symfony-lock-command-bundle Version 1.0.*
tourze/wechat-mini-program-auth-bundle Version 1.0.*
tourze/wechat-mini-program-bundle Version 1.0.*
tourze/wechat-mini-program-user-contracts Version 1.0.*