Download the PHP package sejongtf/laravel-unipass without Composer

On this page you can find all versions of the php package sejongtf/laravel-unipass. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-unipass

sejongtf/laravel-unipass

관세청 UNI-PASS 공개 API 연계 패키지. 현재 지원 서비스:

서비스 API 용도
cargoClearance() API001 화물통관 진행정보 수입 통관 진행상태·이력
exportFulfillment() API002 수출신고번호별 수출이행 내역 수출 이행·잔량
seaArrivalReport() API021 입항보고내역(해상) 해상 입항 정보
containers() API020 컨테이너내역 컨테이너번호·규격·봉인번호

💡 수입 화물은 API001, 수출 화물은 API002 로 추적한다(서로 다른 서비스).

설치 / 설정

UNI-PASS Open API 는 서비스(API)마다 별도 인증키(crkyCn) 가 발급된다. 사용하는 서비스의 키만 .env 에 넣으면 된다.

설정 파일 퍼블리시(선택): php artisan vendor:publish --tag=unipass-config

⚠️ 관세청 정책상 IP 가 아닌 도메인명으로만 호출 가능하며 TLS 1.2 이상이 필요하다. 인증키는 UNI-PASS 포털 My메뉴 > 서비스관리 > OpenAPI 사용관리 에서 API 별로 신청·발급한다. 화물통관진행정보는 입항 후 3년 이내 데이터만 조회 가능하다.

구조

SDK 형태의 계층 구조. 모든 API 가 전송 규격(인증·XML 봉투·tCnt=-1 오류)을 공유하므로 전송 계층을 1곳에 모으고, API 별 차이(경로·키·파라미터·VO)는 리소스/DTO 로 분리한다.

새 API 추가 = config/unipass.phpservices 한 줄 + Resource 1개 + DTO 1~2개. Contracts\Client 에만 의존하므로 테스트에서 페이크 클라이언트를 주입하기 쉽다.

사용법

isEmpty() 로 빈 결과를, isList()(API001)로 다건 목록을 판별한다. 매핑되지 않은 원본 필드는 field('xxx') 또는 ->raw 로 접근한다. 오류(존재하지 않는 인증키 등)는 Sejongtf\LaravelUnipass\Exceptions\UnipassException 으로 던져진다.

점검 커맨드

CLI 에서 바로 조회할 수 있는 unipass:track 커맨드를 제공한다(앱 연동 후 사용 가능).

결과는 표로 출력되며, 빈 결과는 안내 메시지, 인증/파라미터 오류는 0 이 아닌 종료코드로 끝난다.

캐시

통관 진행상태처럼 가변 데이터는 캐시하지 않는 게 기본(cache_ttl => 0). 선박회사·HS부호· 관세율 같은 마스터성 API 를 추가할 때는 해당 서비스의 cache_ttl 을 길게 주면 된다.

지원 예정 API

UNI-PASS 는 54종 API 를 제공한다(수입신고필증검증 API022, 선박회사 API026/027, 관세율 API030, HS부호 API018 등). 전송 규격이 동일하므로 config/unipass.phpservices 에 등록하고 Resource/DTO 만 추가하면 된다.


All versions of laravel-unipass with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
ext-json Version *
ext-simplexml Version *
illuminate/support Version ^13.0
illuminate/http Version ^13.0
illuminate/console Version ^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sejongtf/laravel-unipass contains the following files

Loading the files please wait ...