sergiomuro/correoargentino-epago

阿根廷邮政 epago 平台 SDK

dev-main / 2.x-dev 2021-11-24 12:21 UTC

This package is not auto-updated.

Last update: 2024-09-26 01:55:48 UTC


README

用于阿根廷邮政 epago 平台的查询和管理 SDK

安装

composer require sergiomuro/correoargentino-epago

发起请求

use CorreoArgentinoEpago\CorreoArgentinoEpago;

$epago = new CorreoArgentinoEpago('my_email@example.com', 'myPassword');

用法

获取所有类别

print_r($epago->rubros());

获取我的包信息

print_r($epago->me());

用国际跟踪号通知国际购买

print_r($epago->inform('AB123456789CD', 'John', 'Doe'));

跟踪我的信息包

print_r($epago->track('AB123456789CD'));

设置 AFIP 声明

// Construct declaration
$d = (new Declaration())
    ->setPartId('AB123456789CD')
    ->setShippingCost(12.3)
    ->setAuthorizeCoraza(true);

// Adding products to declaration
for ($i = 0; $i < rand(1, 5); $i++) {
    $dp = (new DeclarationProduct())
        ->setDescription("Test test")
        ->setCategory(10010000)
        ->setSubcategory(10010001)
        ->setQty(rand(1, 3))
        ->setUnitPrice(20 / rand(1, 10));

    $d->addProduct($dp);
}
// Declare
print_r($epago->declaration($d));

查看项目 跟踪与追踪

自行承担风险使用。
鉴于这是一个政府和私人服务。
该项目是个人使用...