@bootpay/bp-commerce-sdk
Advanced tools
| import { BootpayWindowEvent } from '../../vendor/mixins/event'; | ||
| declare class BootpayCommerceCheckoutEventManager extends BootpayWindowEvent { | ||
| constructor(); | ||
| } | ||
| export declare const BootpayCommerceWindowCheckoutEvent: BootpayCommerceCheckoutEventManager; | ||
| export {}; |
| export declare const CommerceCheckoutEvent: { | ||
| resize: (data: ExResizeData) => void; | ||
| showOrHideIframe: (show: boolean) => void; | ||
| hideProgress: () => void; | ||
| showProgress: (message?: string) => void; | ||
| cancel: () => void; | ||
| confirm: ({ use_redirect, redirect_url, payload }: { | ||
| use_redirect: any; | ||
| redirect_url: any; | ||
| payload: any; | ||
| }) => void; | ||
| done: ({ use_redirect, redirect_url, payload }: { | ||
| use_redirect: any; | ||
| redirect_url: any; | ||
| payload: any; | ||
| }) => void; | ||
| error: ({ redirect_url, use_redirect, error, payload }: { | ||
| redirect_url: any; | ||
| use_redirect: any; | ||
| error: any; | ||
| payload: any; | ||
| }) => void; | ||
| }; |
| import { TemplateManager } from '../../vendor/mixins/template-manager'; | ||
| declare class TemplateCheckoutManager extends TemplateManager { | ||
| $template: string; | ||
| $iFrameId: string; | ||
| $exOverlayId: string; | ||
| $exOverlayContainerId: string; | ||
| $formId: string; | ||
| $paymentWindowId: string; | ||
| constructor(); | ||
| postMessage(event: string, data: any): void; | ||
| /** | ||
| * 주문서 요청 | ||
| * Comment by GOSOMI | ||
| * @date: 2025-10-21 | ||
| */ | ||
| requestCheckout(data: CheckoutRequestModel): Promise<unknown>; | ||
| requestCheckoutUrl(url: string): Promise<any>; | ||
| private submitForm; | ||
| resize(data: ExResizeData): void; | ||
| showOrHideIframe(show: boolean): void; | ||
| destroy(): void; | ||
| } | ||
| export declare const TemplateCommerceCheckout: TemplateCheckoutManager; | ||
| export {}; |
@@ -7,4 +7,4 @@ import { BootpayManager } from '../vendor/mixins/bootpay-manager'; | ||
| render(el: string, data: RequestExModel): void; | ||
| requestInvoice(data: InvoiceRequestModel): Promise<any>; | ||
| requestInvoiceUrl(url: string): Promise<any>; | ||
| requestCheckout(data: CheckoutRequestModel): Promise<any>; | ||
| requestCheckoutUrl(url: string): Promise<any>; | ||
| hideAlert(eventName?: string): void; | ||
@@ -11,0 +11,0 @@ sendEvent(eventName: string, data: any): void; |
@@ -10,3 +10,3 @@ export declare const EnvironmentEx: { | ||
| }; | ||
| INVOICE_API_URL: { | ||
| CHECKOUT_API_URL: { | ||
| development: string; | ||
@@ -20,5 +20,5 @@ stage: string; | ||
| toExShopUrl(uri: string): string; | ||
| toInvoiceApiUrl(uri: string): string; | ||
| toCheckoutApiUrl(uri: string): string; | ||
| isMobile(): boolean; | ||
| isMobileSafari(): boolean; | ||
| }; |
@@ -10,5 +10,5 @@ interface BootpayCommerceInterface { | ||
| requestInvoice(data: InvoiceRequestModel): Promise<any> | ||
| requestCheckout(data: CheckoutRequestModel): Promise<any> | ||
| requestInvoiceUrl(url: string): Promise<any> | ||
| requestCheckoutUrl(url: string): Promise<any> | ||
@@ -62,3 +62,3 @@ setLogLevel(level: number): void | ||
| interface InvoiceRequestModel { | ||
| interface CheckoutRequestModel { | ||
| client_key: string | ||
@@ -79,3 +79,3 @@ request_id: string | ||
| metadata?: Record<string, any> | ||
| extra?: RequestExtraInvoiceModel | ||
| extra?: RequestExtraCheckoutModel | ||
| } | ||
@@ -97,3 +97,3 @@ | ||
| interface RequestExtraInvoiceModel { | ||
| interface RequestExtraCheckoutModel { | ||
| open_type: 'popup' | 'iframe' | 'redirect' | ||
@@ -100,0 +100,0 @@ separately_confirmed?: boolean |
@@ -1,2 +0,2 @@ | ||
| interface InvoiceConfirmData { | ||
| interface CheckoutConfirmData { | ||
| request_id?: string | ||
@@ -8,3 +8,3 @@ metadata?: Record<string, any> | ||
| // User 정보 | ||
| interface InvoiceUser { | ||
| interface CheckoutUser { | ||
| count: number | ||
@@ -23,3 +23,3 @@ created_at: string | ||
| // 상품 옵션 | ||
| interface InvoiceProductOption { | ||
| interface CheckoutProductOption { | ||
| _id: string | ||
@@ -40,3 +40,3 @@ images: string[] | null | ||
| // 상품 상세 정보 | ||
| interface InvoiceProductDetail { | ||
| interface CheckoutProductDetail { | ||
| accumulation_point: number | ||
@@ -81,7 +81,7 @@ accumulation_point_type: string | ||
| images: string[] | ||
| option: InvoiceProductOption | ||
| option: CheckoutProductOption | ||
| } | ||
| // 주문 상품 | ||
| interface InvoiceProduct { | ||
| interface CheckoutProduct { | ||
| chosen_product_option_id: string | ||
@@ -103,7 +103,7 @@ delivery_type: number | ||
| use_delivery_shipping: boolean | ||
| product: InvoiceProductDetail | ||
| product: CheckoutProductDetail | ||
| } | ||
| // 카드 결제 정보 | ||
| interface InvoiceCardData { | ||
| interface CheckoutCardData { | ||
| card_company: string | ||
@@ -122,3 +122,3 @@ card_company_code: string | ||
| // 약관 항목 | ||
| interface InvoiceTermItem { | ||
| interface CheckoutTermItem { | ||
| pk: string | ||
@@ -131,10 +131,10 @@ term_id: string | ||
| // 위젯 정보 | ||
| interface InvoiceWidgetData { | ||
| interface CheckoutWidgetData { | ||
| widget_key: string | ||
| widget_sandbox: boolean | ||
| terms: InvoiceTermItem[] | ||
| terms: CheckoutTermItem[] | ||
| } | ||
| // 영수증 데이터 | ||
| interface InvoiceReceiptData { | ||
| interface CheckoutReceiptData { | ||
| brandpay: boolean | ||
@@ -164,9 +164,9 @@ cancelled_price: number | ||
| widget_sandbox: boolean | ||
| card_data: InvoiceCardData | ||
| card_data: CheckoutCardData | ||
| metadata: Record<string, any> | ||
| widget_data: InvoiceWidgetData | ||
| widget_data: CheckoutWidgetData | ||
| } | ||
| // 주문 완료 데이터 | ||
| interface InvoiceDoneData { | ||
| interface CheckoutDoneData { | ||
| event: 'done' | ||
@@ -191,7 +191,7 @@ payload: { | ||
| unit: string | ||
| products: InvoiceProduct[] | ||
| receipt_success_data: InvoiceReceiptData | ||
| result_data: InvoiceReceiptData | ||
| user: InvoiceUser | ||
| products: CheckoutProduct[] | ||
| receipt_success_data: CheckoutReceiptData | ||
| result_data: CheckoutReceiptData | ||
| user: CheckoutUser | ||
| } | ||
| } |
+1
-1
| { | ||
| "name": "@bootpay/bp-commerce-sdk", | ||
| "version": "1.0.1", | ||
| "version": "1.0.2", | ||
| "main": "dist/index.mjs", | ||
@@ -5,0 +5,0 @@ "exports": { |
+16
-16
@@ -67,3 +67,3 @@ # Bootpay Commerce SDK | ||
| ```javascript | ||
| BootpayCommerce.requestInvoice({ | ||
| BootpayCommerce.requestCheckout({ | ||
| client_key: 'YOUR_CLIENT_KEY', | ||
@@ -96,3 +96,3 @@ request_id: 'order_12345', | ||
| }).then(response => { | ||
| console.log('Invoice created:', response) | ||
| console.log('Checkout created:', response) | ||
| }).catch(error => { | ||
@@ -109,3 +109,3 @@ console.error('Error:', error) | ||
| ```javascript | ||
| BootpayCommerce.requestInvoiceUrl('https://invoice.bootpay.co.kr/invoice/abc123') | ||
| BootpayCommerce.requestCheckoutUrl('https://invoice.bootpay.co.kr/invoice/abc123') | ||
| .then(response => { | ||
@@ -155,3 +155,3 @@ console.log('Payment completed:', response) | ||
| ### BootpayCommerce.requestInvoice(data) | ||
| ### BootpayCommerce.requestCheckout(data) | ||
@@ -164,7 +164,7 @@ 청구서 기반 결제를 요청합니다. | ||
| |------|------|----------|-------------| | ||
| | data | `InvoiceRequestModel` | Yes | 청구서 요청 데이터 | | ||
| | data | `CheckoutRequestModel` | Yes | 청구서 요청 데이터 | | ||
| **Returns:** `Promise<any>` - 결제 결과 | ||
| **InvoiceRequestModel:** | ||
| **CheckoutRequestModel:** | ||
@@ -206,3 +206,3 @@ ```typescript | ||
| ### BootpayCommerce.requestInvoiceUrl(url) | ||
| ### BootpayCommerce.requestCheckoutUrl(url) | ||
@@ -294,3 +294,3 @@ 청구서 URL로 결제를 요청합니다. | ||
| status: string // 주문 상태 | ||
| products: InvoiceProduct[] // 주문 상품 목록 | ||
| products: CheckoutProduct[] // 주문 상품 목록 | ||
| receipt_success_data: { | ||
@@ -341,3 +341,3 @@ receipt_id: string // 영수증 ID | ||
| ```javascript | ||
| BootpayCommerce.requestInvoice({ | ||
| BootpayCommerce.requestCheckout({ | ||
| client_key: 'YOUR_CLIENT_KEY', | ||
@@ -357,3 +357,3 @@ request_id: 'inv_' + Date.now(), | ||
| ```javascript | ||
| BootpayCommerce.requestInvoice({ | ||
| BootpayCommerce.requestCheckout({ | ||
| client_key: 'YOUR_CLIENT_KEY', | ||
@@ -376,9 +376,9 @@ request_id: 'order_789', | ||
| import BootpayCommerce, { | ||
| InvoiceRequestModel, | ||
| CheckoutRequestModel, | ||
| RequestExModel, | ||
| InvoiceDoneData | ||
| CheckoutDoneData | ||
| } from '@bootpay/bp-commerce-sdk' | ||
| // 타입 안전한 코드 작성 | ||
| const invoiceData: InvoiceRequestModel = { | ||
| const invoiceData: CheckoutRequestModel = { | ||
| client_key: 'YOUR_CLIENT_KEY', | ||
@@ -393,3 +393,3 @@ request_id: 'order_001', | ||
| BootpayCommerce.requestInvoice(invoiceData) | ||
| BootpayCommerce.requestCheckout(invoiceData) | ||
| ``` | ||
@@ -435,3 +435,3 @@ | ||
| 팝업 차단기가 활성화되어 있을 수 있습니다. 사용자 클릭 이벤트 핸들러 내에서 `requestInvoice`를 호출하세요. | ||
| 팝업 차단기가 활성화되어 있을 수 있습니다. 사용자 클릭 이벤트 핸들러 내에서 `requestCheckout`를 호출하세요. | ||
@@ -441,3 +441,3 @@ ```javascript | ||
| // 사용자 클릭 직후 호출하면 팝업 차단 방지 | ||
| BootpayCommerce.requestInvoice({ ... }) | ||
| BootpayCommerce.requestCheckout({ ... }) | ||
| }) | ||
@@ -444,0 +444,0 @@ ``` |
| export declare const CommerceInvoiceEvent: { | ||
| resize: (data: ExResizeData) => void; | ||
| showOrHideIframe: (show: boolean) => void; | ||
| hideProgress: () => void; | ||
| showProgress: (message?: string) => void; | ||
| cancel: () => void; | ||
| confirm: ({ use_redirect, redirect_url, payload }: { | ||
| use_redirect: any; | ||
| redirect_url: any; | ||
| payload: any; | ||
| }) => void; | ||
| done: ({ use_redirect, redirect_url, payload }: { | ||
| use_redirect: any; | ||
| redirect_url: any; | ||
| payload: any; | ||
| }) => void; | ||
| error: ({ redirect_url, use_redirect, error, payload }: { | ||
| redirect_url: any; | ||
| use_redirect: any; | ||
| error: any; | ||
| payload: any; | ||
| }) => void; | ||
| }; |
| import { BootpayWindowEvent } from '../../vendor/mixins/event'; | ||
| declare class BootpayCommerceInvoiceEventManager extends BootpayWindowEvent { | ||
| constructor(); | ||
| } | ||
| export declare const BootpayCommerceWindowInvoiceEvent: BootpayCommerceInvoiceEventManager; | ||
| export {}; |
| import { TemplateManager } from '../../vendor/mixins/template-manager'; | ||
| declare class TemplateInvoiceManager extends TemplateManager { | ||
| $template: string; | ||
| $iFrameId: string; | ||
| $exOverlayId: string; | ||
| $exOverlayContainerId: string; | ||
| $formId: string; | ||
| $paymentWindowId: string; | ||
| constructor(); | ||
| postMessage(event: string, data: any): void; | ||
| /** | ||
| * 청구서 요청 | ||
| * Comment by GOSOMI | ||
| * @date: 2025-10-21 | ||
| */ | ||
| requestInvoice(data: InvoiceRequestModel): Promise<unknown>; | ||
| requestInvoiceUrl(url: string): Promise<any>; | ||
| private submitForm; | ||
| resize(data: ExResizeData): void; | ||
| showOrHideIframe(show: boolean): void; | ||
| destroy(): void; | ||
| } | ||
| export declare const TemplateCommerceInvoice: TemplateInvoiceManager; | ||
| export {}; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
444009
0