zulfadliresources/myinvois
最新稳定版本:v1.0.0
Composer 安装命令:
composer require zulfadliresources/myinvois
包简介
A comprehensive PHP SDK for integrating with Malaysia's LHDN (Lembaga Hasil Dalam Negeri) MyInvois e-invoicing system. This SDK simplifies the process of submitting, validating, and managing electronic invoices in compliance with Malaysian tax regulations.
README 文档
README
A comprehensive PHP SDK for integrating with Malaysia's LHDN (Lembaga Hasil Dalam Negeri) MyInvois e-invoicing system. This SDK simplifies the process of submitting, validating, and managing electronic invoices in compliance with Malaysian tax regulations.
Features
- Document Management: Create, submit, and retrieve e-invoices, credit notes, debit notes, and other UBL 2.1 compliant documents
- Validation: Built-in validation for document structure and data integrity
- API Integration: Seamless integration with MyInvois API endpoints for production and sandbox environments
- Taxpayer Services: Query taxpayer information and manage registrations
- Notification Handling: Process and respond to system notifications
- Identity Services: Handle authentication and authorization
- XML/JSON Serialization: Automatic conversion between PHP objects and UBL XML/JSON formats
- Error Handling: Comprehensive error handling with detailed messages
- Type Safety: Full PHP 8.3 support with strict typing
Requirements
- PHP >= 8.3
- Composer
- Valid MyInvois API credentials (Client ID, Client Secret, etc.)
Installation
Install via Composer:
composer require zulfadliresources/myinvois
Quick Start
use MyInvois\MyInvoisClient; $config = [ 'apiKey' => 'your-api-key', 'clientId' => 'your-client-id', 'clientSecret' => 'your-client-secret', 'production' => false, // Set to true for production ]; $client = new MyInvoisClient($config); // Create and submit an invoice $invoice = new Invoice(); // ... configure invoice ... $submission = $client->getDocumentSubmissionService()->submit($invoice);
Documentation
For detailed SDK documentation, including:
- Complete API reference
- Integration guides
- Code examples
- UBL specifications
- Troubleshooting
See docs/MyInvois_SDK_Summary.md.
Testing
Run the test suite with PHPUnit:
composer install vendor/bin/phpunit
Contributing
We welcome contributions! Please see our contributing guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
For major changes, please open an issue first to discuss the proposed changes.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
- Issues: Report bugs and request features via GitHub Issues
- Discussions: Join community discussions on GitHub Discussions
- LHDN MyInvois: Official documentation at MyInvois Portal
Disclaimer
This SDK is not officially affiliated with LHDN Malaysia. Use at your own risk and ensure compliance with current regulations.
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-12-16