Download the PHP package sejongtf/laravel-fsc without Composer

On this page you can find all versions of the php package sejongtf/laravel-fsc. 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-fsc

laravel-fsc

Packagist Version Tests PHP Version Laravel Version Total Downloads

금융위원회(FSC) 공공데이터 OpenAPI를 Laravel에서 쉽게 호출하기 위한 패키지입니다. data.go.kr 기관코드 1160100(금융위원회)의 API들을 공통 클라이언트로 묶어 제공합니다.

현재 상태: 공통 토대(설정 · HTTP 클라이언트 · 응답 파서 · 예외 · 엔드포인트 추상 베이스)와 테스트 골격이 구성되어 있습니다. 구현된 API는 아래 표를 참고하세요. 나머지는 이 패턴을 따라 추가됩니다.

API 서비스 메서드
기업기본정보 GetCorpBasicInfoService_V2 Fsc::corp()->getCorpOutline(...)
개인사업자기본정보 GetSBProfileInfoService Fsc::proprietor()->getOutline(...) / getClosureStatus(...)
금융회사기본정보 GetFnCoBasiInfoService Fsc::financialCompany()->getFnCoOutline(...)

요구사항

설치

설정 파일을 publish합니다:

설정

data.go.kr에서 발급받은 금융위원회 OpenAPI 디코딩(Decoding) 일반 인증키.env에 설정합니다. 패키지가 요청 시 자동으로 URL 인코딩하므로, 이미 인코딩된 키를 넣으면 이중 인코딩될 수 있습니다.

사용법 (저수준 호출)

현재는 임의의 금융위원회 API를 직접 호출할 수 있습니다. 공통 파라미터 (serviceKey, resultType, numOfRows, pageNo)는 자동으로 주입됩니다.

의존성 주입으로 클라이언트를 직접 받을 수도 있습니다:

응답 캐싱

동일한 요청의 반복 호출을 줄이기 위해 성공 응답을 Laravel 캐시에 저장할 수 있습니다. 기본은 비활성(opt-in)이며, .env 또는 config/fsc.php 에서 켭니다.

동작 방식:

기업기본정보 (GetCorpBasicInfoService_V2)

법인등록번호(crno) 또는 법인명(corpNm)으로 기업개요를 조회합니다. 데이터 명세

어떤 Response 든 mapInto() 로 임의의 DTO 에 매핑할 수 있습니다:

개인사업자기본정보 (GetSBProfileInfoService)

개인사업자의 개요정보(지역·업종·설립년도·대표자 연령대/성별·종업원수)와 휴폐업정보를 집계 단위로 제공합니다 (사업자등록번호 등 개별 식별자는 없음). 데이터 명세

금융회사기본정보 (GetFnCoBasiInfoService)

법인등록번호(crno) 또는 금융회사명(fncoNm)으로 금융회사기업개요(주소·설립일·종업원수·상장정보 등)를 조회합니다. 데이터 명세

예외

예외 발생 조건
Sejongtf\Fsc\Exceptions\ConfigurationException service_key 누락 등 설정 오류
Sejongtf\Fsc\Exceptions\FscApiException API가 resultCode != "00" 반환 (getResultCode(), getResultMsg() 제공)
Sejongtf\Fsc\Exceptions\FscException 위 둘의 베이스

새 금융위원회 API 추가하기

AbstractEndpoint를 상속해 servicePath / operation을 정의하고, 도메인 메서드를 추가합니다.

그리고 Sejongtf\Fsc\Fsc에 팩토리 메서드를 노출합니다:

사용:

테스트

테스트는 Http::fake() 기반으로 동작하므로 실제 data.go.kr 호출 없이 검증됩니다.

License

MIT © 세종티에프


All versions of laravel-fsc with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/support Version ^12.0|^13.0
illuminate/http Version ^12.0|^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-fsc contains the following files

Loading the files please wait ...