conta365/conta365-api 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

conta365/conta365-api

最新稳定版本:v0.0.3

Composer 安装命令:

composer require conta365/conta365-api

包简介

Conta365.ro is a platform for managing invoices, handling eInvoices with RO eFactura and other business related activities.

README 文档

README

Conta365.ro - Aplicatie de facturare integrat RO eFactura

Conta365 PHP API

Conta365 PHP API is a library intended to connect your e-commerce solution with the online invoicing platform, Conta365.ro

Installation

Use the composer package manager.

composer require conta365/conta365-api

Usage

Authentication

$api = new Conta365Api(new Config(
    accessToken: 'ey....',
    baseUri: 'https://api.conta365.ro' // optional, can be changed for development
));

Listing Invoices

$invoicesList = $api->getInvoiceClient()->list();

Create Invoice

$newModel = Invoice::from([
    'type' => Invoice::TYPE_COMMERCIAL_INVOICE,
    'invoice_serial_id' => $invoiceSerial->id,
    'number' => $invoiceSerial->next_number,
    'issue_date' => new \DateTime(),
    'due_date' => (new DateTime())->modify('+15 days'),
    'currency' => 'RON',
    'seller_name' => 'ACME SRL',
    'seller_vat_number' => 12345678,
    'seller_subject_to_vat' => false,
    'seller_vat_at_payment' => false,
    'seller_trade_registry_number' => 'F26/0000/2000',
    'seller_county' => 'MS',
    'seller_city' => 'Targu Mures',
    'seller_address' => 'Brasovului 5',
    'seller_postal_code' => 540450,
    'seller_contact_name' => 'Ion Popescu',
    'seller_contact_email' => 'email@domain.com',
    'seller_contact_phone' => '0734988988',
    'buyer_name' => 'Client',
    'buyer_vat_number' => '0000000000000',
    'buyer_trade_registry_number' => '-',
    'buyer_country' => 'RO',
    'buyer_county' => 'MS',
    'buyer_city' => 'Targu Mures',
    'buyer_address' => 'Sarguintei 8',
    'amount' => 40.0,
    'effective_amount' => 40.0,
    'effective_vat_amount' => 0,
    'effective_amount_with_vat' => 40.0,
    'data' => [
        'seller_trading_name' => 'ACME Trading Company'
    ],
    'items' => [[
        'name' => 'Abonament',
        'unit_code' => 'BUC',
        'quantity' => 1.0,
        'vat_rate' => 0,
        'vat_category' => 'O',
        'vat_exemption_reason' => 'VATEX-EU-O',
        'unit_price' => 40.0,
        'amount' => 40.0,
        'discount_type' => InvoiceItem::DISCOUNT_TYPE_NONE,
        'discount_value' => 0,
        'discount_amount' => 0,
        'effective_amount' => 40.0,
    ]]
]);
$createdModel = $api->getInvoiceClient()
    ->create($newModel);
dump($createdModel);

Other examples

See `examples` folder for more examples.

Development account

We have provisioned a development environment, intended to be used for develoment purposes. This includes all the functionalities of the production environment, including integration with the Test environment of RO eFactura and RO eTransport.

Contact us for development environment URL and credentials: www.conta365.ro/contact

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

统计信息

  • 总下载量: 6
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-02-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固