Download the PHP package tourze/wechat-mini-program-insurance-freight-bundle without Composer
On this page you can find all versions of the php package tourze/wechat-mini-program-insurance-freight-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tourze/wechat-mini-program-insurance-freight-bundle
More information about tourze/wechat-mini-program-insurance-freight-bundle
Files in tourze/wechat-mini-program-insurance-freight-bundle
Package wechat-mini-program-insurance-freight-bundle
Short Description 微信小程序运费险模块,提供运费险投保、理赔、查询等功能
License MIT
Informations about the package wechat-mini-program-insurance-freight-bundle
WeChat Mini Program Insurance Freight Bundle
中文
A comprehensive Symfony bundle that integrates WeChat Mini Program freight insurance functionality, providing seamless order management, return processing, and automated data synchronization with WeChat APIs.
Table of Contents
- Features
- Requirements
- Installation
- Quick Start
- Console Commands
- Architecture
- Advanced Usage
- Configuration
- Testing
- Security
- Contributing
- Changelog
- License
Features
- Insurance Order Management: Complete lifecycle management of freight insurance orders
- Return Order Processing: Automated handling of return orders with status tracking
- Data Synchronization: Real-time synchronization with WeChat APIs
- Summary Statistics: Comprehensive reporting and analytics
- Command-Line Tools: Automated tasks and manual operations via console commands
- Admin Interface: EasyAdmin-powered administrative controllers for data management
- Event-Driven Architecture: Flexible event subscribers for custom business logic
- Repository Pattern: Clean data access layer with custom repositories
Requirements
- PHP 8.1 or higher
- Symfony 6.4 or higher
- Doctrine ORM 3.0 or higher
- WeChat Mini Program Bundle ecosystem
Installation
Bundle Registration
Add the bundle to your config/bundles.php:
Quick Start
Basic Usage
Entity Usage
Console Commands
This bundle provides several console commands for managing freight insurance:
Data Synchronization Commands
wechat-insurance:get-summary
Fetches summary data from WeChat API.
- Schedule: Runs every 6 hours (30 /6 )
- Description: Pulls summary interface data for the last 3 days
wechat-insurance:sync-insurance-order-list
Synchronizes insurance orders to local database.
- Schedule: Runs every 15 minutes (/15 *)
- Description: Fetches insurance order information from WeChat API and stores locally
wechat-insurance:sync-valid-return-orders
Synchronizes all valid return orders to local database.
- Schedule: Runs every 15 minutes (/15 *)
- Description: Synchronizes valid return order information to local storage
Manual Operation Commands
wechat-insurance:query-open
Queries the opening status of freight insurance.
- Usage:
php bin/console wechat-insurance:query-open - Description: Checks the opening status for all valid accounts
wechat-insurance:sync-single-return-order
Synchronizes a single return order to local database.
- Usage:
php bin/console wechat-insurance:sync-single-return-order <shopOrderId> - Arguments:
shopOrderId: Internal return order ID used by the merchant system
- Description: Synchronizes individual return order information to local storage
wechat-insurance:unbind-return-order
Unbinds a single return order.
- Usage:
php bin/console wechat-insurance:unbind-return-order <shopOrderId> - Arguments:
shopOrderId: Internal return order ID used by the merchant system
- Description: Unbinds individual return order information
Architecture
Entities
- InsuranceOrder: Core entity managing insurance order data with lifecycle tracking
- ReturnOrder: Manages return order information and status updates
- Summary: Stores aggregated statistics and reporting data
Services
- InsuranceFreightService: Main service class handling all freight insurance operations
- Order creation and management
- Return order processing
- Data synchronization with WeChat APIs
Event Subscribers
- InsuranceOrderListener: Handles pre-persist events for insurance orders
- ProcessingEventSubscriber: Manages order processing events
Repositories
- InsuranceOrderRepository: Provides data access methods for insurance orders
- ReturnOrderRepository: Handles return order data operations
- SummaryRepository: Manages summary and statistics data
Advanced Usage
Custom Event Subscribers
Repository Usage
Configuration
Environment Variables
Bundle Configuration
Create config/packages/wechat_mini_program_insurance_freight.yaml:
Testing
Run the test suite:
Security
Reporting Security Vulnerabilities
If you discover a security vulnerability, please send an email to [email protected]. All security vulnerabilities will be promptly addressed.
Security Best Practices
- Always validate input data before processing
- Use HTTPS for all API communications
- Implement proper rate limiting
- Regularly update dependencies
- Monitor for unusual activity patterns
Contributing
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests.
Development Setup
Changelog
All notable changes to this project will be documented in CHANGELOG.md.
License
This project is licensed under the MIT License - see the LICENSE file for details.
All versions of wechat-mini-program-insurance-freight-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/event-dispatcher 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-indexed-bundle Version 1.0.*
tourze/doctrine-resolve-target-entity-bundle Version 1.*
tourze/doctrine-snowflake-bundle Version 1.1.*
tourze/doctrine-timestamp-bundle Version 1.1.*
tourze/easy-admin-menu-bundle Version 1.0.*
tourze/enum-extra Version 1.0.*
tourze/json-rpc-core 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-server-message-bundle Version 0.1.*
tourze/wechat-mini-program-user-contracts Version 1.0.*
yiisoft/arrays Version ^3
yiisoft/json Version ^1.0