UNPKG

@portone/browser-sdk

Version:

PortOne SDK for browser

58 lines (57 loc) 1.98 kB
import { CapsToCamel } from '../utils.js'; import { Entity } from './index.js'; export declare function requestIssueBillingKey(request: IssueBillingKeyRequest): Promise<IssueBillingKeyResponse | undefined>; export type IssueBillingKeyRequest = { displayAmount?: number; currency?: Entity.Currency; storeId: string; channelKey?: string; pgProvider?: Entity.PgProvider; isTestChannel?: boolean; billingKeyMethod: Entity.BillingKeyMethod; issueName?: string; issueId?: string; customer?: Entity.Customer; windowType?: Entity.WindowTypes; redirectUrl?: string; locale?: Entity.Locale; customData?: Record<string, any>; offerPeriod?: Entity.OfferPeriod; appScheme?: string; noticeUrls?: string[]; productType?: Entity.ProductType; bypass?: Entity.IssueBillingKeyBypass; popup?: Entity.Popup; iframe?: Entity.Iframe; } & (BillingKeyMethodOptions<'CARD', Card> | BillingKeyMethodOptions<'MOBILE', Mobile> | BillingKeyMethodOptions<'EASY_PAY', EasyPay> | BillingKeyMethodOptions<'PAYPAL', Paypal>); /** * iframe/popup 방식으로 PG사 창이 렌더링 된 경우 * 프로세스 종료 후, 콜백 함수로 전달 될 빌링키 발급 정보 데이터 */ export type IssueBillingKeyResponse = { transactionType: typeof Entity.TransactionType.ISSUE_BILLING_KEY; billingKey: string; code?: string; message?: string; pgCode?: string; pgMessage?: string; }; type BillingKeyMethodOptions<Method extends Entity.BillingKeyMethod, T> = { billingKeyMethod: Method; } & { [K in Method as CapsToCamel<K>]?: T; }; type Card = { cardCompany?: Entity.CardCompany; }; type EasyPay = { availableCards?: Entity.CardCompany[]; easyPayProvider?: Entity.EasyPayProvider; availablePayMethods?: Entity.EasyPayPaymentMethod[]; }; type Mobile = { carrier?: Entity.Carrier; availableCarriers?: Entity.Carrier[]; }; type Paypal = Record<string, never>; export {};