@portone/browser-sdk 0.0.9 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -44,3 +44,53 @@ export declare const PgProvider: {
44
44
  readonly HYPHEN: "PG_PROVIDER_HYPHEN";
45
45
  };
46
46
  export type PgProvider = typeof PgProvider[keyof typeof PgProvider];
47
+ type InversionMap<T extends Record<keyof T, keyof any>> = {
48
+ [K in keyof T as T[K]]: K;
49
+ };
50
+ export declare const InversionPgProvider: InversionMap<{
51
+ readonly HTML5_INICIS: "PG_PROVIDER_HTML5_INICIS";
52
+ readonly PAYPAL: "PG_PROVIDER_PAYPAL";
53
+ readonly INICIS: "PG_PROVIDER_INICIS";
54
+ readonly DANAL: "PG_PROVIDER_DANAL";
55
+ readonly NICE: "PG_PROVIDER_NICE";
56
+ readonly DANAL_TPAY: "PG_PROVIDER_DANAL_TPAY";
57
+ readonly UPLUS: "PG_PROVIDER_UPLUS";
58
+ readonly NAVERPAY: "PG_PROVIDER_NAVERPAY";
59
+ readonly SETTLE: "PG_PROVIDER_SETTLE";
60
+ readonly KCP: "PG_PROVIDER_KCP";
61
+ readonly MOBILIANS: "PG_PROVIDER_MOBILIANS";
62
+ readonly KAKAOPAY: "PG_PROVIDER_KAKAOPAY";
63
+ readonly NAVERCO: "PG_PROVIDER_NAVERCO";
64
+ readonly KICC: "PG_PROVIDER_KICC";
65
+ readonly EXIMBAY: "PG_PROVIDER_EXIMBAY";
66
+ readonly SMILEPAY: "PG_PROVIDER_SMILEPAY";
67
+ readonly PAYCO: "PG_PROVIDER_PAYCO";
68
+ readonly KCP_BILLING: "PG_PROVIDER_KCP_BILLING";
69
+ readonly ALIPAY: "PG_PROVIDER_ALIPAY";
70
+ readonly CHAI: "PG_PROVIDER_CHAI";
71
+ readonly BLUEWALNUT: "PG_PROVIDER_BLUEWALNUT";
72
+ readonly SMARTRO: "PG_PROVIDER_SMARTRO";
73
+ readonly PAYMENTWALL: "PG_PROVIDER_PAYMENTWALL";
74
+ readonly TOSSPAYMENTS: "PG_PROVIDER_TOSSPAYMENTS";
75
+ readonly KCP_QUICK: "PG_PROVIDER_KCP_QUICK";
76
+ readonly DAOU: "PG_PROVIDER_DAOU";
77
+ readonly GALAXIA: "PG_PROVIDER_GALAXIA";
78
+ readonly TOSSPAY: "PG_PROVIDER_TOSSPAY";
79
+ readonly KCP_DIRECT: "PG_PROVIDER_KCP_DIRECT";
80
+ readonly SETTLE_ACC: "PG_PROVIDER_SETTLE_ACC";
81
+ readonly SETTLE_FIRM: "PG_PROVIDER_SETTLE_FIRM";
82
+ readonly INICIS_UNIFIED: "PG_PROVIDER_INICIS_UNIFIED";
83
+ readonly KSNET: "PG_PROVIDER_KSNET";
84
+ readonly PAYPAL_V2: "PG_PROVIDER_PAYPAL_V2";
85
+ readonly SMARTRO_V2: "PG_PROVIDER_SMARTRO_V2";
86
+ readonly NICE_V2: "PG_PROVIDER_NICE_V2";
87
+ readonly TOSS_BRANDPAY: "PG_PROVIDER_TOSS_BRANDPAY";
88
+ readonly WELCOME: "PG_PROVIDER_WELCOME";
89
+ readonly TOSSPAY_V2: "PG_PROVIDER_TOSSPAY_V2";
90
+ readonly INICIS_V2: "PG_PROVIDER_INICIS_V2";
91
+ readonly KPN: "PG_PROVIDER_KPN";
92
+ readonly KCP_V2: "PG_PROVIDER_KCP_V2";
93
+ readonly HYPHEN: "PG_PROVIDER_HYPHEN";
94
+ }>;
95
+ export type InversionPgProvider = typeof InversionPgProvider[keyof typeof InversionPgProvider];
96
+ export {};
@@ -0,0 +1,18 @@
1
+ export type InicisUnifiedIdentityVerificationBypass = {
2
+ /**
3
+ * 인증 대상 정보를 미리 지정할지 여부
4
+ */
5
+ flgFixedUser: 'Y' | 'N';
6
+ /**
7
+ * DI를 생성할 때 사용할 salt
8
+ */
9
+ DI_CODE?: string;
10
+ /**
11
+ * 인증 화면 좌측 상단에, PG사 로고 대신 표시할 로고의 URL
12
+ */
13
+ logoUrl?: string;
14
+ /**
15
+ * 인증 업체를 미리 선택할 경우, 인증 업체 코드
16
+ */
17
+ directAgency?: 'PAYCO' | 'PASS' | 'TOSS' | 'KFTC' | 'KAKAO' | 'NAVER' | 'SAMSUNG' | 'SHINHAN' | 'KB' | 'HANA' | 'WOORI' | 'NH' | 'KAKAOBANK' | 'SMS';
18
+ };
@@ -1,4 +1,6 @@
1
1
  import { DanalIdentityVerificationBypass } from './Danal.js';
2
+ import { InicisUnifiedIdentityVerificationBypass } from './InicisUnified.js';
2
3
  export type IdentityVerificationBypass = {
3
4
  danal?: DanalIdentityVerificationBypass;
5
+ inicisUnified?: InicisUnifiedIdentityVerificationBypass;
4
6
  };
@@ -1,3 +1,3 @@
1
1
  export type HyphenBypass = {
2
- disgnCd?: string;
2
+ designCd?: string;
3
3
  };
@@ -15,6 +15,7 @@ export { WindowType } from './WindowType.js';
15
15
  export { LoadableUIType } from './LoadableUIType.js';
16
16
  export { PaymentUIType } from './PaymentUIType.js';
17
17
  export { IssueBillingKeyUIType } from './IssueBillingKeyUIType.js';
18
+ export { InversionPgProvider } from './PgProvider.js';
18
19
  export type { Address } from './Address.js';
19
20
  export type { CashReceiptType } from './CashReceiptType.js';
20
21
  export type { Customer } from './Customer.js';
@@ -12,10 +12,14 @@ export declare class IdentityVerificationError extends Error implements PortOneE
12
12
  message: string;
13
13
  identityVerificationId?: string;
14
14
  identityVerificationTxId?: string;
15
- constructor({ code, message, identityVerificationId, identityVerificationTxId, }: {
15
+ pgCode?: string;
16
+ pgMessage?: string;
17
+ constructor({ code, message, identityVerificationId, identityVerificationTxId, pgCode, pgMessage, }: {
16
18
  code: IdentityVerificationErrorCode;
17
19
  message: string;
18
20
  identityVerificationId?: string;
19
21
  identityVerificationTxId?: string;
22
+ pgCode?: string;
23
+ pgMessage?: string;
20
24
  });
21
25
  }
@@ -14,12 +14,16 @@ export declare class IssueBillingKeyAndPayError extends Error implements PortOne
14
14
  billingKey?: string;
15
15
  code: IssueBillingKeyAndPayErrorCode;
16
16
  message: string;
17
- constructor({ txId, paymentId, billingKey, code, message, }: {
17
+ pgCode?: string;
18
+ pgMessage?: string;
19
+ constructor({ txId, paymentId, billingKey, code, message, pgCode, pgMessage, }: {
18
20
  txId?: string;
19
21
  paymentId?: string;
20
22
  billingKey?: string;
21
23
  code: IssueBillingKeyAndPayErrorCode;
22
24
  message: string;
25
+ pgCode?: string;
26
+ pgMessage?: string;
23
27
  });
24
28
  }
25
29
  export default IssueBillingKeyAndPayError;
@@ -11,10 +11,14 @@ export declare class IssueBillingKeyError extends Error implements PortOneError
11
11
  code: IssueBillingKeyErrorCode;
12
12
  message: string;
13
13
  billingKey?: string;
14
- constructor({ code, message, billingKey, }: {
14
+ pgCode?: string;
15
+ pgMessage?: string;
16
+ constructor({ code, message, billingKey, pgCode, pgMessage, }: {
15
17
  code: IssueBillingKeyErrorCode;
16
18
  message: string;
17
19
  billingKey?: string;
20
+ pgCode?: string;
21
+ pgMessage?: string;
18
22
  });
19
23
  }
20
24
  export default IssueBillingKeyError;
@@ -12,10 +12,14 @@ export declare class PaymentError extends Error implements PortOneError {
12
12
  message: string;
13
13
  txId?: string;
14
14
  paymentId?: string;
15
- constructor({ code, message, txId, paymentId, }: {
15
+ pgCode?: string;
16
+ pgMessage?: string;
17
+ constructor({ code, message, txId, paymentId, pgCode, pgMessage, }: {
16
18
  code: PaymentErrorCode;
17
19
  message: string;
18
20
  txId?: string;
19
21
  paymentId?: string;
22
+ pgCode?: string;
23
+ pgMessage?: string;
20
24
  });
21
25
  }
@@ -33,4 +33,5 @@ export type LoadPaymentUIRequest = Prettify<{
33
33
  bypass?: Entity.LoadPaymentUIBypass;
34
34
  country?: Entity.Country;
35
35
  shippingAddress?: Entity.Address;
36
+ promotionGroupId?: string;
36
37
  }>;
@@ -18,8 +18,10 @@ export type IdentityVerificationRequest = {
18
18
  */
19
19
  export type IdentityVerificationResponse = {
20
20
  transactionType: typeof Entity.TransactionType.IDENTITY_VERIFICATION;
21
- identityVerificationId?: string;
21
+ identityVerificationId: string;
22
22
  identityVerificationTxId: string;
23
23
  code?: string;
24
24
  message?: string;
25
+ pgCode?: string;
26
+ pgMessage?: string;
25
27
  };
@@ -31,6 +31,8 @@ export type IssueBillingKeyResponse = {
31
31
  billingKey: string;
32
32
  code?: string;
33
33
  message?: string;
34
+ pgCode?: string;
35
+ pgMessage?: string;
34
36
  };
35
37
  type BillingKeyMethodOptions<Method extends Entity.BillingKeyMethod, T> = {
36
38
  billingKeyMethod: Method;
@@ -38,6 +38,8 @@ export type IssueBillingKeyAndPayResponse = {
38
38
  billingKey: string;
39
39
  code?: string;
40
40
  message?: string;
41
+ pgCode?: string;
42
+ pgMessage?: string;
41
43
  };
42
44
  type BillingKeyAndPayMethodOptions<Method extends Entity.BillingKeyAndPayMethod, T> = {
43
45
  billingKeyAndPayMethod: Method;
@@ -38,10 +38,12 @@ export type PaymentRequest = {
38
38
  */
39
39
  export type PaymentResponse = {
40
40
  transactionType: typeof Entity.TransactionType.PAYMENT;
41
+ paymentId: string;
41
42
  txId: string;
42
- paymentId?: string;
43
43
  code?: string;
44
44
  message?: string;
45
+ pgCode?: string;
46
+ pgMessage?: string;
45
47
  };
46
48
  type PayMethodOptions<Method extends Entity.PayMethod, T> = {
47
49
  payMethod: Method;
package/dist/v2.cjs CHANGED
@@ -748,6 +748,7 @@ const PgProvider = {
748
748
  KCP_V2: 'PG_PROVIDER_KCP_V2',
749
749
  HYPHEN: 'PG_PROVIDER_HYPHEN',
750
750
  };
751
+ const InversionPgProvider = Object.entries(PgProvider).reduce((acc, [k, v]) => (Object.assign(Object.assign({}, acc), { [v]: k })), {});
751
752
 
752
753
  /**
753
754
  * 트랜잭션 유형
@@ -794,6 +795,7 @@ var index$1 = {
794
795
  EasyPayProvider: EasyPayProvider,
795
796
  Gender: Gender,
796
797
  GiftCertificateType: GiftCertificateType,
798
+ InversionPgProvider: InversionPgProvider,
797
799
  IssueBillingKeyUIType: IssueBillingKeyUIType,
798
800
  Locale: Locale,
799
801
  PaymentUIType: PaymentUIType,
@@ -810,7 +812,7 @@ class IdentityVerificationError extends Error {
810
812
  static [Symbol.hasInstance](instance) {
811
813
  return isIdentityVerificationError(instance);
812
814
  }
813
- constructor({ code, message, identityVerificationId, identityVerificationTxId, }) {
815
+ constructor({ code, message, identityVerificationId, identityVerificationTxId, pgCode, pgMessage, }) {
814
816
  super(message);
815
817
  this.__portOneErrorType = 'IdentityVerificationError';
816
818
  this.transactionType = TransactionType.IDENTITY_VERIFICATION;
@@ -818,6 +820,8 @@ class IdentityVerificationError extends Error {
818
820
  this.message = message;
819
821
  this.identityVerificationId = identityVerificationId;
820
822
  this.identityVerificationTxId = identityVerificationTxId;
823
+ this.pgCode = pgCode;
824
+ this.pgMessage = pgMessage;
821
825
  }
822
826
  }
823
827
 
@@ -829,7 +833,7 @@ class IssueBillingKeyAndPayError extends Error {
829
833
  static [Symbol.hasInstance](instance) {
830
834
  return isIssueBillingKeyAndPayError(instance);
831
835
  }
832
- constructor({ txId, paymentId, billingKey, code, message, }) {
836
+ constructor({ txId, paymentId, billingKey, code, message, pgCode, pgMessage, }) {
833
837
  super(message);
834
838
  this.__portOneErrorType = 'IssueBillingKeyAndPayError';
835
839
  this.transactionType = TransactionType.ISSUE_BILLING_KEY_AND_PAY;
@@ -838,6 +842,8 @@ class IssueBillingKeyAndPayError extends Error {
838
842
  this.billingKey = billingKey;
839
843
  this.code = code;
840
844
  this.message = message;
845
+ this.pgCode = pgCode;
846
+ this.pgMessage = pgMessage;
841
847
  }
842
848
  }
843
849
 
@@ -848,13 +854,15 @@ class IssueBillingKeyError extends Error {
848
854
  static [Symbol.hasInstance](instance) {
849
855
  return isIssueBillingKeyError(instance);
850
856
  }
851
- constructor({ code, message, billingKey, }) {
857
+ constructor({ code, message, billingKey, pgCode, pgMessage, }) {
852
858
  super(message);
853
859
  this.__portOneErrorType = 'IssueBillingKeyError';
854
860
  this.transactionType = TransactionType.ISSUE_BILLING_KEY;
855
861
  this.code = code;
856
862
  this.message = message;
857
863
  this.billingKey = billingKey;
864
+ this.pgCode = pgCode;
865
+ this.pgMessage = pgMessage;
858
866
  }
859
867
  }
860
868
 
@@ -880,7 +888,7 @@ class PaymentError extends Error {
880
888
  static [Symbol.hasInstance](instance) {
881
889
  return isPaymentError(instance);
882
890
  }
883
- constructor({ code, message, txId, paymentId, }) {
891
+ constructor({ code, message, txId, paymentId, pgCode, pgMessage, }) {
884
892
  super(message);
885
893
  this.__portOneErrorType = 'PaymentError';
886
894
  this.transactionType = TransactionType.PAYMENT;
@@ -888,6 +896,8 @@ class PaymentError extends Error {
888
896
  this.message = message;
889
897
  this.txId = txId;
890
898
  this.paymentId = paymentId;
899
+ this.pgCode = pgCode;
900
+ this.pgMessage = pgMessage;
891
901
  }
892
902
  }
893
903
 
package/dist/v2.js CHANGED
@@ -744,6 +744,7 @@ const PgProvider = {
744
744
  KCP_V2: 'PG_PROVIDER_KCP_V2',
745
745
  HYPHEN: 'PG_PROVIDER_HYPHEN',
746
746
  };
747
+ const InversionPgProvider = Object.entries(PgProvider).reduce((acc, [k, v]) => (Object.assign(Object.assign({}, acc), { [v]: k })), {});
747
748
 
748
749
  /**
749
750
  * 트랜잭션 유형
@@ -790,6 +791,7 @@ var index$1 = {
790
791
  EasyPayProvider: EasyPayProvider,
791
792
  Gender: Gender,
792
793
  GiftCertificateType: GiftCertificateType,
794
+ InversionPgProvider: InversionPgProvider,
793
795
  IssueBillingKeyUIType: IssueBillingKeyUIType,
794
796
  Locale: Locale,
795
797
  PaymentUIType: PaymentUIType,
@@ -806,7 +808,7 @@ class IdentityVerificationError extends Error {
806
808
  static [Symbol.hasInstance](instance) {
807
809
  return isIdentityVerificationError(instance);
808
810
  }
809
- constructor({ code, message, identityVerificationId, identityVerificationTxId, }) {
811
+ constructor({ code, message, identityVerificationId, identityVerificationTxId, pgCode, pgMessage, }) {
810
812
  super(message);
811
813
  this.__portOneErrorType = 'IdentityVerificationError';
812
814
  this.transactionType = TransactionType.IDENTITY_VERIFICATION;
@@ -814,6 +816,8 @@ class IdentityVerificationError extends Error {
814
816
  this.message = message;
815
817
  this.identityVerificationId = identityVerificationId;
816
818
  this.identityVerificationTxId = identityVerificationTxId;
819
+ this.pgCode = pgCode;
820
+ this.pgMessage = pgMessage;
817
821
  }
818
822
  }
819
823
 
@@ -825,7 +829,7 @@ class IssueBillingKeyAndPayError extends Error {
825
829
  static [Symbol.hasInstance](instance) {
826
830
  return isIssueBillingKeyAndPayError(instance);
827
831
  }
828
- constructor({ txId, paymentId, billingKey, code, message, }) {
832
+ constructor({ txId, paymentId, billingKey, code, message, pgCode, pgMessage, }) {
829
833
  super(message);
830
834
  this.__portOneErrorType = 'IssueBillingKeyAndPayError';
831
835
  this.transactionType = TransactionType.ISSUE_BILLING_KEY_AND_PAY;
@@ -834,6 +838,8 @@ class IssueBillingKeyAndPayError extends Error {
834
838
  this.billingKey = billingKey;
835
839
  this.code = code;
836
840
  this.message = message;
841
+ this.pgCode = pgCode;
842
+ this.pgMessage = pgMessage;
837
843
  }
838
844
  }
839
845
 
@@ -844,13 +850,15 @@ class IssueBillingKeyError extends Error {
844
850
  static [Symbol.hasInstance](instance) {
845
851
  return isIssueBillingKeyError(instance);
846
852
  }
847
- constructor({ code, message, billingKey, }) {
853
+ constructor({ code, message, billingKey, pgCode, pgMessage, }) {
848
854
  super(message);
849
855
  this.__portOneErrorType = 'IssueBillingKeyError';
850
856
  this.transactionType = TransactionType.ISSUE_BILLING_KEY;
851
857
  this.code = code;
852
858
  this.message = message;
853
859
  this.billingKey = billingKey;
860
+ this.pgCode = pgCode;
861
+ this.pgMessage = pgMessage;
854
862
  }
855
863
  }
856
864
 
@@ -876,7 +884,7 @@ class PaymentError extends Error {
876
884
  static [Symbol.hasInstance](instance) {
877
885
  return isPaymentError(instance);
878
886
  }
879
- constructor({ code, message, txId, paymentId, }) {
887
+ constructor({ code, message, txId, paymentId, pgCode, pgMessage, }) {
880
888
  super(message);
881
889
  this.__portOneErrorType = 'PaymentError';
882
890
  this.transactionType = TransactionType.PAYMENT;
@@ -884,6 +892,8 @@ class PaymentError extends Error {
884
892
  this.message = message;
885
893
  this.txId = txId;
886
894
  this.paymentId = paymentId;
895
+ this.pgCode = pgCode;
896
+ this.pgMessage = pgMessage;
887
897
  }
888
898
  }
889
899
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@portone/browser-sdk",
3
3
  "type": "module",
4
- "version": "0.0.9",
4
+ "version": "0.0.11",
5
5
  "description": "PortOne SDK for browser",
6
6
  "keywords": [
7
7
  "PortOne",