@bootpay/backend-js
Advanced tools
+42
| # Bootpay server SDK example/test credentials | ||
| BOOTPAY_ENV=production | ||
| # PG 인증 방식: new (client_key/secret_key, default) 또는 legacy (application_id/private_key) | ||
| BOOTPAY_AUTH_MODE=new | ||
| # PG API - recommended client_key/secret_key | ||
| BOOTPAY_PG_CLIENT_KEY_PROD=OdKci2s0ux9iyFWsgYHdKw | ||
| BOOTPAY_PG_SECRET_KEY_PROD=L15AxIjXxGwFj9xe7NUUOt9VPHqP-CvyXJuK-FqMHto= | ||
| BOOTPAY_PG_CLIENT_KEY_DEV=K1Xok7RzFxbT7zMBmiBXNw | ||
| BOOTPAY_PG_SECRET_KEY_DEV=vcd_5OXoQAxTA8JSg2VGaSnwmQPkd8DgQ6xiyL6QkyE= | ||
| # PG API - legacy application_id/private_key (호환성 검증용) | ||
| BOOTPAY_PG_APPLICATION_ID_PROD=5b8f6a4d396fa665fdc2b5ea | ||
| BOOTPAY_PG_PRIVATE_KEY_PROD=rm6EYECr6aroQVG2ntW0A6LpWnkTgP4uQ3H18sDDUYw= | ||
| BOOTPAY_PG_APPLICATION_ID_DEV=59bfc738e13f337dbd6ca48a | ||
| BOOTPAY_PG_PRIVATE_KEY_DEV=pDc0NwlkEX3aSaHTp/PPL/i8vn5E/CqRChgyEp/gHD0= | ||
| # Commerce API | ||
| BOOTPAY_COMMERCE_CLIENT_KEY_PROD=JfF1ML0fWiXwnfpKRGvGOA | ||
| BOOTPAY_COMMERCE_SECRET_KEY_PROD=MrNdlu26zkKc1axKJM2rj3DyOwOGJJpMKB9RxIKf0Pg= | ||
| BOOTPAY_COMMERCE_CLIENT_KEY_DEV=ZYEi9d93uIaQFEuxXEZfyQ | ||
| BOOTPAY_COMMERCE_SECRET_KEY_DEV=j8ONDlZQVHgAWq52g97pGNCqxahGatyZKuC2O09r9MM= | ||
| # Commerce test fixtures — 실제 데이터 ID | ||
| BOOTPAY_TEST_COMMERCE_USER_ID= | ||
| BOOTPAY_TEST_COMMERCE_USER_GROUP_ID= | ||
| BOOTPAY_TEST_COMMERCE_PRODUCT_ID= | ||
| BOOTPAY_TEST_COMMERCE_CATEGORY_ID= | ||
| BOOTPAY_TEST_COMMERCE_COUPON_TEMPLATE_ID= | ||
| BOOTPAY_TEST_COMMERCE_INVOICE_ID= | ||
| BOOTPAY_TEST_COMMERCE_ORDER_ID= | ||
| BOOTPAY_TEST_COMMERCE_ORDER_NUMBER= | ||
| BOOTPAY_TEST_COMMERCE_ORDER_SUBSCRIPTION_ID= | ||
| BOOTPAY_TEST_COMMERCE_ORDER_SUBSCRIPTION_BILL_ID= | ||
| BOOTPAY_TEST_COMMERCE_ORDER_SUBSCRIPTION_ADJUSTMENT_ID= | ||
| BOOTPAY_TEST_COMMERCE_ORDER_CANCEL_REQUEST_HISTORY_ID= | ||
| BOOTPAY_TEST_COMMERCE_STAND_ID= | ||
| BOOTPAY_TEST_COMMERCE_KEYWORD=테스트 | ||
| BOOTPAY_TEST_COMMERCE_S_AT=2024-01-01 | ||
| BOOTPAY_TEST_COMMERCE_E_AT=2099-12-31 | ||
| BOOTPAY_TEST_COMMERCE_ROLE=user |
Sorry, the diff of this file is not supported yet
| {"ts":"2026-05-07T04:58:37Z","event":"UserPromptSubmit","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","candidate_count":0,"decision":"skip","reason":"missing_index"} | ||
| {"ts":"2026-05-07T05:02:05Z","event":"Stop","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","intents_checked":0,"decision":"clean","stop_count":0} | ||
| {"ts":"2026-05-07T05:03:35Z","event":"UserPromptSubmit","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","candidate_count":0,"decision":"skip","reason":"missing_index"} | ||
| {"ts":"2026-05-07T05:12:48Z","event":"Stop","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","intents_checked":0,"decision":"clean","stop_count":0} | ||
| {"ts":"2026-05-07T05:16:46Z","event":"UserPromptSubmit","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","candidate_count":0,"decision":"skip","reason":"missing_index"} | ||
| {"ts":"2026-05-07T05:17:41Z","event":"Stop","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","intents_checked":0,"decision":"clean","stop_count":0} | ||
| {"ts":"2026-05-07T05:20:18Z","event":"UserPromptSubmit","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","candidate_count":0,"decision":"skip","reason":"missing_index"} | ||
| {"ts":"2026-05-07T05:23:07Z","event":"Stop","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","intents_checked":0,"decision":"clean","stop_count":0} | ||
| {"ts":"2026-05-07T05:27:10Z","event":"UserPromptSubmit","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","candidate_count":0,"decision":"skip","reason":"missing_index"} | ||
| {"ts":"2026-05-07T05:30:10Z","event":"UserPromptSubmit","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","candidate_count":0,"decision":"skip","reason":"missing_index"} | ||
| {"ts":"2026-05-07T05:31:35Z","event":"Stop","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","intents_checked":0,"decision":"clean","stop_count":0} | ||
| {"ts":"2026-05-07T05:46:43Z","event":"UserPromptSubmit","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","candidate_count":0,"decision":"skip","reason":"missing_index"} | ||
| {"ts":"2026-05-07T05:47:22Z","event":"Stop","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","intents_checked":0,"decision":"clean","stop_count":0} | ||
| {"ts":"2026-05-07T05:53:02Z","event":"UserPromptSubmit","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","candidate_count":0,"decision":"skip","reason":"missing_index"} | ||
| {"ts":"2026-05-07T05:56:27Z","event":"Stop","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","intents_checked":0,"decision":"clean","stop_count":0} | ||
| {"ts":"2026-05-07T05:58:36Z","event":"UserPromptSubmit","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","candidate_count":0,"decision":"skip","reason":"missing_index"} | ||
| {"ts":"2026-05-07T06:01:41Z","event":"Stop","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","intents_checked":0,"decision":"clean","stop_count":0} | ||
| {"ts":"2026-05-07T06:07:05Z","event":"UserPromptSubmit","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","candidate_count":0,"decision":"skip","reason":"missing_index"} | ||
| {"ts":"2026-05-07T06:08:27Z","event":"Stop","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","intents_checked":0,"decision":"clean","stop_count":0} | ||
| {"ts":"2026-05-07T06:09:30Z","event":"UserPromptSubmit","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","candidate_count":0,"decision":"skip","reason":"missing_index"} | ||
| {"ts":"2026-05-07T06:43:22Z","event":"Stop","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","intents_checked":0,"decision":"clean","stop_count":0} | ||
| {"ts":"2026-05-07T06:44:42Z","event":"UserPromptSubmit","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","candidate_count":0,"decision":"skip","reason":"missing_index"} | ||
| {"ts":"2026-05-07T06:45:02Z","event":"Stop","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","intents_checked":0,"decision":"clean","stop_count":0} | ||
| {"ts":"2026-05-07T06:45:20Z","event":"UserPromptSubmit","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","candidate_count":0,"decision":"skip","reason":"missing_index"} | ||
| {"ts":"2026-05-07T06:47:18Z","event":"UserPromptSubmit","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","candidate_count":0,"decision":"skip","reason":"missing_index"} | ||
| {"ts":"2026-05-08T05:40:15Z","event":"Stop","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"67fa80d7-7b77-4356-82d3-dae36f40aba5","intents_checked":0,"decision":"clean","stop_count":0} | ||
| {"ts":"2026-05-08T05:40:37Z","event":"UserPromptSubmit","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"67fa80d7-7b77-4356-82d3-dae36f40aba5","candidate_count":0,"decision":"skip","reason":"missing_index"} | ||
| {"ts":"2026-05-08T05:47:52Z","event":"Stop","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"67fa80d7-7b77-4356-82d3-dae36f40aba5","intents_checked":0,"decision":"clean","stop_count":0} | ||
| {"ts":"2026-05-08T05:50:09Z","event":"UserPromptSubmit","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"67fa80d7-7b77-4356-82d3-dae36f40aba5","candidate_count":0,"decision":"skip","reason":"missing_index"} | ||
| {"ts":"2026-05-08T05:50:55Z","event":"Stop","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"67fa80d7-7b77-4356-82d3-dae36f40aba5","intents_checked":0,"decision":"clean","stop_count":0} | ||
| {"ts":"2026-05-08T05:56:08Z","event":"UserPromptSubmit","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"67fa80d7-7b77-4356-82d3-dae36f40aba5","candidate_count":0,"decision":"skip","reason":"missing_index"} | ||
| {"ts":"2026-05-08T06:12:03Z","event":"Stop","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"67fa80d7-7b77-4356-82d3-dae36f40aba5","intents_checked":0,"decision":"clean","stop_count":0} | ||
| {"ts":"2026-05-08T06:12:25Z","event":"UserPromptSubmit","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"67fa80d7-7b77-4356-82d3-dae36f40aba5","candidate_count":0,"decision":"skip","reason":"missing_index"} | ||
| {"ts":"2026-05-10T13:42:18Z","event":"Stop","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","intents_checked":0,"decision":"clean","stop_count":0} | ||
| {"ts":"2026-05-10T22:00:48Z","event":"UserPromptSubmit","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","candidate_count":0,"decision":"skip","reason":"missing_index"} | ||
| {"ts":"2026-05-10T22:00:53Z","event":"UserPromptSubmit","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","candidate_count":0,"decision":"skip","reason":"missing_index"} | ||
| {"ts":"2026-05-10T22:18:03Z","event":"Stop","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","intents_checked":0,"decision":"clean","stop_count":0} | ||
| {"ts":"2026-05-10T22:20:15Z","event":"UserPromptSubmit","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","candidate_count":0,"decision":"skip","reason":"missing_index"} | ||
| {"ts":"2026-05-11T01:00:57Z","event":"Stop","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","intents_checked":0,"decision":"clean","stop_count":0} | ||
| {"ts":"2026-05-11T01:07:23Z","event":"UserPromptSubmit","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","candidate_count":0,"decision":"skip","reason":"missing_index"} | ||
| {"ts":"2026-05-11T01:08:31Z","event":"Stop","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","intents_checked":0,"decision":"clean","stop_count":0} | ||
| {"ts":"2026-05-11T01:10:56Z","event":"UserPromptSubmit","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","candidate_count":0,"decision":"skip","reason":"missing_index"} | ||
| {"ts":"2026-05-11T01:19:35Z","event":"Stop","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","intents_checked":0,"decision":"clean","stop_count":0} | ||
| {"ts":"2026-05-11T01:19:55Z","event":"UserPromptSubmit","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","candidate_count":0,"decision":"skip","reason":"missing_index"} | ||
| {"ts":"2026-05-11T04:15:36Z","event":"Stop","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","intents_checked":0,"decision":"clean","stop_count":0} | ||
| {"ts":"2026-05-11T04:48:47Z","event":"UserPromptSubmit","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","candidate_count":0,"decision":"skip","reason":"missing_index"} | ||
| {"ts":"2026-05-11T04:52:40Z","event":"Stop","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","intents_checked":0,"decision":"clean","stop_count":0} | ||
| {"ts":"2026-05-11T05:29:27Z","event":"UserPromptSubmit","cwd":"/Users/taesupyoon/bootpay-commerce/multi-sdk/server/nodejs","session":"d72ed462-64f0-442e-aedf-0c0bfc42347b","candidate_count":0,"decision":"skip","reason":"missing_index"} |
| {"stop_count":0,"last_stop_ts":"2026-05-08T05:40:15Z"} |
| {"stop_count":0,"last_stop_ts":"2026-05-07T05:02:05Z"} |
+102
| ### 2.6.0 | ||
| * 인증: client_key/secret_key Basic Auth 지원 (PG + Commerce 공통) | ||
| - 기존 application_id/private_key Bearer 방식 하위 호환 유지 | ||
| - ck/sk 모드에서는 request/token 호출 불필요 (getAccessToken 합성 응답) | ||
| - ck 또는 sk 한쪽만 지정 + legacy 키도 없으면 NEED_CLIENT_KEY(-101) reject | ||
| * Commerce: V1 신설 모듈 추가 — category, coupon, point, orderSubscriptionRequest, cart | ||
| - cart.orderPreview: 권위적 배송비/할인 계산 응답 (guest/member 모드) | ||
| * Commerce: userGroup URL parity 정정 — `/add_user` → `/user`, `/remove_user` → `/user/{userId}` (서버 routes.rb 와 정렬, 옛 URL 은 서버 미존재) | ||
| * Commerce: 서버에 존재하지 않는 endpoint 3종 제거 (`coupon.preview`, `point.previewUsage`, `point.calculateLimit`) — npm 미공개 모듈이라 사용자 영향 없음 | ||
| * Wallet API (`requestWalletPayment`, `WalletRequestParameters`, `WalletPaymentResponseParameters`) `@deprecated` 표시 — 다음 메이저 버전에서 제거 예정 | ||
| * `http_status` 응답 필드 `@deprecated` 표시 — 다음 메이저 버전에서 제거 예정 (성공 여부는 `status` 필드 사용) | ||
| * 테스트 인프라: `.env` / `BOOTPAY_AUTH_MODE=new|legacy` 토글로 ck/sk · legacy 양쪽 검증, PG 테스트 디렉터리 분리(`test/pg/`) | ||
| * docs: CHANGELOG 파일명 오타 정정 (`CHNAGELOG.md` → `CHANGELOG.md`) | ||
| ### 2.4.1 | ||
| * Commerce 응답포맷 개선 | ||
| ### 2.4.0 | ||
| * Commerce 기능 추가 | ||
| ### 2.3.6 | ||
| * 본인인증 REST API로 요청시 client_ip 파라메터 필수 추가 | ||
| ### 2.3.5 | ||
| * walletPayment response type bug fixed | ||
| ### 2.3.3 | ||
| * wallet api 추가 | ||
| ### 2.3.2 | ||
| * 배송등록 api 필드 추가 | ||
| ### 2.3.1 | ||
| * requestSubscribePayment 함수 추가 | ||
| ### 2.3.0 | ||
| * 계좌 자동 결제 추가 | ||
| ### 2.1.11 | ||
| * 필드명 back_username -> bank_username 으로 오타 수정 | ||
| ### 2.1.4 | ||
| * 날짜 타입을 string -> Date 로 명시적으로 수정 | ||
| ### 2.1.3 | ||
| * 정기결제요청시 feedback_url, metadata, content_type 파라미터 정의 추가 | ||
| ### 2.1.2 | ||
| * 버전 재배포 | ||
| ### 2.1.1 | ||
| * 정기결제 예약시 order_id 파라미터 정의 추가 | ||
| ### 2.1.0 | ||
| * 결제취소 요청시 refund optional 로 수정 | ||
| ### 2.0.9 ( Stable ) | ||
| * 네이버페이 포인트, 페이코포인트, 카카오머니, 토스포인트 결제시 리턴되는 포맷 interface 추가 정의 | ||
| ### 2.0.8 | ||
| * 현금영수증 cash_receipt_data interface 정의 | ||
| ### 2.0.7 | ||
| * inteface model 정의 parameters 누락 및 optional 체크 | ||
| * 현금영수증 별건 발행 / 취소 API 추가 | ||
| ### 2.0.6 | ||
| * SubscriptionBillingResponseParameters interface 누락된 값 추가 ( status, status_locale, gateway_url, method_symbol ) | ||
| ### 2.0.5 | ||
| * typescript에서 TS7016 root에서 import가 되지 않는 문제 해결 | ||
| ### 2.0.4 | ||
| * package.json import가 되지 않는 환경 예외처리 | ||
| ### 2.0.3 | ||
| * 기존 결제 현금영수증 발행 | ||
| * 별건 현금영수증 발행 | ||
| * REST API 통신 요청시 Header에 버전 및 SDK 종류 명시 ( 부트페이 서버에서 CS용으로 수집 ) | ||
| ### 2.0.0 | ||
| 새로운 v2 API에 맞도록 수정 |
| import { BootpayCommerceResource, BootpayCommerceResponse } from '../../commerce-resource'; | ||
| import { OrderPreviewParams, OrderPreviewResponse } from '../types'; | ||
| export declare class CartModule { | ||
| private bootpay; | ||
| constructor(bootpay: BootpayCommerceResource); | ||
| /** | ||
| * 주문 미리보기 (배송비/할인 권위적 계산) | ||
| * POST /v1/cart/order-preview | ||
| * | ||
| * member_mode='guest' (기본): cart_items 필수 | ||
| * member_mode='member': 서버 장바구니 사용 (user 토큰 필요) | ||
| */ | ||
| orderPreview(params?: OrderPreviewParams): Promise<BootpayCommerceResponse<OrderPreviewResponse>>; | ||
| } |
| "use strict"; | ||
| var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
| function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
| return new (P || (P = Promise))(function (resolve, reject) { | ||
| function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
| function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
| function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
| step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
| }); | ||
| }; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.CartModule = void 0; | ||
| class CartModule { | ||
| constructor(bootpay) { | ||
| this.bootpay = bootpay; | ||
| } | ||
| /** | ||
| * 주문 미리보기 (배송비/할인 권위적 계산) | ||
| * POST /v1/cart/order-preview | ||
| * | ||
| * member_mode='guest' (기본): cart_items 필수 | ||
| * member_mode='member': 서버 장바구니 사용 (user 토큰 필요) | ||
| */ | ||
| orderPreview() { | ||
| return __awaiter(this, arguments, void 0, function* (params = {}) { | ||
| return this.bootpay.post('cart/order-preview', params); | ||
| }); | ||
| } | ||
| } | ||
| exports.CartModule = CartModule; |
| import { BootpayCommerceResource, BootpayCommerceResponse } from '../../commerce-resource'; | ||
| import { CommerceCategory, CategoryCreateParams, CategoryUpdateParams } from '../types'; | ||
| export declare class CategoryModule { | ||
| private bootpay; | ||
| constructor(bootpay: BootpayCommerceResource); | ||
| /** | ||
| * 카테고리 트리 조회 | ||
| */ | ||
| list(): Promise<BootpayCommerceResponse<CommerceCategory[]>>; | ||
| /** | ||
| * 카테고리 단건 조회 | ||
| */ | ||
| detail(categoryId: string): Promise<BootpayCommerceResponse<CommerceCategory>>; | ||
| /** | ||
| * 카테고리 생성 | ||
| */ | ||
| create(params: CategoryCreateParams): Promise<BootpayCommerceResponse<CommerceCategory>>; | ||
| /** | ||
| * 카테고리 수정 | ||
| */ | ||
| update(params: CategoryUpdateParams): Promise<BootpayCommerceResponse<CommerceCategory>>; | ||
| /** | ||
| * 카테고리 삭제 | ||
| */ | ||
| destroy(categoryId: string): Promise<BootpayCommerceResponse<null>>; | ||
| } |
| "use strict"; | ||
| var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
| function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
| return new (P || (P = Promise))(function (resolve, reject) { | ||
| function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
| function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
| function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
| step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
| }); | ||
| }; | ||
| var __rest = (this && this.__rest) || function (s, e) { | ||
| var t = {}; | ||
| for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | ||
| t[p] = s[p]; | ||
| if (s != null && typeof Object.getOwnPropertySymbols === "function") | ||
| for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { | ||
| if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) | ||
| t[p[i]] = s[p[i]]; | ||
| } | ||
| return t; | ||
| }; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.CategoryModule = void 0; | ||
| class CategoryModule { | ||
| constructor(bootpay) { | ||
| this.bootpay = bootpay; | ||
| } | ||
| /** | ||
| * 카테고리 트리 조회 | ||
| */ | ||
| list() { | ||
| return __awaiter(this, void 0, void 0, function* () { | ||
| return this.bootpay.get('categories'); | ||
| }); | ||
| } | ||
| /** | ||
| * 카테고리 단건 조회 | ||
| */ | ||
| detail(categoryId) { | ||
| return __awaiter(this, void 0, void 0, function* () { | ||
| return this.bootpay.get(`categories/${categoryId}`); | ||
| }); | ||
| } | ||
| /** | ||
| * 카테고리 생성 | ||
| */ | ||
| create(params) { | ||
| return __awaiter(this, void 0, void 0, function* () { | ||
| return this.bootpay.post('categories', params); | ||
| }); | ||
| } | ||
| /** | ||
| * 카테고리 수정 | ||
| */ | ||
| update(params) { | ||
| return __awaiter(this, void 0, void 0, function* () { | ||
| const { category_id } = params, rest = __rest(params, ["category_id"]); | ||
| return this.bootpay.put(`categories/${category_id}`, rest); | ||
| }); | ||
| } | ||
| /** | ||
| * 카테고리 삭제 | ||
| */ | ||
| destroy(categoryId) { | ||
| return __awaiter(this, void 0, void 0, function* () { | ||
| return this.bootpay.delete(`categories/${categoryId}`); | ||
| }); | ||
| } | ||
| } | ||
| exports.CategoryModule = CategoryModule; |
| import { BootpayCommerceResource, BootpayCommerceResponse } from '../../commerce-resource'; | ||
| import { CommerceCoupon, CouponListParams, CouponDownloadParams } from '../types'; | ||
| export declare class CouponModule { | ||
| private bootpay; | ||
| constructor(bootpay: BootpayCommerceResource); | ||
| /** | ||
| * 사용자 보유 쿠폰 목록 | ||
| */ | ||
| list(params?: CouponListParams): Promise<BootpayCommerceResponse<CommerceCoupon[]>>; | ||
| /** | ||
| * 다운로드 가능한 쿠폰 목록 | ||
| */ | ||
| available(): Promise<BootpayCommerceResponse<CommerceCoupon[]>>; | ||
| /** | ||
| * 쿠폰 다운로드 (issue_from_template) | ||
| */ | ||
| download(params: CouponDownloadParams): Promise<BootpayCommerceResponse<CommerceCoupon>>; | ||
| } |
| "use strict"; | ||
| var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
| function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
| return new (P || (P = Promise))(function (resolve, reject) { | ||
| function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
| function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
| function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
| step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
| }); | ||
| }; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.CouponModule = void 0; | ||
| class CouponModule { | ||
| constructor(bootpay) { | ||
| this.bootpay = bootpay; | ||
| } | ||
| /** | ||
| * 사용자 보유 쿠폰 목록 | ||
| */ | ||
| list(params) { | ||
| return __awaiter(this, void 0, void 0, function* () { | ||
| const queryParams = new URLSearchParams(); | ||
| if (params) { | ||
| if (params.status) | ||
| queryParams.append('status', params.status); | ||
| if (params.page !== undefined) | ||
| queryParams.append('page', params.page.toString()); | ||
| if (params.limit !== undefined) | ||
| queryParams.append('limit', params.limit.toString()); | ||
| } | ||
| const query = queryParams.toString(); | ||
| return this.bootpay.get(`coupon${query ? `?${query}` : ''}`); | ||
| }); | ||
| } | ||
| /** | ||
| * 다운로드 가능한 쿠폰 목록 | ||
| */ | ||
| available() { | ||
| return __awaiter(this, void 0, void 0, function* () { | ||
| return this.bootpay.get('coupon/available'); | ||
| }); | ||
| } | ||
| /** | ||
| * 쿠폰 다운로드 (issue_from_template) | ||
| */ | ||
| download(params) { | ||
| return __awaiter(this, void 0, void 0, function* () { | ||
| return this.bootpay.post('coupon/download', params); | ||
| }); | ||
| } | ||
| } | ||
| exports.CouponModule = CouponModule; |
| import { BootpayCommerceResource, BootpayCommerceResponse } from '../../commerce-resource'; | ||
| import { OrderSubscriptionRequest, OrderSubscriptionRequestListParams, OrderSubscriptionRequestUpdateParams } from '../types'; | ||
| /** | ||
| * V1 OrderSubscription Request 조회/승인 모듈 | ||
| * | ||
| * 본인 모드 (user role): project_id 없이 호출 → 본인 요청 목록/단건 | ||
| * 슈퍼바이저 모드 (supervisor role): project_id 포함 → 프로젝트 전체 + update (승인/거절) | ||
| * | ||
| * 구매자측 요청 생성 (pause/resume/termination 등) 은 | ||
| * `commerce.orderSubscription.requestIng.*` 모듈을 사용한다. | ||
| */ | ||
| export declare class OrderSubscriptionRequestModule { | ||
| private bootpay; | ||
| constructor(bootpay: BootpayCommerceResource); | ||
| /** | ||
| * 요청 목록 조회 (user / supervisor 공용) | ||
| */ | ||
| list(params?: OrderSubscriptionRequestListParams): Promise<BootpayCommerceResponse<{ | ||
| items: OrderSubscriptionRequest[]; | ||
| total: number; | ||
| }>>; | ||
| /** | ||
| * 요청 단건 조회 (user / supervisor 공용) | ||
| */ | ||
| detail(orderSubscriptionRequestHistoryId: string, projectId?: string): Promise<BootpayCommerceResponse<OrderSubscriptionRequest>>; | ||
| /** | ||
| * 요청 승인/거절 (supervisor 전용) | ||
| */ | ||
| update(params: OrderSubscriptionRequestUpdateParams): Promise<BootpayCommerceResponse<OrderSubscriptionRequest>>; | ||
| } |
| "use strict"; | ||
| var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
| function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
| return new (P || (P = Promise))(function (resolve, reject) { | ||
| function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
| function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
| function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
| step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
| }); | ||
| }; | ||
| var __rest = (this && this.__rest) || function (s, e) { | ||
| var t = {}; | ||
| for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | ||
| t[p] = s[p]; | ||
| if (s != null && typeof Object.getOwnPropertySymbols === "function") | ||
| for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { | ||
| if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) | ||
| t[p[i]] = s[p[i]]; | ||
| } | ||
| return t; | ||
| }; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.OrderSubscriptionRequestModule = void 0; | ||
| /** | ||
| * V1 OrderSubscription Request 조회/승인 모듈 | ||
| * | ||
| * 본인 모드 (user role): project_id 없이 호출 → 본인 요청 목록/단건 | ||
| * 슈퍼바이저 모드 (supervisor role): project_id 포함 → 프로젝트 전체 + update (승인/거절) | ||
| * | ||
| * 구매자측 요청 생성 (pause/resume/termination 등) 은 | ||
| * `commerce.orderSubscription.requestIng.*` 모듈을 사용한다. | ||
| */ | ||
| class OrderSubscriptionRequestModule { | ||
| constructor(bootpay) { | ||
| this.bootpay = bootpay; | ||
| } | ||
| /** | ||
| * 요청 목록 조회 (user / supervisor 공용) | ||
| */ | ||
| list(params) { | ||
| return __awaiter(this, void 0, void 0, function* () { | ||
| const queryParams = new URLSearchParams(); | ||
| if (params) { | ||
| if (params.project_id) | ||
| queryParams.append('project_id', params.project_id); | ||
| if (params.page !== undefined) | ||
| queryParams.append('page', params.page.toString()); | ||
| if (params.limit !== undefined) | ||
| queryParams.append('limit', params.limit.toString()); | ||
| if (params.request_type !== undefined) | ||
| queryParams.append('request_type', params.request_type.toString()); | ||
| if (params.status !== undefined) | ||
| queryParams.append('status', params.status.toString()); | ||
| if (params.s_at) | ||
| queryParams.append('s_at', params.s_at); | ||
| if (params.e_at) | ||
| queryParams.append('e_at', params.e_at); | ||
| if (params.keyword) | ||
| queryParams.append('keyword', params.keyword); | ||
| } | ||
| const query = queryParams.toString(); | ||
| return this.bootpay.get(`order-subscription-requests${query ? `?${query}` : ''}`); | ||
| }); | ||
| } | ||
| /** | ||
| * 요청 단건 조회 (user / supervisor 공용) | ||
| */ | ||
| detail(orderSubscriptionRequestHistoryId, projectId) { | ||
| return __awaiter(this, void 0, void 0, function* () { | ||
| const queryParams = new URLSearchParams(); | ||
| if (projectId) | ||
| queryParams.append('project_id', projectId); | ||
| const query = queryParams.toString(); | ||
| return this.bootpay.get(`order-subscription-requests/${orderSubscriptionRequestHistoryId}${query ? `?${query}` : ''}`); | ||
| }); | ||
| } | ||
| /** | ||
| * 요청 승인/거절 (supervisor 전용) | ||
| */ | ||
| update(params) { | ||
| return __awaiter(this, void 0, void 0, function* () { | ||
| const { order_subscription_request_history_id } = params, rest = __rest(params, ["order_subscription_request_history_id"]); | ||
| return this.bootpay.put(`order-subscription-requests/${order_subscription_request_history_id}`, rest); | ||
| }); | ||
| } | ||
| } | ||
| exports.OrderSubscriptionRequestModule = OrderSubscriptionRequestModule; |
| import { BootpayCommerceResource, BootpayCommerceResponse } from '../../commerce-resource'; | ||
| import { PointBalance, PointTransactionsParams, PointTransactionsResponse } from '../types'; | ||
| export declare class PointModule { | ||
| private bootpay; | ||
| constructor(bootpay: BootpayCommerceResource); | ||
| /** | ||
| * 적립금 잔액 조회 | ||
| */ | ||
| balance(): Promise<BootpayCommerceResponse<PointBalance>>; | ||
| /** | ||
| * 적립금 내역 조회 | ||
| */ | ||
| transactions(params?: PointTransactionsParams): Promise<BootpayCommerceResponse<PointTransactionsResponse>>; | ||
| } |
| "use strict"; | ||
| var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
| function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
| return new (P || (P = Promise))(function (resolve, reject) { | ||
| function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
| function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
| function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
| step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
| }); | ||
| }; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.PointModule = void 0; | ||
| class PointModule { | ||
| constructor(bootpay) { | ||
| this.bootpay = bootpay; | ||
| } | ||
| /** | ||
| * 적립금 잔액 조회 | ||
| */ | ||
| balance() { | ||
| return __awaiter(this, void 0, void 0, function* () { | ||
| return this.bootpay.get('point/balance'); | ||
| }); | ||
| } | ||
| /** | ||
| * 적립금 내역 조회 | ||
| */ | ||
| transactions(params) { | ||
| return __awaiter(this, void 0, void 0, function* () { | ||
| const queryParams = new URLSearchParams(); | ||
| if (params) { | ||
| if (params.page !== undefined) | ||
| queryParams.append('page', params.page.toString()); | ||
| if (params.limit !== undefined) | ||
| queryParams.append('limit', params.limit.toString()); | ||
| if (params.transaction_type !== undefined) { | ||
| queryParams.append('transaction_type', params.transaction_type.toString()); | ||
| } | ||
| } | ||
| const query = queryParams.toString(); | ||
| return this.bootpay.get(`point/transactions${query ? `?${query}` : ''}`); | ||
| }); | ||
| } | ||
| } | ||
| exports.PointModule = PointModule; |
| export interface CartItemPayload { | ||
| product_id: string; | ||
| product_option_id?: string; | ||
| quantity?: number; | ||
| is_subscription?: boolean; | ||
| subscription_period_id?: string; | ||
| } | ||
| export interface ShippingAddressPayload { | ||
| zipcode?: string; | ||
| } | ||
| export interface OrderPreviewParams { | ||
| member_mode?: 'guest' | 'member'; | ||
| cart_items?: CartItemPayload[]; | ||
| shipping_address?: ShippingAddressPayload; | ||
| coupon_ids?: string[]; | ||
| point_amount?: number; | ||
| user_group_id?: string; | ||
| } | ||
| export interface DeliveryGroupItem { | ||
| cart_item_id?: string; | ||
| product_id: string; | ||
| product_option_id?: string; | ||
| product_name?: string; | ||
| quantity: number; | ||
| price: number; | ||
| subtotal?: number; | ||
| } | ||
| export interface DeliveryGroup { | ||
| group_key?: string; | ||
| seller_id?: string; | ||
| delivery_shipping_id?: string; | ||
| delivery_shipping_bundle_id?: string; | ||
| bundle_id?: string; | ||
| items: DeliveryGroupItem[]; | ||
| total_price: number; | ||
| total_quantity: number; | ||
| delivery_fee: number; | ||
| delivery_extra_fee_jeju?: number; | ||
| delivery_extra_fee_remote?: number; | ||
| shipping_available?: boolean; | ||
| } | ||
| export interface AppliedCouponSnapshot { | ||
| coupon_id?: string; | ||
| coupon_template_id?: string; | ||
| name?: string; | ||
| discount_type?: number; | ||
| discount_value?: number; | ||
| actual_discount_amount?: number; | ||
| [key: string]: unknown; | ||
| } | ||
| export interface OrderPreviewSummary { | ||
| total_items: number; | ||
| total_quantity: number; | ||
| total_product_price: number; | ||
| total_delivery_fee: number; | ||
| total_delivery_extra_fee: number; | ||
| coupon_discount_amount: number; | ||
| applied_coupons: AppliedCouponSnapshot[]; | ||
| point_use_amount: number; | ||
| point_max_usable: number; | ||
| point_balance_after: number; | ||
| total_order_price: number; | ||
| } | ||
| export interface OrderPreviewUnavailableItem { | ||
| cart_item_id?: string; | ||
| product_id: string; | ||
| product_name?: string; | ||
| reason?: string; | ||
| } | ||
| export interface OrderPreviewResponse { | ||
| cart_id?: string; | ||
| user_id?: string; | ||
| delivery_groups: DeliveryGroup[]; | ||
| summary: OrderPreviewSummary; | ||
| unavailable_items?: OrderPreviewUnavailableItem[]; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); |
| export interface CommerceCategory { | ||
| category_id?: string; | ||
| seller_id?: string; | ||
| project_id?: string; | ||
| name?: string; | ||
| parent_category_id?: string | null; | ||
| parent_categories?: string[]; | ||
| status_display?: boolean; | ||
| status_best?: boolean; | ||
| filter_color?: number; | ||
| filter_size?: number; | ||
| idx?: number; | ||
| created_at?: string; | ||
| updated_at?: string; | ||
| } | ||
| export interface CategoryCreateParams { | ||
| name: string; | ||
| parent_category_id?: string; | ||
| status_display?: boolean; | ||
| status_best?: boolean; | ||
| filter_color?: number; | ||
| filter_size?: number; | ||
| } | ||
| export interface CategoryUpdateParams { | ||
| category_id: string; | ||
| name?: string; | ||
| parent_category_id?: string; | ||
| status_display?: boolean; | ||
| status_best?: boolean; | ||
| filter_color?: number; | ||
| filter_size?: number; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); |
| export interface CommerceCoupon { | ||
| coupon_id?: string; | ||
| coupon_template_id?: string; | ||
| user_id?: string; | ||
| project_id?: string; | ||
| name?: string; | ||
| discount_type?: number; | ||
| discount_value?: number; | ||
| min_order_amount?: number; | ||
| max_discount_amount?: number; | ||
| status?: number; | ||
| issued_at?: string; | ||
| used_at?: string | null; | ||
| expires_at?: string | null; | ||
| created_at?: string; | ||
| } | ||
| export interface CouponListParams { | ||
| status?: string; | ||
| page?: number; | ||
| limit?: number; | ||
| } | ||
| export interface CouponDownloadParams { | ||
| coupon_template_id: string; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); |
| export interface OrderSubscriptionRequest { | ||
| order_subscription_request_history_id?: string; | ||
| order_subscription_id?: string; | ||
| project_id?: string; | ||
| user_id?: string; | ||
| request_type?: number; | ||
| status?: number; | ||
| reason?: string; | ||
| requested_at?: string; | ||
| processed_at?: string | null; | ||
| created_at?: string; | ||
| updated_at?: string; | ||
| } | ||
| export interface OrderSubscriptionRequestListParams { | ||
| project_id?: string; | ||
| page?: number; | ||
| limit?: number; | ||
| request_type?: number; | ||
| status?: number; | ||
| s_at?: string; | ||
| e_at?: string; | ||
| keyword?: string; | ||
| } | ||
| export type OrderSubscriptionRequestApprovalAction = 'approve' | 'reject'; | ||
| export interface OrderSubscriptionRequestUpdateParams { | ||
| order_subscription_request_history_id: string; | ||
| approval: OrderSubscriptionRequestApprovalAction; | ||
| reason?: string; | ||
| [extra: string]: unknown; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); |
| export interface PointBalance { | ||
| available_balance?: number; | ||
| total_earned?: number; | ||
| total_used?: number; | ||
| is_negative?: boolean; | ||
| } | ||
| export interface PointTransaction { | ||
| transaction_id?: string; | ||
| transaction_type?: number; | ||
| amount?: number; | ||
| balance_after?: number; | ||
| reason?: string; | ||
| type?: number; | ||
| order_id?: string | null; | ||
| review_id?: string | null; | ||
| earned_at?: string | null; | ||
| expires_at?: string | null; | ||
| expired?: boolean; | ||
| remaining_balance?: number; | ||
| created_at?: string | null; | ||
| } | ||
| export interface PointTransactionsResponse { | ||
| transactions: PointTransaction[]; | ||
| total_count: number; | ||
| page: number; | ||
| limit: number; | ||
| total_pages: number; | ||
| } | ||
| export interface PointTransactionsParams { | ||
| page?: number; | ||
| limit?: number; | ||
| transaction_type?: number; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -11,2 +11,7 @@ import { BootpayCommerceResource, CommerceConfiguration, BootpayCommerceResponse } from './lib/commerce-resource'; | ||
| import { OrderSubscriptionAdjustmentModule } from './lib/commerce/modules/order-subscription-adjustment'; | ||
| import { OrderSubscriptionRequestModule } from './lib/commerce/modules/order-subscription-request'; | ||
| import { CategoryModule } from './lib/commerce/modules/category'; | ||
| import { CouponModule } from './lib/commerce/modules/coupon'; | ||
| import { PointModule } from './lib/commerce/modules/point'; | ||
| import { CartModule } from './lib/commerce/modules/cart'; | ||
| import { StoreModule } from './lib/commerce/modules/store'; | ||
@@ -27,2 +32,7 @@ export interface CommerceTokenResponse { | ||
| orderSubscriptionAdjustment: OrderSubscriptionAdjustmentModule; | ||
| orderSubscriptionRequest: OrderSubscriptionRequestModule; | ||
| category: CategoryModule; | ||
| coupon: CouponModule; | ||
| point: PointModule; | ||
| cart: CartModule; | ||
| store: StoreModule; | ||
@@ -29,0 +39,0 @@ constructor(configuration?: CommerceConfiguration); |
@@ -38,2 +38,7 @@ "use strict"; | ||
| const order_subscription_adjustment_1 = require("./lib/commerce/modules/order-subscription-adjustment"); | ||
| const order_subscription_request_1 = require("./lib/commerce/modules/order-subscription-request"); | ||
| const category_1 = require("./lib/commerce/modules/category"); | ||
| const coupon_1 = require("./lib/commerce/modules/coupon"); | ||
| const point_1 = require("./lib/commerce/modules/point"); | ||
| const cart_1 = require("./lib/commerce/modules/cart"); | ||
| const store_1 = require("./lib/commerce/modules/store"); | ||
@@ -58,2 +63,7 @@ class BootpayCommerce extends commerce_resource_1.BootpayCommerceResource { | ||
| this.orderSubscriptionAdjustment = new order_subscription_adjustment_1.OrderSubscriptionAdjustmentModule(this); | ||
| this.orderSubscriptionRequest = new order_subscription_request_1.OrderSubscriptionRequestModule(this); | ||
| this.category = new category_1.CategoryModule(this); | ||
| this.coupon = new coupon_1.CouponModule(this); | ||
| this.point = new point_1.PointModule(this); | ||
| this.cart = new cart_1.CartModule(this); | ||
| this.store = new store_1.StoreModule(this); | ||
@@ -60,0 +70,0 @@ } |
| import { BootpayBackendNodejsResource } from './lib/resource'; | ||
| import { AccessTokenResponseParameters, CancelPaymentParameters, CertificateResponseParameters, DestroySubscribeResponseParameters, ReceiptResponseParameters, SubscriptionBillingRequestParameters, SubscriptionBillingResponseParameters, SubscriptionCardPaymentRequestParameters, UserTokenRequestParameters, UserTokenResponseParameters, SubscribePaymentReserveParameters, SubscribePaymentReserveResponse, CancelSubscribeReserveResponse, ShippingRequestParameters, CashReceiptPublishOnReceiptParameters, CashReceiptCancelOnReceiptParameters, RequestCashReceiptParameters, CancelCashReceiptParameters, RequestAuthenticateParameters, SubscribePaymentLookupResponse, SubscriptionBillingTransferRequestParameters, SubscriptionPaymentRequestParameters, WalletRequestParameters, WalletDataPart, WalletPaymentResponseParameters } from './lib/response'; | ||
| import { AccessTokenResponseParameters, CancelPaymentParameters, CertificateResponseParameters, DestroySubscribeResponseParameters, ReceiptResponseParameters, SubscriptionBillingRequestParameters, SubscriptionBillingResponseParameters, SubscriptionCardPaymentRequestParameters, UserTokenRequestParameters, UserTokenResponseParameters, SubscribePaymentReserveParameters, SubscribePaymentReserveResponse, CancelSubscribeReserveResponse, ShippingRequestParameters, CashReceiptPublishOnReceiptParameters, CashReceiptCancelOnReceiptParameters, RequestCashReceiptParameters, CancelCashReceiptParameters, RequestAuthenticateParameters, SubscribePaymentLookupResponse, SubscriptionBillingTransferRequestParameters, SubscriptionPaymentRequestParameters, WalletDataPart, WalletRequestParameters, WalletPaymentResponseParameters } from './lib/response'; | ||
| declare class BootpayBackendNodejs extends BootpayBackendNodejsResource { | ||
@@ -174,4 +174,6 @@ constructor(); | ||
| * @date: 2025-03-16 | ||
| * @deprecated 다음 메이저 버전에서 제거 예정. wallet 엔드포인트는 폐기 예정이며, 결제는 Request::PaymentController#create 의 wallet_id + user_token 으로 처리됩니다. | ||
| */ | ||
| getUserWallets(user_id: string, sandbox: boolean): Promise<WalletDataPart[]>; | ||
| /** @deprecated wallet 엔드포인트는 폐기 예정. 다음 메이저 버전에서 제거됩니다. wallet_id + user_token 흐름으로 전환하세요. */ | ||
| requestWalletPayment(walletRequest: WalletRequestParameters): Promise<WalletPaymentResponseParameters>; | ||
@@ -178,0 +180,0 @@ } |
+19
-5
@@ -40,3 +40,15 @@ "use strict"; | ||
| try { | ||
| const { application_id, private_key } = this.bootpayConfiguration; | ||
| const { application_id, private_key, client_key, secret_key } = this.bootpayConfiguration; | ||
| const hasLegacyCredentials = application_id && private_key; | ||
| if ((client_key && !secret_key) || (!client_key && secret_key && !hasLegacyCredentials)) { | ||
| return Promise.reject({ | ||
| error_code: -101, | ||
| message: 'client_key/secret_key를 함께 입력해주세요.' | ||
| }); | ||
| } | ||
| // client_key/secret_key 인증은 매 요청 인터셉터가 Basic Auth 헤더를 직접 부착한다. | ||
| // request/token 호출이 불필요하므로, 호환을 위해 합성 응답만 즉시 반환한다. | ||
| if (client_key && secret_key) { | ||
| return Promise.resolve({ access_token: '', expire_in: 0 }); | ||
| } | ||
| const response = yield this.post('request/token', { | ||
@@ -61,4 +73,4 @@ application_id, | ||
| */ | ||
| receiptPayment(receiptId, lookupUserData = false) { | ||
| return __awaiter(this, void 0, void 0, function* () { | ||
| receiptPayment(receiptId_1) { | ||
| return __awaiter(this, arguments, void 0, function* (receiptId, lookupUserData = false) { | ||
| try { | ||
@@ -402,4 +414,4 @@ const response = yield this.get(`receipt/${receiptId}?lookup_user_data=${lookupUserData ? 'true' : 'false'}`); | ||
| */ | ||
| confirmAuthentication(receipt_id, otp = null) { | ||
| return __awaiter(this, void 0, void 0, function* () { | ||
| confirmAuthentication(receipt_id_1) { | ||
| return __awaiter(this, arguments, void 0, function* (receipt_id, otp = null) { | ||
| try { | ||
@@ -473,2 +485,3 @@ const response = yield this.post('authenticate/confirm', { | ||
| * @date: 2025-03-16 | ||
| * @deprecated 다음 메이저 버전에서 제거 예정. wallet 엔드포인트는 폐기 예정이며, 결제는 Request::PaymentController#create 의 wallet_id + user_token 으로 처리됩니다. | ||
| */ | ||
@@ -495,2 +508,3 @@ getUserWallets(user_id, sandbox) { | ||
| // } | ||
| /** @deprecated wallet 엔드포인트는 폐기 예정. 다음 메이저 버전에서 제거됩니다. wallet_id + user_token 흐름으로 전환하세요. */ | ||
| requestWalletPayment(walletRequest) { | ||
@@ -497,0 +511,0 @@ return __awaiter(this, void 0, void 0, function* () { |
@@ -57,11 +57,6 @@ "use strict"; | ||
| config.headers.set('BOOTPAY-ROLE', this.$role || 'user'); | ||
| if (this.$token !== undefined) { | ||
| config.headers.set('Authorization', `Bearer ${this.$token}`); | ||
| const basicAuth = this.getBasicAuthHeader(); | ||
| if (basicAuth) { | ||
| config.headers.set('Authorization', basicAuth); | ||
| } | ||
| else { | ||
| const basicAuth = this.getBasicAuthHeader(); | ||
| if (basicAuth) { | ||
| config.headers.set('Authorization', basicAuth); | ||
| } | ||
| } | ||
| return config; | ||
@@ -68,0 +63,0 @@ }, (error) => { |
@@ -10,2 +10,7 @@ export * from './user'; | ||
| export * from './order-subscription-adjustment'; | ||
| export * from './order-subscription-request'; | ||
| export * from './category'; | ||
| export * from './coupon'; | ||
| export * from './point'; | ||
| export * from './cart'; | ||
| export * from './store'; |
@@ -26,2 +26,7 @@ "use strict"; | ||
| __exportStar(require("./order-subscription-adjustment"), exports); | ||
| __exportStar(require("./order-subscription-request"), exports); | ||
| __exportStar(require("./category"), exports); | ||
| __exportStar(require("./coupon"), exports); | ||
| __exportStar(require("./point"), exports); | ||
| __exportStar(require("./cart"), exports); | ||
| __exportStar(require("./store"), exports); |
@@ -133,14 +133,14 @@ "use strict"; | ||
| } | ||
| supervisorApprove(orderSubscriptionId, params = {}) { | ||
| return __awaiter(this, void 0, void 0, function* () { | ||
| supervisorApprove(orderSubscriptionId_1) { | ||
| return __awaiter(this, arguments, void 0, function* (orderSubscriptionId, params = {}) { | ||
| return this.bootpay.put(`order_subscriptions/${orderSubscriptionId}/approve`, params); | ||
| }); | ||
| } | ||
| supervisorReject(orderSubscriptionId, params = {}) { | ||
| return __awaiter(this, void 0, void 0, function* () { | ||
| supervisorReject(orderSubscriptionId_1) { | ||
| return __awaiter(this, arguments, void 0, function* (orderSubscriptionId, params = {}) { | ||
| return this.bootpay.put(`order_subscriptions/${orderSubscriptionId}/reject`, params); | ||
| }); | ||
| } | ||
| supervisorTerminate(orderSubscriptionId, params = {}) { | ||
| return __awaiter(this, void 0, void 0, function* () { | ||
| supervisorTerminate(orderSubscriptionId_1) { | ||
| return __awaiter(this, arguments, void 0, function* (orderSubscriptionId, params = {}) { | ||
| return this.bootpay.put(`order_subscriptions/${orderSubscriptionId}/terminate`, params); | ||
@@ -154,4 +154,4 @@ }); | ||
| } | ||
| supervisorResume(orderSubscriptionId, params = {}) { | ||
| return __awaiter(this, void 0, void 0, function* () { | ||
| supervisorResume(orderSubscriptionId_1) { | ||
| return __awaiter(this, arguments, void 0, function* (orderSubscriptionId, params = {}) { | ||
| return this.bootpay.put(`order_subscriptions/${orderSubscriptionId}/resume`, params); | ||
@@ -158,0 +158,0 @@ }); |
@@ -75,3 +75,3 @@ "use strict"; | ||
| return __awaiter(this, void 0, void 0, function* () { | ||
| return this.bootpay.post(`user-groups/${userGroupId}/add_user`, { user_id: userId }); | ||
| return this.bootpay.post(`user-groups/${userGroupId}/user`, { user_id: userId }); | ||
| }); | ||
@@ -86,3 +86,3 @@ } | ||
| return __awaiter(this, void 0, void 0, function* () { | ||
| return this.bootpay.delete(`user-groups/${userGroupId}/remove_user?user_id=${userId}`); | ||
| return this.bootpay.delete(`user-groups/${userGroupId}/user/${userId}`); | ||
| }); | ||
@@ -89,0 +89,0 @@ } |
@@ -11,1 +11,6 @@ export * from './common'; | ||
| export * from './order-subscription-adjustment'; | ||
| export * from './order-subscription-request'; | ||
| export * from './category'; | ||
| export * from './coupon'; | ||
| export * from './point'; | ||
| export * from './cart'; |
@@ -27,1 +27,6 @@ "use strict"; | ||
| __exportStar(require("./order-subscription-adjustment"), exports); | ||
| __exportStar(require("./order-subscription-request"), exports); | ||
| __exportStar(require("./category"), exports); | ||
| __exportStar(require("./coupon"), exports); | ||
| __exportStar(require("./point"), exports); | ||
| __exportStar(require("./cart"), exports); |
@@ -60,6 +60,6 @@ "use strict"; | ||
| if (config.headers !== undefined) { | ||
| const { client_key, secret_key, application_id, private_key } = this.bootpayConfiguration; | ||
| const { client_key, secret_key } = this.bootpayConfiguration; | ||
| // 인증 우선순위: | ||
| // 1) client_key가 있으면 Basic(client_key:secret_key) | ||
| // 2) application_id가 있으면 Bearer(token) 우선, token 미존재 시 Basic(application_id:private_key) fallback | ||
| // 1) client_key/secret_key가 있으면 새 Basic Auth 사용 | ||
| // 2) 없으면 기존 application_id/private_key token 방식 유지 | ||
| if (client_key && secret_key) { | ||
@@ -66,0 +66,0 @@ config.headers.authorization = `Basic ${Buffer.from(`${client_key}:${secret_key}`).toString('base64')}`; |
@@ -361,2 +361,3 @@ export interface AccessTokenResponseParameters { | ||
| } | ||
| /** @deprecated wallet 엔드포인트는 폐기 예정이며, 결제는 wallet_id + user_token 방식으로 전환 예정. 다음 메이저 버전에서 제거됩니다. */ | ||
| export interface WalletRequestParameters { | ||
@@ -376,2 +377,3 @@ user_id: string; | ||
| } | ||
| /** @deprecated wallet 엔드포인트는 폐기 예정이며, 결제는 wallet_id + user_token 방식으로 전환 예정. 다음 메이저 버전에서 제거됩니다. */ | ||
| export interface WalletPaymentResponseParameters { | ||
@@ -398,2 +400,3 @@ cancelled_price: number; | ||
| currency: string; | ||
| /** @deprecated HTTP status code 노출 type. 다음 메이저 버전에서 제거 예정. 성공 여부는 status 필드 사용. */ | ||
| http_status: number; | ||
@@ -400,0 +403,0 @@ order_id: string; |
+69
-33
@@ -54,5 +54,41 @@ # Bootpay Server Side Package for Node.js [](https://www.npmjs.com/package/@bootpay/backend-js) | ||
| ## 환경변수 설정 | ||
| 예제와 테스트는 각 SDK 루트의 `.env` 파일을 우선 읽습니다. 먼저 `.env.example`을 복사한 뒤 필요한 키만 변경하세요. `.env`는 gitignore 처리되어 커밋되지 않습니다. | ||
| ```bash | ||
| cp .env.example .env | ||
| # BOOTPAY_ENV=production 또는 development | ||
| ``` | ||
| 주요 변수: | ||
| ```env | ||
| BOOTPAY_ENV=production | ||
| BOOTPAY_PG_CLIENT_KEY_PROD=... | ||
| BOOTPAY_PG_SECRET_KEY_PROD=... | ||
| BOOTPAY_PG_CLIENT_KEY_DEV=... | ||
| BOOTPAY_PG_SECRET_KEY_DEV=... | ||
| BOOTPAY_COMMERCE_CLIENT_KEY_PROD=... | ||
| BOOTPAY_COMMERCE_SECRET_KEY_PROD=... | ||
| BOOTPAY_COMMERCE_CLIENT_KEY_PROD=... | ||
| BOOTPAY_COMMERCE_SECRET_KEY_PROD=... | ||
| ``` | ||
| 변수가 없으면 SDK 테스트용 기본값(NodeJS 기준 ck/sk)으로 fallback 합니다. | ||
| # 사용하기 | ||
| > 권장 인증 방식은 `client_key/secret_key`입니다. 기존 `application_id/private_key` 설정도 하위 호환을 위해 계속 동작합니다. 둘 다 설정된 경우 `client_key/secret_key`가 우선됩니다. | ||
| ```javascript | ||
| // Legacy fallback: | ||
| // Bootpay.setConfiguration({ | ||
| // application_id: process.env.BOOTPAY_APPLICATION_ID, | ||
| // private_key: process.env.BOOTPAY_PRIVATE_KEY | ||
| // }) | ||
| ``` | ||
| ```javascript | ||
| import { Bootpay } from "@bootpay/backend-js"; | ||
@@ -62,4 +98,4 @@ | ||
| Bootpay.setConfiguration({ | ||
| application_id: '5b8f6a4d396fa665fdc2b5ea', | ||
| private_key: 'rm6EYECr6aroQVG2ntW0A6LpWnkTgP4uQ3H18sDDUYw=' | ||
| client_key: process.env.BOOTPAY_PG_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_PG_SECRET_KEY_PROD | ||
| }) | ||
@@ -90,4 +126,4 @@ try { | ||
| Bootpay.setConfiguration({ | ||
| application_id: '59b731f084382614ebf72215', | ||
| private_key: 'WwDv0UjfwFa04wYG0LJZZv1xwraQnlhnHE375n52X0U=' | ||
| client_key: process.env.BOOTPAY_PG_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_PG_SECRET_KEY_PROD | ||
| }) | ||
@@ -111,4 +147,4 @@ try { | ||
| Bootpay.setConfiguration({ | ||
| application_id: '5b8f6a4d396fa665fdc2b5ea', | ||
| private_key: 'rm6EYECr6aroQVG2ntW0A6LpWnkTgP4uQ3H18sDDUYw=' | ||
| client_key: process.env.BOOTPAY_PG_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_PG_SECRET_KEY_PROD | ||
| }) | ||
@@ -138,4 +174,4 @@ try { | ||
| Bootpay.setConfiguration({ | ||
| application_id: '5b8f6a4d396fa665fdc2b5ea', | ||
| private_key: 'rm6EYECr6aroQVG2ntW0A6LpWnkTgP4uQ3H18sDDUYw=' | ||
| client_key: process.env.BOOTPAY_PG_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_PG_SECRET_KEY_PROD | ||
| }) | ||
@@ -165,4 +201,4 @@ try { | ||
| Bootpay.setConfiguration({ | ||
| application_id: '5b8f6a4d396fa665fdc2b5ea', | ||
| private_key: 'rm6EYECr6aroQVG2ntW0A6LpWnkTgP4uQ3H18sDDUYw=' | ||
| client_key: process.env.BOOTPAY_PG_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_PG_SECRET_KEY_PROD | ||
| }) | ||
@@ -198,4 +234,4 @@ try { | ||
| Bootpay.setConfiguration({ | ||
| application_id: '5b8f6a4d396fa665fdc2b5ea', | ||
| private_key: 'rm6EYECr6aroQVG2ntW0A6LpWnkTgP4uQ3H18sDDUYw=' | ||
| client_key: process.env.BOOTPAY_PG_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_PG_SECRET_KEY_PROD | ||
| }) | ||
@@ -247,4 +283,4 @@ try { | ||
| Bootpay.setConfiguration({ | ||
| application_id: '5b8f6a4d396fa665fdc2b5ea', | ||
| private_key: 'rm6EYECr6aroQVG2ntW0A6LpWnkTgP4uQ3H18sDDUYw=' | ||
| client_key: process.env.BOOTPAY_PG_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_PG_SECRET_KEY_PROD | ||
| }) | ||
@@ -271,4 +307,4 @@ try { | ||
| Bootpay.setConfiguration({ | ||
| application_id: '5b8f6a4d396fa665fdc2b5ea', | ||
| private_key: 'rm6EYECr6aroQVG2ntW0A6LpWnkTgP4uQ3H18sDDUYw=' | ||
| client_key: process.env.BOOTPAY_PG_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_PG_SECRET_KEY_PROD | ||
| }) | ||
@@ -305,4 +341,4 @@ try { | ||
| Bootpay.setConfiguration({ | ||
| application_id: '5b8f6a4d396fa665fdc2b5ea', | ||
| private_key: 'rm6EYECr6aroQVG2ntW0A6LpWnkTgP4uQ3H18sDDUYw=' | ||
| client_key: process.env.BOOTPAY_PG_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_PG_SECRET_KEY_PROD | ||
| }) | ||
@@ -334,4 +370,4 @@ try { | ||
| Bootpay.setConfiguration({ | ||
| application_id: '5b8f6a4d396fa665fdc2b5ea', | ||
| private_key: 'rm6EYECr6aroQVG2ntW0A6LpWnkTgP4uQ3H18sDDUYw=' | ||
| client_key: process.env.BOOTPAY_PG_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_PG_SECRET_KEY_PROD | ||
| }) | ||
@@ -354,4 +390,4 @@ try { | ||
| Bootpay.setConfiguration({ | ||
| application_id: '5b8f6a4d396fa665fdc2b5ea', | ||
| private_key: 'rm6EYECr6aroQVG2ntW0A6LpWnkTgP4uQ3H18sDDUYw=' | ||
| client_key: process.env.BOOTPAY_PG_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_PG_SECRET_KEY_PROD | ||
| }) | ||
@@ -381,4 +417,4 @@ try { | ||
| Bootpay.setConfiguration({ | ||
| application_id: '5b8f6a4d396fa665fdc2b5ea', | ||
| private_key: 'rm6EYECr6aroQVG2ntW0A6LpWnkTgP4uQ3H18sDDUYw=' | ||
| client_key: process.env.BOOTPAY_PG_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_PG_SECRET_KEY_PROD | ||
| }) | ||
@@ -410,4 +446,4 @@ try { | ||
| Bootpay.setConfiguration({ | ||
| application_id: '5b8f6a4d396fa665fdc2b5ea', | ||
| private_key: 'rm6EYECr6aroQVG2ntW0A6LpWnkTgP4uQ3H18sDDUYw=' | ||
| client_key: process.env.BOOTPAY_PG_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_PG_SECRET_KEY_PROD | ||
| }) | ||
@@ -430,4 +466,4 @@ try { | ||
| Bootpay.setConfiguration({ | ||
| application_id: '59b731f084382614ebf72215', | ||
| private_key: 'WwDv0UjfwFa04wYG0LJZZv1xwraQnlhnHE375n52X0U=' | ||
| client_key: process.env.BOOTPAY_PG_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_PG_SECRET_KEY_PROD | ||
| }) | ||
@@ -452,4 +488,4 @@ try { | ||
| Bootpay.setConfiguration({ | ||
| application_id: '59b731f084382614ebf72215', | ||
| private_key: 'WwDv0UjfwFa04wYG0LJZZv1xwraQnlhnHE375n52X0U=' | ||
| client_key: process.env.BOOTPAY_PG_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_PG_SECRET_KEY_PROD | ||
| }) | ||
@@ -486,5 +522,5 @@ try { | ||
| const commerce = new BootpayCommerce({ | ||
| client_key: 'hxS-Up--5RvT6oU6QJE0JA', | ||
| secret_key: 'r5zxvDcQJiAP2PBQ0aJjSHQtblNmYFt6uFoEMhti_mg=', | ||
| mode: 'development' // 'production' | 'development' | 'stage' | ||
| client_key: process.env.BOOTPAY_COMMERCE_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_COMMERCE_SECRET_KEY_PROD, | ||
| mode: 'production' // 'production' | 'development' | 'stage' | ||
| }) | ||
@@ -491,0 +527,0 @@ |
+1
-1
| { | ||
| "name": "@bootpay/backend-js", | ||
| "version": "2.5.0", | ||
| "version": "2.6.0", | ||
| "description": "Bootpay Server Side Package for Node.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/bootpay.d.ts", |
+69
-33
@@ -54,5 +54,41 @@ # Bootpay Server Side Package for Node.js [](https://www.npmjs.com/package/@bootpay/backend-js) | ||
| ## 환경변수 설정 | ||
| 예제와 테스트는 각 SDK 루트의 `.env` 파일을 우선 읽습니다. 먼저 `.env.example`을 복사한 뒤 필요한 키만 변경하세요. `.env`는 gitignore 처리되어 커밋되지 않습니다. | ||
| ```bash | ||
| cp .env.example .env | ||
| # BOOTPAY_ENV=production 또는 development | ||
| ``` | ||
| 주요 변수: | ||
| ```env | ||
| BOOTPAY_ENV=production | ||
| BOOTPAY_PG_CLIENT_KEY_PROD=... | ||
| BOOTPAY_PG_SECRET_KEY_PROD=... | ||
| BOOTPAY_PG_CLIENT_KEY_DEV=... | ||
| BOOTPAY_PG_SECRET_KEY_DEV=... | ||
| BOOTPAY_COMMERCE_CLIENT_KEY_PROD=... | ||
| BOOTPAY_COMMERCE_SECRET_KEY_PROD=... | ||
| BOOTPAY_COMMERCE_CLIENT_KEY_PROD=... | ||
| BOOTPAY_COMMERCE_SECRET_KEY_PROD=... | ||
| ``` | ||
| 변수가 없으면 SDK 테스트용 기본값(NodeJS 기준 ck/sk)으로 fallback 합니다. | ||
| # 사용하기 | ||
| > 권장 인증 방식은 `client_key/secret_key`입니다. 기존 `application_id/private_key` 설정도 하위 호환을 위해 계속 동작합니다. 둘 다 설정된 경우 `client_key/secret_key`가 우선됩니다. | ||
| ```javascript | ||
| // Legacy fallback: | ||
| // Bootpay.setConfiguration({ | ||
| // application_id: process.env.BOOTPAY_APPLICATION_ID, | ||
| // private_key: process.env.BOOTPAY_PRIVATE_KEY | ||
| // }) | ||
| ``` | ||
| ```javascript | ||
| import { Bootpay } from "@bootpay/backend-js"; | ||
@@ -62,4 +98,4 @@ | ||
| Bootpay.setConfiguration({ | ||
| application_id: '5b8f6a4d396fa665fdc2b5ea', | ||
| private_key: 'rm6EYECr6aroQVG2ntW0A6LpWnkTgP4uQ3H18sDDUYw=' | ||
| client_key: process.env.BOOTPAY_PG_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_PG_SECRET_KEY_PROD | ||
| }) | ||
@@ -90,4 +126,4 @@ try { | ||
| Bootpay.setConfiguration({ | ||
| application_id: '59b731f084382614ebf72215', | ||
| private_key: 'WwDv0UjfwFa04wYG0LJZZv1xwraQnlhnHE375n52X0U=' | ||
| client_key: process.env.BOOTPAY_PG_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_PG_SECRET_KEY_PROD | ||
| }) | ||
@@ -111,4 +147,4 @@ try { | ||
| Bootpay.setConfiguration({ | ||
| application_id: '5b8f6a4d396fa665fdc2b5ea', | ||
| private_key: 'rm6EYECr6aroQVG2ntW0A6LpWnkTgP4uQ3H18sDDUYw=' | ||
| client_key: process.env.BOOTPAY_PG_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_PG_SECRET_KEY_PROD | ||
| }) | ||
@@ -138,4 +174,4 @@ try { | ||
| Bootpay.setConfiguration({ | ||
| application_id: '5b8f6a4d396fa665fdc2b5ea', | ||
| private_key: 'rm6EYECr6aroQVG2ntW0A6LpWnkTgP4uQ3H18sDDUYw=' | ||
| client_key: process.env.BOOTPAY_PG_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_PG_SECRET_KEY_PROD | ||
| }) | ||
@@ -165,4 +201,4 @@ try { | ||
| Bootpay.setConfiguration({ | ||
| application_id: '5b8f6a4d396fa665fdc2b5ea', | ||
| private_key: 'rm6EYECr6aroQVG2ntW0A6LpWnkTgP4uQ3H18sDDUYw=' | ||
| client_key: process.env.BOOTPAY_PG_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_PG_SECRET_KEY_PROD | ||
| }) | ||
@@ -198,4 +234,4 @@ try { | ||
| Bootpay.setConfiguration({ | ||
| application_id: '5b8f6a4d396fa665fdc2b5ea', | ||
| private_key: 'rm6EYECr6aroQVG2ntW0A6LpWnkTgP4uQ3H18sDDUYw=' | ||
| client_key: process.env.BOOTPAY_PG_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_PG_SECRET_KEY_PROD | ||
| }) | ||
@@ -247,4 +283,4 @@ try { | ||
| Bootpay.setConfiguration({ | ||
| application_id: '5b8f6a4d396fa665fdc2b5ea', | ||
| private_key: 'rm6EYECr6aroQVG2ntW0A6LpWnkTgP4uQ3H18sDDUYw=' | ||
| client_key: process.env.BOOTPAY_PG_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_PG_SECRET_KEY_PROD | ||
| }) | ||
@@ -271,4 +307,4 @@ try { | ||
| Bootpay.setConfiguration({ | ||
| application_id: '5b8f6a4d396fa665fdc2b5ea', | ||
| private_key: 'rm6EYECr6aroQVG2ntW0A6LpWnkTgP4uQ3H18sDDUYw=' | ||
| client_key: process.env.BOOTPAY_PG_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_PG_SECRET_KEY_PROD | ||
| }) | ||
@@ -305,4 +341,4 @@ try { | ||
| Bootpay.setConfiguration({ | ||
| application_id: '5b8f6a4d396fa665fdc2b5ea', | ||
| private_key: 'rm6EYECr6aroQVG2ntW0A6LpWnkTgP4uQ3H18sDDUYw=' | ||
| client_key: process.env.BOOTPAY_PG_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_PG_SECRET_KEY_PROD | ||
| }) | ||
@@ -334,4 +370,4 @@ try { | ||
| Bootpay.setConfiguration({ | ||
| application_id: '5b8f6a4d396fa665fdc2b5ea', | ||
| private_key: 'rm6EYECr6aroQVG2ntW0A6LpWnkTgP4uQ3H18sDDUYw=' | ||
| client_key: process.env.BOOTPAY_PG_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_PG_SECRET_KEY_PROD | ||
| }) | ||
@@ -354,4 +390,4 @@ try { | ||
| Bootpay.setConfiguration({ | ||
| application_id: '5b8f6a4d396fa665fdc2b5ea', | ||
| private_key: 'rm6EYECr6aroQVG2ntW0A6LpWnkTgP4uQ3H18sDDUYw=' | ||
| client_key: process.env.BOOTPAY_PG_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_PG_SECRET_KEY_PROD | ||
| }) | ||
@@ -381,4 +417,4 @@ try { | ||
| Bootpay.setConfiguration({ | ||
| application_id: '5b8f6a4d396fa665fdc2b5ea', | ||
| private_key: 'rm6EYECr6aroQVG2ntW0A6LpWnkTgP4uQ3H18sDDUYw=' | ||
| client_key: process.env.BOOTPAY_PG_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_PG_SECRET_KEY_PROD | ||
| }) | ||
@@ -410,4 +446,4 @@ try { | ||
| Bootpay.setConfiguration({ | ||
| application_id: '5b8f6a4d396fa665fdc2b5ea', | ||
| private_key: 'rm6EYECr6aroQVG2ntW0A6LpWnkTgP4uQ3H18sDDUYw=' | ||
| client_key: process.env.BOOTPAY_PG_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_PG_SECRET_KEY_PROD | ||
| }) | ||
@@ -430,4 +466,4 @@ try { | ||
| Bootpay.setConfiguration({ | ||
| application_id: '59b731f084382614ebf72215', | ||
| private_key: 'WwDv0UjfwFa04wYG0LJZZv1xwraQnlhnHE375n52X0U=' | ||
| client_key: process.env.BOOTPAY_PG_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_PG_SECRET_KEY_PROD | ||
| }) | ||
@@ -452,4 +488,4 @@ try { | ||
| Bootpay.setConfiguration({ | ||
| application_id: '59b731f084382614ebf72215', | ||
| private_key: 'WwDv0UjfwFa04wYG0LJZZv1xwraQnlhnHE375n52X0U=' | ||
| client_key: process.env.BOOTPAY_PG_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_PG_SECRET_KEY_PROD | ||
| }) | ||
@@ -486,5 +522,5 @@ try { | ||
| const commerce = new BootpayCommerce({ | ||
| client_key: 'hxS-Up--5RvT6oU6QJE0JA', | ||
| secret_key: 'r5zxvDcQJiAP2PBQ0aJjSHQtblNmYFt6uFoEMhti_mg=', | ||
| mode: 'development' // 'production' | 'development' | 'stage' | ||
| client_key: process.env.BOOTPAY_COMMERCE_CLIENT_KEY_PROD, | ||
| secret_key: process.env.BOOTPAY_COMMERCE_SECRET_KEY_PROD, | ||
| mode: 'production' // 'production' | 'development' | 'stage' | ||
| }) | ||
@@ -491,0 +527,0 @@ |
-88
| ### 2.4.1 | ||
| * Commerce 응답포맷 개선 | ||
| ### 2.4.0 | ||
| * Commerce 기능 추가 | ||
| ### 2.3.6 | ||
| * 본인인증 REST API로 요청시 client_ip 파라메터 필수 추가 | ||
| ### 2.3.5 | ||
| * walletPayment response type bug fixed | ||
| ### 2.3.3 | ||
| * wallet api 추가 | ||
| ### 2.3.2 | ||
| * 배송등록 api 필드 추가 | ||
| ### 2.3.1 | ||
| * requestSubscribePayment 함수 추가 | ||
| ### 2.3.0 | ||
| * 계좌 자동 결제 추가 | ||
| ### 2.1.11 | ||
| * 필드명 back_username -> bank_username 으로 오타 수정 | ||
| ### 2.1.4 | ||
| * 날짜 타입을 string -> Date 로 명시적으로 수정 | ||
| ### 2.1.3 | ||
| * 정기결제요청시 feedback_url, metadata, content_type 파라미터 정의 추가 | ||
| ### 2.1.2 | ||
| * 버전 재배포 | ||
| ### 2.1.1 | ||
| * 정기결제 예약시 order_id 파라미터 정의 추가 | ||
| ### 2.1.0 | ||
| * 결제취소 요청시 refund optional 로 수정 | ||
| ### 2.0.9 ( Stable ) | ||
| * 네이버페이 포인트, 페이코포인트, 카카오머니, 토스포인트 결제시 리턴되는 포맷 interface 추가 정의 | ||
| ### 2.0.8 | ||
| * 현금영수증 cash_receipt_data interface 정의 | ||
| ### 2.0.7 | ||
| * inteface model 정의 parameters 누락 및 optional 체크 | ||
| * 현금영수증 별건 발행 / 취소 API 추가 | ||
| ### 2.0.6 | ||
| * SubscriptionBillingResponseParameters interface 누락된 값 추가 ( status, status_locale, gateway_url, method_symbol ) | ||
| ### 2.0.5 | ||
| * typescript에서 TS7016 root에서 import가 되지 않는 문제 해결 | ||
| ### 2.0.4 | ||
| * package.json import가 되지 않는 환경 예외처리 | ||
| ### 2.0.3 | ||
| * 기존 결제 현금영수증 발행 | ||
| * 별건 현금영수증 발행 | ||
| * REST API 통신 요청시 Header에 버전 및 SDK 종류 명시 ( 부트페이 서버에서 CS용으로 수집 ) | ||
| ### 2.0.0 | ||
| 새로운 v2 API에 맞도록 수정 |
227778
24.15%85
41.67%4521
16.7%640
5.96%