iamport 0.3.3 → 0.4.0

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.
Files changed (40) hide show
  1. package/README.md +83 -5
  2. package/index.d.ts +848 -0
  3. package/lib/iamport.js +18 -1
  4. package/lib/iamportMethod.js +28 -2
  5. package/lib/resources/Benepia.js +47 -0
  6. package/lib/resources/Certifications.js +26 -0
  7. package/lib/resources/Codes.js +78 -0
  8. package/lib/resources/Cvs.js +46 -0
  9. package/lib/resources/Escrows.js +59 -0
  10. package/lib/resources/KcpQuick.js +47 -0
  11. package/lib/resources/Naver.js +276 -0
  12. package/lib/resources/Partners.js +33 -0
  13. package/lib/resources/Payco.js +33 -0
  14. package/lib/resources/Payments.js +59 -0
  15. package/lib/resources/Paymentwall.js +33 -0
  16. package/lib/resources/Receipts.js +99 -0
  17. package/lib/resources/Subscribe.js +87 -2
  18. package/lib/resources/Subscribe_customer.js +42 -0
  19. package/lib/resources/Tiers.js +32 -0
  20. package/lib/resources/Users.js +32 -0
  21. package/lib/resources/Vbank.js +40 -1
  22. package/openapi.json +11658 -0
  23. package/package.json +1 -1
  24. package/test/resources/Benepia.spec.js +49 -0
  25. package/test/resources/Certification.spec.js +53 -0
  26. package/test/resources/Codes.spec.js +45 -0
  27. package/test/resources/Cvs.spec.js +45 -0
  28. package/test/resources/Escrows.spec.js +71 -0
  29. package/test/resources/KcpQuick.spec.js +45 -0
  30. package/test/resources/Naver.spec.js +305 -0
  31. package/test/resources/Partners.spec.js +31 -0
  32. package/test/resources/Payco.spec.js +31 -0
  33. package/test/resources/Payment.spec.js +60 -0
  34. package/test/resources/Paymentwall.spec.js +31 -0
  35. package/test/resources/Receipts.spec.js +113 -0
  36. package/test/resources/Subscribe.spec.js +163 -0
  37. package/test/resources/Tiers.spec.js +19 -0
  38. package/test/resources/Users.spec.js +11 -0
  39. package/test/resources/Vbank.spec.js +61 -0
  40. package/.npmignore +0 -10
package/lib/iamport.js CHANGED
@@ -9,12 +9,29 @@ Iamport.DEFAULT_HOST = 'https://api.iamport.kr';
9
9
  Iamport.DEFAULT_KEY = 'imp_apiKey';
10
10
  Iamport.DEFAULT_SECRET = 'ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6bkA5lamv9OqDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f'
11
11
 
12
+ var naverResources = require('./resources/Naver');
13
+ var codeResources = require('./resources/Codes');
14
+
12
15
  var resources = {
13
16
  Payment : require('./resources/Payments'),
14
17
  Subscribe : require('./resources/Subscribe'),
15
18
  Subscribe_customer: require('./resources/Subscribe_customer'),
16
19
  Certification: require('./resources/Certifications'),
17
- Vbank : require('./resources/Vbank')
20
+ Vbank : require('./resources/Vbank'),
21
+ Escrows: require('./resources/Escrows'),
22
+ Benepia: require('./resources/Benepia'),
23
+ Bank: codeResources.Banks,
24
+ Card: codeResources.Cards,
25
+ Cvs: require('./resources/Cvs'),
26
+ KcpQuick: require('./resources/KcpQuick'),
27
+ Naver: naverResources.Naver,
28
+ NaverPayment: naverResources.NaverPayment,
29
+ Partner: require('./resources/Partners'),
30
+ Payco: require('./resources/Payco'),
31
+ Receipt: require('./resources/Receipts'),
32
+ Tier: require('./resources/Tiers'),
33
+ User: require('./resources/Users'),
34
+ Paymentwall: require('./resources/Paymentwall'),
18
35
  };
19
36
 
20
37
  Iamport.resources = resources;
@@ -21,6 +21,7 @@ var hasOwn = {}.hasOwnProperty;
21
21
  function iamportMethod (spec) {
22
22
  var requestMethod = (spec.method || 'GET').toUpperCase();
23
23
  return function(param) {
24
+ const stack = new Error().stack
24
25
  param = param || {};
25
26
 
26
27
  var _this = this,
@@ -42,9 +43,27 @@ function iamportMethod (spec) {
42
43
  }
43
44
  }
44
45
 
46
+ if(spec.command2) {
47
+ apiParams.push(spec.command2);
48
+ }
49
+
50
+ if(spec.urlParam2) {
51
+ if( hasOwn.call(param, spec.urlParam2) ) {
52
+ apiParams.push( param[spec.urlParam2] );
53
+ param = _.omit(param, spec.urlParam2);
54
+ }
55
+ // urlParam2 is optional - no error if missing
56
+ }
57
+
45
58
  if(spec.require && spec.require.length) {
46
59
  for(var i=0; i<spec.require.length; i++) {
47
60
  if (!hasOwn.call( param, spec.require[i] )) {
61
+ if(spec.require[i] === 'pwd_2digit'
62
+ && param['birth']
63
+ && param['birth'].length > 6){
64
+ continue;
65
+ }
66
+
48
67
  return new Promise(function(resolve, reject) {
49
68
  reject(new Error('Param missing: ' + spec.require[i]));
50
69
  });
@@ -54,10 +73,17 @@ function iamportMethod (spec) {
54
73
 
55
74
  API_BASE = apiParams.join('/');
56
75
 
57
- if( requestMethod === 'POST' ) formData = param;
76
+ if( requestMethod === 'POST' || requestMethod === 'PUT' ) formData = param;
58
77
  else if (Object.keys(param).length > 0) API_BASE += '?' + querystring.stringify(param);
59
78
 
60
- return _this._makeRequest(requestMethod, API_BASE, formData);
79
+ return new Promise(function(resolve, reject) {
80
+ _this._makeRequest(requestMethod, API_BASE, formData).then(resolve).catch(error => {
81
+ if (error.stack && stack) {
82
+ error.stack += '\nFrom previous event: ' + stack.substr(stack.indexOf('\n'));
83
+ }
84
+ reject(error);
85
+ })
86
+ });
61
87
  };
62
88
  }
63
89
 
@@ -0,0 +1,47 @@
1
+ /*!
2
+ * iamport
3
+ * MIT Licensed
4
+ */
5
+
6
+ 'use strict';
7
+
8
+ var resource = require('../resource'),
9
+ iamportMethod = resource.iamportMethod;
10
+
11
+ /**
12
+ * Module exports.
13
+ * @public
14
+ */
15
+ module.exports = resource.extend({
16
+
17
+ path: 'benepia',
18
+
19
+ /** method 생성
20
+ * 베네피아 포인트(복지포인트)를 조회합니다.
21
+ * @see {@link https://api.iamport.kr/#!/benepia/queryBenepiaPoint}
22
+ *
23
+ * @returns {promise} json 포인트 정보
24
+ * @public
25
+ */
26
+ getPoint: iamportMethod({
27
+ method: 'POST',
28
+ command: 'point',
29
+ urlParam: null,
30
+ require: ['benepia_user', 'benepia_password', 'channel_key']
31
+ }),
32
+
33
+ /** method 생성
34
+ * 베네피아 포인트(복지포인트) 결제를 요청합니다.
35
+ * @see {@link https://api.iamport.kr/#!/benepia/payBenepiaPoint}
36
+ *
37
+ * @returns {promise} json 결제 정보
38
+ * @public
39
+ */
40
+ payment: iamportMethod({
41
+ method: 'POST',
42
+ command: 'payment',
43
+ urlParam: null,
44
+ require: ['benepia_user', 'benepia_password', 'merchant_uid', 'amount', 'name', 'channel_key']
45
+ })
46
+
47
+ });
@@ -43,6 +43,32 @@ module.exports = resource.extend({
43
43
  method: 'GET',
44
44
  command: null,
45
45
  urlParam: 'imp_uid'
46
+ }),
47
+
48
+ /** method 생성
49
+ * OTP 본인인증을 요청합니다.
50
+ * @see {@link https://api.iamport.kr/#!/certifications/requestOtp}
51
+ *
52
+ * @returns {promise} json 인증 정보
53
+ * @public
54
+ */
55
+ otpRequest: iamportMethod({
56
+ method: 'POST',
57
+ command: 'otp/request',
58
+ urlParam: null
59
+ }),
60
+
61
+ /** method 생성
62
+ * OTP 본인인증 결과를 확인합니다.
63
+ * @see {@link https://api.iamport.kr/#!/certifications/confirmOtp}
64
+ *
65
+ * @returns {promise} json 인증 정보
66
+ * @public
67
+ */
68
+ otpConfirm: iamportMethod({
69
+ method: 'POST',
70
+ command: 'otp/confirm',
71
+ urlParam: 'imp_uid'
46
72
  })
47
73
 
48
74
  });
@@ -0,0 +1,78 @@
1
+ /*!
2
+ * iamport
3
+ * MIT Licensed
4
+ */
5
+
6
+ 'use strict';
7
+
8
+ var resource = require('../resource'),
9
+ iamportMethod = resource.iamportMethod;
10
+
11
+ var Banks = resource.extend({
12
+
13
+ path: 'banks',
14
+
15
+ /** method 생성
16
+ * 은행 코드 목록을 조회합니다.
17
+ * @see {@link https://api.iamport.kr/#!/codes/allBanks}
18
+ *
19
+ * @returns {promise} json 은행 코드 목록
20
+ * @public
21
+ */
22
+ getAll: iamportMethod({
23
+ method: 'GET',
24
+ command: null,
25
+ urlParam: null
26
+ }),
27
+
28
+ /** method 생성
29
+ * 특정 은행 코드를 조회합니다.
30
+ * @see {@link https://api.iamport.kr/#!/codes/bankByCode}
31
+ *
32
+ * @returns {promise} json 은행 코드 정보
33
+ * @public
34
+ */
35
+ getByCode: iamportMethod({
36
+ method: 'GET',
37
+ command: null,
38
+ urlParam: 'bank_standard_code'
39
+ })
40
+
41
+ });
42
+
43
+ var Cards = resource.extend({
44
+
45
+ path: 'cards',
46
+
47
+ /** method 생성
48
+ * 카드사 코드 목록을 조회합니다.
49
+ * @see {@link https://api.iamport.kr/#!/codes/allCards}
50
+ *
51
+ * @returns {promise} json 카드사 코드 목록
52
+ * @public
53
+ */
54
+ getAll: iamportMethod({
55
+ method: 'GET',
56
+ command: null,
57
+ urlParam: null
58
+ }),
59
+
60
+ /** method 생성
61
+ * 특정 카드사 코드를 조회합니다.
62
+ * @see {@link https://api.iamport.kr/#!/codes/cardByCode}
63
+ *
64
+ * @returns {promise} json 카드사 코드 정보
65
+ * @public
66
+ */
67
+ getByCode: iamportMethod({
68
+ method: 'GET',
69
+ command: null,
70
+ urlParam: 'card_standard_code'
71
+ })
72
+
73
+ });
74
+
75
+ module.exports = {
76
+ Banks: Banks,
77
+ Cards: Cards
78
+ };
@@ -0,0 +1,46 @@
1
+ /*!
2
+ * iamport
3
+ * MIT Licensed
4
+ */
5
+
6
+ 'use strict';
7
+
8
+ var resource = require('../resource'),
9
+ iamportMethod = resource.iamportMethod;
10
+
11
+ /**
12
+ * Module exports.
13
+ * @public
14
+ */
15
+ module.exports = resource.extend({
16
+
17
+ path: 'cvs',
18
+
19
+ /** method 생성
20
+ * 편의점 결제를 요청합니다.
21
+ * @see {@link https://api.iamport.kr/#!/cvs/issueCvs}
22
+ *
23
+ * @returns {promise} json 결제 정보
24
+ * @public
25
+ */
26
+ create: iamportMethod({
27
+ method: 'POST',
28
+ command: null,
29
+ urlParam: null,
30
+ require: ['channel_key', 'merchant_uid', 'amount']
31
+ }),
32
+
33
+ /** method 생성
34
+ * 편의점 결제를 취소합니다.
35
+ * @see {@link https://api.iamport.kr/#!/cvs/cancelCvs}
36
+ *
37
+ * @returns {promise} json 결제 정보
38
+ * @public
39
+ */
40
+ delete: iamportMethod({
41
+ method: 'DELETE',
42
+ command: null,
43
+ urlParam: 'imp_uid'
44
+ })
45
+
46
+ });
@@ -0,0 +1,59 @@
1
+ /*!
2
+ * iamport
3
+ * MIT Licensed
4
+ */
5
+
6
+ 'use strict';
7
+
8
+ var resource = require('../resource'),
9
+ iamportMethod = resource.iamportMethod;
10
+
11
+ /**
12
+ * Module exports.
13
+ * @public
14
+ */
15
+ module.exports = resource.extend({
16
+
17
+ path: 'escrows',
18
+
19
+ /** method 생성
20
+ * 에스크로 결제 건에 대한 배송정보를 등록하실 수 있습니다.
21
+ * @see {@link https://api.iamport.kr/#!/escrow.logis/escrow_logis_save}
22
+ *
23
+ * @returns {promise} json 결제 정보
24
+ * @public
25
+ */
26
+ create: iamportMethod({
27
+ method: 'POST',
28
+ command: 'logis',
29
+ urlParam: 'imp_uid',
30
+ require: ['sender','receiver','logis']
31
+ }),
32
+
33
+ /** method 생성
34
+ * 에스크로 결제 건에 대한 배송정보를 조회합니다.
35
+ * @see {@link https://api.iamport.kr/#!/escrow.logis/escrow_logis_get}
36
+ *
37
+ * @returns {promise} json 배송 정보
38
+ * @public
39
+ */
40
+ get: iamportMethod({
41
+ method: 'GET',
42
+ command: 'logis',
43
+ urlParam: 'imp_uid'
44
+ }),
45
+
46
+ /** method 생성
47
+ * 에스크로 결제 건에 대한 배송정보를 수정합니다.
48
+ * @see {@link https://api.iamport.kr/#!/escrow.logis/escrow_logis_update}
49
+ *
50
+ * @returns {promise} json 배송 정보
51
+ * @public
52
+ */
53
+ update: iamportMethod({
54
+ method: 'PUT',
55
+ command: 'logis',
56
+ urlParam: 'imp_uid',
57
+ require: ['sender','receiver','logis']
58
+ }),
59
+ });
@@ -0,0 +1,47 @@
1
+ /*!
2
+ * iamport
3
+ * MIT Licensed
4
+ */
5
+
6
+ 'use strict';
7
+
8
+ var resource = require('../resource'),
9
+ iamportMethod = resource.iamportMethod;
10
+
11
+ /**
12
+ * Module exports.
13
+ * @public
14
+ */
15
+ module.exports = resource.extend({
16
+
17
+ path: 'kcpquick',
18
+
19
+ /** method 생성
20
+ * KCP 퀵페이 회원을 삭제합니다.
21
+ * @see {@link https://api.iamport.kr/#!/kcpquick/deleteKcpQuickMember}
22
+ *
23
+ * @returns {promise} json 회원 정보
24
+ * @public
25
+ */
26
+ deleteMember: iamportMethod({
27
+ method: 'DELETE',
28
+ command: 'members',
29
+ urlParam: 'member_id',
30
+ require: ['site_code', 'partner_type', 'partner_subtype']
31
+ }),
32
+
33
+ /** method 생성
34
+ * KCP 퀵페이 간편결제를 요청합니다.
35
+ * @see {@link https://api.iamport.kr/#!/kcpquick/payKcpQuickMoney}
36
+ *
37
+ * @returns {promise} json 결제 정보
38
+ * @public
39
+ */
40
+ payMoney: iamportMethod({
41
+ method: 'POST',
42
+ command: 'payment/money',
43
+ urlParam: null,
44
+ require: ['member_id', 'channel_key', 'merchant_uid', 'name', 'amount']
45
+ })
46
+
47
+ });
@@ -0,0 +1,276 @@
1
+ /*!
2
+ * iamport
3
+ * MIT Licensed
4
+ */
5
+
6
+ 'use strict';
7
+
8
+ var resource = require('../resource'),
9
+ iamportMethod = resource.iamportMethod;
10
+
11
+ /**
12
+ * Naver standalone endpoints (/naver/...)
13
+ * @public
14
+ */
15
+ var Naver = resource.extend({
16
+
17
+ path: 'naver',
18
+
19
+ /** method 생성
20
+ * 네이버페이 상품주문 단건 조회
21
+ * @see {@link https://api.iamport.kr/#!/naver/getProductOrder}
22
+ *
23
+ * @returns {promise} json 상품주문 정보
24
+ * @public
25
+ */
26
+ getProductOrder: iamportMethod({
27
+ method: 'GET',
28
+ command: 'product-orders',
29
+ urlParam: 'product_order_id'
30
+ }),
31
+
32
+ /** method 생성
33
+ * 네이버페이 구매평 조회
34
+ * @see {@link https://api.iamport.kr/#!/naver/getReviews}
35
+ *
36
+ * @returns {promise} json 구매평 정보
37
+ * @public
38
+ */
39
+ getReviews: iamportMethod({
40
+ method: 'GET',
41
+ command: 'reviews',
42
+ urlParam: null,
43
+ require: ['channel_key', 'from', 'to', 'review_type']
44
+ })
45
+
46
+ });
47
+
48
+ /**
49
+ * Naver payment endpoints (/payments/{imp_uid}/naver/...)
50
+ * @public
51
+ */
52
+ var NaverPayment = resource.extend({
53
+
54
+ path: 'payments',
55
+
56
+ /** method 생성
57
+ * 네이버페이 결제의 상품주문 목록 조회
58
+ * @see {@link https://api.iamport.kr/#!/naver/getNaverProductOrders}
59
+ *
60
+ * @returns {promise} json 상품주문 목록
61
+ * @public
62
+ */
63
+ getProductOrders: iamportMethod({
64
+ method: 'GET',
65
+ command: null,
66
+ urlParam: 'imp_uid',
67
+ command2: 'naver/product-orders'
68
+ }),
69
+
70
+ /** method 생성
71
+ * 네이버페이 결제의 현금성 결제금액 조회
72
+ * @see {@link https://api.iamport.kr/#!/naver/getNaverCashAmount}
73
+ *
74
+ * @returns {promise} json 현금성 결제금액
75
+ * @public
76
+ */
77
+ getCashAmount: iamportMethod({
78
+ method: 'GET',
79
+ command: null,
80
+ urlParam: 'imp_uid',
81
+ command2: 'naver/cash-amount'
82
+ }),
83
+
84
+ /** method 생성
85
+ * 네이버페이 발주처리
86
+ * @see {@link https://api.iamport.kr/#!/naver/placeNaverOrder}
87
+ *
88
+ * @returns {promise} json 처리 결과
89
+ * @public
90
+ */
91
+ place: iamportMethod({
92
+ method: 'POST',
93
+ command: null,
94
+ urlParam: 'imp_uid',
95
+ command2: 'naver/place'
96
+ }),
97
+
98
+ /** method 생성
99
+ * 네이버페이 발송처리
100
+ * @see {@link https://api.iamport.kr/#!/naver/shipNaverOrder}
101
+ *
102
+ * @returns {promise} json 처리 결과
103
+ * @public
104
+ */
105
+ ship: iamportMethod({
106
+ method: 'POST',
107
+ command: null,
108
+ urlParam: 'imp_uid',
109
+ command2: 'naver/ship',
110
+ require: ['delivery_method', 'dispatched_at']
111
+ }),
112
+
113
+ /** method 생성
114
+ * 네이버페이 구매확인
115
+ * @see {@link https://api.iamport.kr/#!/naver/confirmNaverOrder}
116
+ *
117
+ * @returns {promise} json 처리 결과
118
+ * @public
119
+ */
120
+ confirm: iamportMethod({
121
+ method: 'POST',
122
+ command: null,
123
+ urlParam: 'imp_uid',
124
+ command2: 'naver/confirm'
125
+ }),
126
+
127
+ /** method 생성
128
+ * 네이버페이 취소 승인
129
+ * @see {@link https://api.iamport.kr/#!/naver/approveCancelNaverOrder}
130
+ *
131
+ * @returns {promise} json 처리 결과
132
+ * @public
133
+ */
134
+ approveCancel: iamportMethod({
135
+ method: 'POST',
136
+ command: null,
137
+ urlParam: 'imp_uid',
138
+ command2: 'naver/approve-cancel'
139
+ }),
140
+
141
+ /** method 생성
142
+ * 네이버페이 반품 승인
143
+ * @see {@link https://api.iamport.kr/#!/naver/approveReturnNaverOrder}
144
+ *
145
+ * @returns {promise} json 처리 결과
146
+ * @public
147
+ */
148
+ approveReturn: iamportMethod({
149
+ method: 'POST',
150
+ command: null,
151
+ urlParam: 'imp_uid',
152
+ command2: 'naver/approve-return'
153
+ }),
154
+
155
+ /** method 생성
156
+ * 네이버페이 취소 요청
157
+ * @see {@link https://api.iamport.kr/#!/naver/cancelNaverOrder}
158
+ *
159
+ * @returns {promise} json 처리 결과
160
+ * @public
161
+ */
162
+ cancel: iamportMethod({
163
+ method: 'POST',
164
+ command: null,
165
+ urlParam: 'imp_uid',
166
+ command2: 'naver/cancel'
167
+ }),
168
+
169
+ /** method 생성
170
+ * 네이버페이 반품 요청
171
+ * @see {@link https://api.iamport.kr/#!/naver/requestReturnNaverOrder}
172
+ *
173
+ * @returns {promise} json 처리 결과
174
+ * @public
175
+ */
176
+ requestReturn: iamportMethod({
177
+ method: 'POST',
178
+ command: null,
179
+ urlParam: 'imp_uid',
180
+ command2: 'naver/request-return',
181
+ require: ['delivery_method']
182
+ }),
183
+
184
+ /** method 생성
185
+ * 네이버페이 반품 거부
186
+ * @see {@link https://api.iamport.kr/#!/naver/rejectReturnNaverOrder}
187
+ *
188
+ * @returns {promise} json 처리 결과
189
+ * @public
190
+ */
191
+ rejectReturn: iamportMethod({
192
+ method: 'POST',
193
+ command: null,
194
+ urlParam: 'imp_uid',
195
+ command2: 'naver/reject-return',
196
+ require: ['memo']
197
+ }),
198
+
199
+ /** method 생성
200
+ * 네이버페이 반품 해결
201
+ * @see {@link https://api.iamport.kr/#!/naver/resolveReturnNaverOrder}
202
+ *
203
+ * @returns {promise} json 처리 결과
204
+ * @public
205
+ */
206
+ resolveReturn: iamportMethod({
207
+ method: 'POST',
208
+ command: null,
209
+ urlParam: 'imp_uid',
210
+ command2: 'naver/resolve-return'
211
+ }),
212
+
213
+ /** method 생성
214
+ * 네이버페이 반품 보류
215
+ * @see {@link https://api.iamport.kr/#!/naver/withholdReturnNaverOrder}
216
+ *
217
+ * @returns {promise} json 처리 결과
218
+ * @public
219
+ */
220
+ withholdReturn: iamportMethod({
221
+ method: 'POST',
222
+ command: null,
223
+ urlParam: 'imp_uid',
224
+ command2: 'naver/withhold-return',
225
+ require: ['memo']
226
+ }),
227
+
228
+ /** method 생성
229
+ * 네이버페이 교환 재발송 수거완료
230
+ * @see {@link https://api.iamport.kr/#!/naver/collectExchangedNaverOrder}
231
+ *
232
+ * @returns {promise} json 처리 결과
233
+ * @public
234
+ */
235
+ collectExchanged: iamportMethod({
236
+ method: 'POST',
237
+ command: null,
238
+ urlParam: 'imp_uid',
239
+ command2: 'naver/collect-exchanged'
240
+ }),
241
+
242
+ /** method 생성
243
+ * 네이버페이 교환 재발송 발송처리
244
+ * @see {@link https://api.iamport.kr/#!/naver/shipExchangedNaverOrder}
245
+ *
246
+ * @returns {promise} json 처리 결과
247
+ * @public
248
+ */
249
+ shipExchanged: iamportMethod({
250
+ method: 'POST',
251
+ command: null,
252
+ urlParam: 'imp_uid',
253
+ command2: 'naver/ship-exchanged',
254
+ require: ['delivery_method']
255
+ }),
256
+
257
+ /** method 생성
258
+ * 네이버페이 포인트 적립 요청
259
+ * @see {@link https://api.iamport.kr/#!/naver/pointNaverOrder}
260
+ *
261
+ * @returns {promise} json 처리 결과
262
+ * @public
263
+ */
264
+ point: iamportMethod({
265
+ method: 'POST',
266
+ command: null,
267
+ urlParam: 'imp_uid',
268
+ command2: 'naver/point'
269
+ })
270
+
271
+ });
272
+
273
+ module.exports = {
274
+ Naver: Naver,
275
+ NaverPayment: NaverPayment
276
+ };
@@ -0,0 +1,33 @@
1
+ /*!
2
+ * iamport
3
+ * MIT Licensed
4
+ */
5
+
6
+ 'use strict';
7
+
8
+ var resource = require('../resource'),
9
+ iamportMethod = resource.iamportMethod;
10
+
11
+ /**
12
+ * Module exports.
13
+ * @public
14
+ */
15
+ module.exports = resource.extend({
16
+
17
+ path: 'partners',
18
+
19
+ /** method 생성
20
+ * 파트너 정산 영수증을 발행합니다.
21
+ * @see {@link https://api.iamport.kr/#!/partners/issuePartnerReceipt}
22
+ *
23
+ * @returns {promise} json 영수증 정보
24
+ * @public
25
+ */
26
+ issueReceipt: iamportMethod({
27
+ method: 'POST',
28
+ command: 'receipts',
29
+ urlParam: 'imp_uid',
30
+ require: ['data']
31
+ })
32
+
33
+ });