1 PACKAGE IBY_INSTRREG_PUB AUTHID CURRENT_USER AS
2 /*$Header: ibypregs.pls 120.11.12010000.5 2009/07/23 17:05:27 lmallick ship $*/
3 /*#
4 * The IBY_INSTRREG_PUB is the public interface for payment instrument
5 * registration in Oracle Payments and lets users add, modify, delete,
6 * and query registered payment instruments
7 *
8 *
9 * @rep:scope public
10 * @rep:product IBY
11 * @rep:displayname Payment Instrument Registration
12 * @rep:category BUSINESS_ENTITY IBY_CREDITCARD
13 * @rep:doccd iby120ig.pdf Implementing APIs, Oracle Payments Implementation Guide
14 */
15
16
17
18 -- module name used for the application debugging framework
19 --
20 G_DEBUG_MODULE CONSTANT VARCHAR2(100) := 'iby.plsql.IBY_INSTRREG_PUB';
21
22 -- results interface code; same as for IBY_PAYMENT_ADAPTER_PUB
23 -- since it returns the same codes from the engine
24 --
25 G_INTERFACE_CODE CONSTANT VARCHAR2(30) := 'PMT_ADAPTER';
26
27 ------------------------------------------------------------------------
28 -- Constants Declaration
29 ------------------------------------------------------------------------
30 C_INSTRTYPE_UNREG CONSTANT VARCHAR2(20) := 'UNREGISTERED';
31 C_INSTRTYPE_BANKACCT CONSTANT VARCHAR2(20) := 'BANKACCOUNT';
32 C_INSTRTYPE_CREDITCARD CONSTANT VARCHAR2(20) := 'CREDITCARD';
33 C_INSTRTYPE_PURCHASECARD CONSTANT VARCHAR2(20) := 'PURCHASECARD';
34
35 -------------------------------------------------------------------------
36 --**Defining all DataStructures required by the APIs**--
37 -- The following input and output PL/SQL record/table types are defined
38 -- to store the objects (entities) necessary for the Instrument Registration
39 -- PL/SQL APIs.
40 -------------------------------------------------------------------------
41
42 --INPUT and OUTPUT DataStructures
43 --1. Record Types
44
45
46 TYPE CreditCardInstr_rec_type IS RECORD (
47 Instr_Id NUMBER(15),
48 FIName VARCHAR2(80),
49 CC_Type VARCHAR2(80),
50 CC_Num VARCHAR2(80),
51 CC_ExpDate DATE,
52 Instrument_Type VARCHAR2(30),
53 Owner_Id NUMBER,
54 CC_HolderName VARCHAR2(80),
55 CC_HolderType VARCHAR2(80),
56 CC_Desc VARCHAR2(240),
57 Billing_Address_Id NUMBER,
58 Billing_Address1 VARCHAR2(80),
59 Billing_Address2 VARCHAR2(80),
60 Billing_Address3 VARCHAR2(80),
61 Billing_City VARCHAR2(80),
62 Billing_County VARCHAR2(80),
63 Billing_State VARCHAR2(80),
64 Billing_Country VARCHAR2(80),
65 Billing_PostalCode VARCHAR2(40),
66 Single_Use_Flag VARCHAR2(1),
67 Info_Only_Flag VARCHAR2(1),
68 Card_Purpose VARCHAR2(30),
69 Card_Description VARCHAR2(240),
70 Active_Flag VARCHAR2(1),
71 Inactive_Date DATE,
72 Attribute_category VARCHAR2(150),
73 Attribute1 VARCHAR2(150),
74 Attribute2 VARCHAR2(150),
75 Attribute3 VARCHAR2(150),
76 Attribute4 VARCHAR2(150),
77 Attribute5 VARCHAR2(150),
78 Attribute6 VARCHAR2(150),
79 Attribute7 VARCHAR2(150),
80 Attribute8 VARCHAR2(150),
81 Attribute9 VARCHAR2(150),
82 Attribute10 VARCHAR2(150),
83 Attribute11 VARCHAR2(150),
84 Attribute12 VARCHAR2(150),
85 Attribute13 VARCHAR2(150),
86 Attribute14 VARCHAR2(150),
87 Attribute15 VARCHAR2(150),
88 Attribute16 VARCHAR2(150),
89 Attribute17 VARCHAR2(150),
90 Attribute18 VARCHAR2(150),
91 Attribute19 VARCHAR2(150),
92 Attribute20 VARCHAR2(150),
93 Attribute21 VARCHAR2(150),
94 Attribute22 VARCHAR2(150),
95 Attribute23 VARCHAR2(150),
96 Attribute24 VARCHAR2(150),
97 Attribute25 VARCHAR2(150),
98 Attribute26 VARCHAR2(150),
99 Attribute27 VARCHAR2(150),
100 Attribute28 VARCHAR2(150),
101 Attribute29 VARCHAR2(150),
102 Attribute30 VARCHAR2(150),
103 Register_Invalid_Card VARCHAR2(1)
104 );
105
106 TYPE PurchaseCardInstr_rec_type IS RECORD (
107 Instr_Id NUMBER( 15 ),
108 FIName VARCHAR2(80),
109 PC_Type VARCHAR2(80),
110 PC_Num VARCHAR2(80),
111 PC_ExpDate DATE,
112 Instrument_Type VARCHAR2(30),
113 Owner_Id NUMBER,
114 PC_HolderName VARCHAR2(80),
115 PC_HolderType VARCHAR2(80),
116 PC_Subtype VARCHAR2(80),
117 PC_Desc VARCHAR2(240),
118 Billing_Address_Id NUMBER,
119 Billing_Address1 VARCHAR2(80),
120 Billing_Address2 VARCHAR2(80),
121 Billing_Address3 VARCHAR2(80),
122 Billing_City VARCHAR2(80),
123 Billing_County VARCHAR2(80),
124 Billing_State VARCHAR2(80),
125 Billing_Country VARCHAR2(80),
126 Billing_PostalCode VARCHAR2(40),
127 Single_Use_Flag VARCHAR2(1),
128 Info_Only_Flag VARCHAR2(1),
129 Card_Purpose VARCHAR2(30),
130 Active_Flag VARCHAR2(1),
131 Inactive_Date DATE,
132 Attribute_category VARCHAR2(150),
133 Attribute1 VARCHAR2(150),
134 Attribute2 VARCHAR2(150),
135 Attribute3 VARCHAR2(150),
136 Attribute4 VARCHAR2(150),
137 Attribute5 VARCHAR2(150),
138 Attribute6 VARCHAR2(150),
139 Attribute7 VARCHAR2(150),
140 Attribute8 VARCHAR2(150),
141 Attribute9 VARCHAR2(150),
142 Attribute10 VARCHAR2(150),
143 Attribute11 VARCHAR2(150),
144 Attribute12 VARCHAR2(150),
145 Attribute13 VARCHAR2(150),
146 Attribute14 VARCHAR2(150),
147 Attribute15 VARCHAR2(150),
148 Attribute16 VARCHAR2(150),
149 Attribute17 VARCHAR2(150),
150 Attribute18 VARCHAR2(150),
151 Attribute19 VARCHAR2(150),
152 Attribute20 VARCHAR2(150),
153 Attribute21 VARCHAR2(150),
154 Attribute22 VARCHAR2(150),
155 Attribute23 VARCHAR2(150),
156 Attribute24 VARCHAR2(150),
157 Attribute25 VARCHAR2(150),
158 Attribute26 VARCHAR2(150),
159 Attribute27 VARCHAR2(150),
160 Attribute28 VARCHAR2(150),
161 Attribute29 VARCHAR2(150),
162 Attribute30 VARCHAR2(150)
163 );
164
165 TYPE BankAcctInstr_rec_type IS RECORD (
166 Instr_Id NUMBER( 15 ),
167 FIName VARCHAR2(80),
168 Bank_ID VARCHAR2(25),
169 Bank_SwiftCode VARCHAR2(25),
170 Branch_ID VARCHAR2(30),
171 BankAcct_Type VARCHAR2(80),
172 BankAcct_Num VARCHAR2(80),
173 BankAcct_Checkdigits VARCHAR2(80),
174 BankAcct_HolderName VARCHAR2(80),
175 BankAcct_HolderType VARCHAR2(80),
176 Bank_Desc VARCHAR2(240),
177 Acct_HolderAddrId VARCHAR2(80),
178 Bank_AddrId VARCHAR2(80),
179 Bank_Address1 VARCHAR2(80),
180 Bank_Address2 VARCHAR2(80),
181 Bank_Address3 VARCHAR2(80),
182 Bank_City VARCHAR2(80),
183 Bank_County VARCHAR2(80),
184 Bank_State VARCHAR2(80),
185 Bank_Country VARCHAR2(80),
186 Bank_PostalCode VARCHAR2(40),
187 BankAcct_Currency VARCHAR2(40)
188 );
189
190 TYPE PmtInstr_rec_type IS RECORD (
191 InstrumentType Varchar2(80) := C_INSTRTYPE_UNREG,
192 CreditCardInstr CreditCardInstr_rec_type,
193 BankAcctInstr BankAcctInstr_rec_type,
194 PurchaseCardInstr PurchaseCardInstr_rec_type,
195 Encryption_Key VARCHAR2(200),
196 nls_lang_param VARCHAR2(200) -- Bug 6318167
197 );
198
199 TYPE Response_rec_type IS RECORD (
200 Status NUMBER,
201 ErrCode VARCHAR2(80),
202 ErrMessage VARCHAR2(255),
203 NLS_LANG VARCHAR2(80)
204 );
205
206 TYPE SecureCardInfoResp_rec_type IS RECORD (
207 Response Response_rec_type,
208 ExpiryDateSegmentId NUMBER,
209 MaskedChname VARCHAR2(100),
210 ChnameSegmentId NUMBER,
211 ChnameMaskSetting VARCHAR2(30),
212 ChnameUnmaskLength NUMBER
213 );
214
215 TYPE GetExpStatusResp_rec_type IS RECORD (
216 Response Response_rec_type,
217 Expired VARCHAR2(1)
218 );
219
220
221 --2. Table Types
222
223 TYPE CreditCard_tbl_type IS TABLE OF CreditCardInstr_rec_type
224 INDEX BY BINARY_INTEGER;
225
226 TYPE PurchaseCard_tbl_type IS TABLE OF PurchaseCardInstr_rec_type
227 INDEX BY BINARY_INTEGER;
228
229 TYPE BankAcct_tbl_type IS TABLE OF BankAcctInstr_rec_type
230 INDEX BY BINARY_INTEGER;
231
232
233
234 -------------------------------------------------------------------------------
235 -- API Signatures--
236 -------------------------------------------------------------------------------
237 -- 1. OraInstrAdd
238 -- Start of comments
239 -- API name : OraInstrAdd
240 -- Type : Public
241 -- Pre-reqs : None
242 -- Function : Adds new Payment Instruments to Payments.
243 -- Parameters :
244 -- IN : p_api_version IN NUMBER Required
245 -- p_init_msg_list IN VARCHAR2 Optional
246 -- p_commit IN VARCHAR2 Optional
247 -- p_validation_level IN NUMBER Optional
248 -- p_payer_id IN VARCHAR2 Required
249 -- p_pmtInstrRec IN PmtInstr_rec_type Required
250 --
251 -- OUT : x_return_status OUT VARCHAR2
252 -- x_msg_count OUT VARCHAR2
253 -- x_msg_data OUT NUMBER
254 -- x_instr_id OUT NUMBER
255 -- Version :
256 -- Current version 1.0
257 -- Previous version 1.0
258 -- Initial version 1.0
259 -- End of comments
260 -------------------------------------------------------------------------------
261
262 /*#
263 * The oraInstrAdd API Creates a new payment instrument.
264 *
265 * @param p_api_version version of the API; current version is 1.0
266 * @rep:paraminfo {@rep:required}
267 * @param p_init_msg_list standard API parameter; default as FND_API.G_FALSE
268 * @param p_commit standard API parameter; default as FND_API.G_TRUE
269 * @param p_validation_level standard API parameter; default as
270 * FND_API.G_VALID_LEVEL_FULL
271 * @rep:paraminfo {@rep:required}
272 * @param p_pmtInstrRec payment instrument record
273 * @rep:paraminfo {@rep:required}
274 * @param x_return_status standard API parameter - output; indicates the overall
275 * status of the API call
276 * @param x_msg_count standard API parameter - output; holds the number of
277 * messages in the API message list
278 * @param x_msg_data standard API parameter - output; If the number is one,
279 * then message data holds the message in an encoded format
280 * @param x_instr_id unique identifier for the newly created payment instrument
281 * @param x_result result code of the operation
282 *
283 * @rep:scope public
284 * @rep:displayname Create Payment Instrument
285 * @rep:category BUSINESS_ENTITY IBY_CREDITCARD
286 */
287
288
289 PROCEDURE OraInstrAdd
290 (
291 p_api_version IN NUMBER,
292 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
293 p_commit IN VARCHAR2 := FND_API.G_TRUE,
294 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
295 p_pmtInstrRec IN PmtInstr_rec_type,
296 x_return_status OUT NOCOPY VARCHAR2,
297 x_msg_count OUT NOCOPY NUMBER,
298 x_msg_data OUT NOCOPY VARCHAR2,
299 x_instr_id OUT NOCOPY NUMBER,
300 x_result OUT NOCOPY IBY_FNDCPT_COMMON_PUB.Result_rec_type
301 );
302
303
304 -------------------------------------------------------------------------------
305 -- 2. OraInstrMod
306 -- Start of comments
307 -- API name : OraInstrMod
308 -- Type : Public
309 -- Pre-reqs : None
310 -- Function : Modifies an existing payment instruments in Payments.
311 -- Parameters :
312 -- IN : p_api_version IN NUMBER Required
313 -- p_init_msg_list IN VARCHAR2 Optional
314 -- p_commit IN VARCHAR2 Optional
315 -- p_validation_level IN NUMBER Optional
316 -- p_payer_id IN VARCHAR2 Required
317 -- p_pmtInstrRec IN PmtInstr_rec_type Required
318 --
319 -- OUT : x_return_status OUT VARCHAR2
320 -- x_msg_count OUT VARCHAR2
321 -- x_msg_data OUT NUMBER
322 -- Version :
323 -- Current version 1.0
324 -- Previous version 1.0
325 -- Initial version 1.0
326 -- End of comments
327 -------------------------------------------------------------------------------
328
329 /*#
330 * The oraInstrMod API Modifies a payment instrument.
331 *
332 * @param p_api_version version of the API; current version is 1.0
333 * @rep:paraminfo {@rep:required}
334 * @param p_init_msg_list standard API parameter; default as FND_API.G_FALSE
335 * @param p_commit standard API parameter; default as FND_API.G_TRUE
336 * @param p_validation_level standard API parameter; default as
337 * FND_API.G_VALID_LEVEL_FULL
338 * @param p_payer_id payer identifier string
339 * @rep:paraminfo {@rep:required}
340 * @param p_pmtInstrRec payment instrument record. The Instr_Id is required.
341 * @rep:paraminfo {@rep:required}
342 * @param x_return_status standard API parameter - output; indicates the overall
343 * status of the API call
344 * @param x_msg_count standard API parameter - output; holds the number of
345 * messages in the API message list
346 * @param x_msg_data standard API parameter - output; if the number is one,
347 * then message data holds the message in an encoded format
348 * @param x_result result of the operation
349 *
350 * @rep:scope public
351 * @rep:displayname Modify Payment Instrument
352 * @rep:category BUSINESS_ENTITY IBY_CREDITCARD
353 */
354
355 PROCEDURE OraInstrMod
356 (p_api_version IN NUMBER,
357 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
358 p_commit IN VARCHAR2 := FND_API.G_TRUE,
359 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
360 p_payer_id IN VARCHAR2,
361 p_pmtInstrRec IN PmtInstr_rec_type,
362 x_return_status OUT NOCOPY VARCHAR2,
363 x_msg_count OUT NOCOPY NUMBER,
364 x_msg_data OUT NOCOPY VARCHAR2,
365 x_result OUT NOCOPY IBY_FNDCPT_COMMON_PUB.Result_rec_type
366 );
367
368
369 -------------------------------------------------------------------------------
370 -- 3. OraInstrDel
371 -- Start of comments
372 -- API name : OraInstrDel
373 -- Type : Public
374 -- Pre-reqs : None
375 -- Function : Deletes an existing payment instruments in Payments.
376 -- Parameters :
377 -- IN : p_api_version IN NUMBER Required
378 -- p_init_msg_list IN VARCHAR2 Optional
379 -- p_commit IN VARCHAR2 Optional
380 -- p_validation_level IN NUMBER Optional
381 -- p_payer_id IN VARCHAR2 Required
382 -- p_instr_id IN NUMBER Required
383 --
384 -- OUT : x_return_status OUT VARCHAR2
385 -- x_msg_count OUT VARCHAR2
386 -- x_msg_data OUT NUMBER
387 -- Version :
388 -- Current version 1.0
389 -- Previous version 1.0
390 -- Initial version 1.0
391 -- End of comments
392 -------------------------------------------------------------------------------
393
394 /*#
395 * The oraInstrDel API Deletes a payment instrument.
396 *
397 * @param p_api_version version of the API; current version is 1.0
398 * @rep:paraminfo {@rep:required}
399 * @param p_init_msg_list standard API parameter; default as FND_API.G_FALSE
400 * @param p_commit standard API parameter; default as FND_API.G_TRUE
401 * @param p_validation_level standard API parameter; default as
402 * FND_API.G_VALID_LEVEL_FULL
403 * @param p_payer_id payer identifier string
404 * @rep:paraminfo {@rep:required}
405 * @param p_instr_id payment instrument unique identifier
406 * @rep:paraminfo {@rep:required}
407 * @param x_return_status standard API parameter - output; indicates the overall
408 * status of the API call
409 * @param x_msg_count standard API parameter - output; holds the number of
410 * messages in the API message list
411 * @param x_msg_data standard API parameter - output; if the number is one,
412 * then message data holds the message in an encoded format
413 *
414 * @rep:scope public
415 * @rep:displayname Delete Payment Instrument
416 * @rep:category BUSINESS_ENTITY IBY_CREDITCARD
417 */
418
419 PROCEDURE OraInstrDel ( p_api_version IN NUMBER,
420 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
421 p_commit IN VARCHAR2 := FND_API.G_TRUE,
422 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
423 p_payer_id IN VARCHAR2,
424 p_instr_id IN NUMBER,
425 x_return_status OUT NOCOPY VARCHAR2,
426 x_msg_count OUT NOCOPY NUMBER,
427 x_msg_data OUT NOCOPY VARCHAR2
428 );
429
430 -------------------------------------------------------------------------------
431 -- 4. OraInstrInq
432 -- Start of comments
433 -- API name : OraInstrInq
434 -- Type : Public
435 -- Pre-reqs : None
436 -- Function : Returns all the payment instruments that a payer may have.
437 -- This is based on the payer_id only.
438 -- Parameters :
439 -- IN : p_api_version IN NUMBER Required
440 -- p_init_msg_list IN VARCHAR2 Optional
441 -- p_commit IN VARCHAR2 Optional
442 -- p_validation_level IN NUMBER Optional
443 -- p_payer_id IN VARCHAR2 Required
444 --
445 -- OUT : x_return_status OUT VARCHAR2
446 -- x_msg_count OUT VARCHAR2
447 -- x_msg_data OUT NUMBER
448 -- x_creditcard_tbl OUT CreditCard_tbl_type
449 -- x_purchasecard_tbl OUT PurchaseCard_tbl_type
450 -- x_bankacct_tbl OUT BankAcct_tbl_type
451 -- Version :
452 -- Current version 1.0
453 -- Previous version 1.0
454 -- Initial version 1.0
455 -- End of comments
456 -------------------------------------------------------------------------------
457
458 /*#
459 * The oraInstrInq API Queries payment instrument and returns all the
460 * payment instruments that a payer may have based on the payer_id.
461
462 * @param p_api_version version of the API; current version is 1.0
463 * @rep:paraminfo {@rep:required}
464 * @param p_init_msg_list standard API parameter; default as FND_API.G_FALSE
465 * @param p_commit standard API parameter; default as FND_API.G_TRUE
466 * @param p_validation_level standard API parameter; default as
467 * FND_API.G_VALID_LEVEL_FULL
468 * @param p_payer_id payer identifier string
469 * @rep:paraminfo {@rep:required}
470 * @param x_return_status standard API parameter - output; indicates the overall
471 * status of the API call
472 * @param x_msg_count standard API parameter - output; holds the number of
473 * messages in the API message list
474 * @param x_msg_data standard API parameter - output; if the number is one,
475 * then message data holds the message in an encoded format
476 * @param x_creditcard_tbl credit cards of the payer
477 * @param x_purchasecard_tbl purchase cards of the payer
478 * @param x_bankacct_tbl bank accounts of the payer
479 *
480 * @rep:scope public
481 * @rep:displayname Query Payment Instrument
482 * @rep:category BUSINESS_ENTITY IBY_CREDITCARD
483 */
484
485 PROCEDURE OraInstrInq ( p_api_version IN NUMBER,
486 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
487 p_commit IN VARCHAR2 := FND_API.G_TRUE,
488 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
489 p_payer_id IN VARCHAR2,
490 x_return_status OUT NOCOPY VARCHAR2,
491 x_msg_count OUT NOCOPY NUMBER,
492 x_msg_data OUT NOCOPY VARCHAR2,
493 x_creditcard_tbl OUT NOCOPY CreditCard_tbl_type,
494 x_purchasecard_tbl OUT NOCOPY PurchaseCard_tbl_type,
495 x_bankacct_tbl OUT NOCOPY BankAcct_tbl_type
496 );
497
498 -- 4.1 OraInstrInq
499 --
500 -- Overloaded version of above API that takes the system security key as
501 -- an argument in case an instrument is encrypted
502 --
503 -------------------------------------------------------------------------------
504 /*#
505 * The oraInstrInq API Queries the payment instrument and returns
506 * all the payment instruments that a payer may have based on the
507 * payer_id. This overloaded version also takes the system security
508 * key as an argument in case an instrument is encrypted.
509 *
510 * @param p_api_version version of the API; current version is 1.0
511 * @rep:paraminfo {@rep:required}
512 * @param p_init_msg_list standard API parameter; default as FND_API.G_FALSE
513 * @param p_commit standard API parameter; default as FND_API.G_TRUE
514 * @param p_validation_level standard API parameter; default as
515 * FND_API.G_VALID_LEVEL_FULL
516 * @param p_payer_id payer identifier string
517 * @rep:paraminfo {@rep:required}
518 * @param p_sys_sec_key instrument registration security key
519 * @param x_return_status standard API parameter - output; indicates the overall
520 * status of the API call
521 * @param x_msg_count standard API parameter - output; holds the number of
522 * messages in the API message list
523 * @param x_msg_data standard API parameter - output; if the number is one,
524 * then message data holds the message in an encoded format
525 * @param x_creditcard_tbl credit cards of the payer
526 * @param x_purchasecard_tbl purchase cards of the payer
527 * @param x_bankacct_tbl bank accounts of the payer
528 *
529 * @rep:scope public
530 * @rep:displayname Query Payment Instrument
531 * @rep:category BUSINESS_ENTITY IBY_CREDITCARD
532 */
533 PROCEDURE OraInstrInq ( p_api_version IN NUMBER,
534 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
535 p_commit IN VARCHAR2 := FND_API.G_TRUE,
536 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
537 p_payer_id IN VARCHAR2,
538 p_sys_sec_key IN VARCHAR2,
539 x_return_status OUT NOCOPY VARCHAR2,
540 x_msg_count OUT NOCOPY NUMBER,
541 x_msg_data OUT NOCOPY VARCHAR2,
542 x_creditcard_tbl OUT NOCOPY CreditCard_tbl_type,
543 x_purchasecard_tbl OUT NOCOPY PurchaseCard_tbl_type,
544 x_bankacct_tbl OUT NOCOPY BankAcct_tbl_type
545 );
546
547
548 -------------------------------------------------------------------------------
549 -- 5. OraInstrInq
550 -- Start of comments
551 -- API name : OraInstrInq
552 -- Type : Public
553 -- Pre-reqs : None
554 -- Function : Returns the payment instrument information for an instr_id.
555 -- This is based on the payer_id and instr_id.
556 -- Parameters :
557 -- IN : p_api_version IN NUMBER Required
558 -- p_init_msg_list IN VARCHAR2 Optional
559 -- p_commit IN VARCHAR2 Optional
560 -- p_validation_level IN NUMBER Optional
561 -- p_payer_id IN VARCHAR2 Required
562 -- p_instr_id IN NUMBER Required
563 --
564 -- OUT : x_return_status OUT VARCHAR2
565 -- x_msg_count OUT VARCHAR2
566 -- x_msg_data OUT NUMBER
567 -- x_pmtInstrRec OUT PmtInstr_rec_type
568 -- Version :
569 -- Current version 1.0
570 -- Previous version 1.0
571 -- Initial version 1.0
572 -- End of comments
573 -------------------------------------------------------------------------------
574
575 /*#
576 * The oraInstrInq API Queries payment instrument and returns the
577 * payment instrument information for an instr_id based on the
578 * payer_id and instr_id.
579 *
580 * @param p_api_version version of the API; current version is 1.0
581 * @rep:paraminfo {@rep:required}
582 * @param p_init_msg_list standard API parameter; default as FND_API.G_FALSE
583 * @param p_commit standard API parameter; default as FND_API.G_TRUE
584 * @param p_validation_level standard API parameter; default as
585 * FND_API.G_VALID_LEVEL_FULL
586 * @param p_payer_id payer identifier string
587 * @rep:paraminfo {@rep:required}
588 * @param p_instr_id payment instrument unique identifier
589 * @rep:paraminfo {@rep:required}
590 * @param x_return_status standard API parameter - output; indicates the overall
591 * status of the API call
592 * @param x_msg_count standard API parameter - output; holds the number of
593 * messages in the API message list
594 * @param x_msg_data standard API parameter - output; if the number is one,
595 * then message data holds the message in an encoded format
596 * @param x_pmtInstrRec payment instrument of the payer
597 *
598 * @rep:scope public
599 * @rep:displayname Query Payment Instrument
600 * @rep:category BUSINESS_ENTITY IBY_CREDITCARD
601 */
602 PROCEDURE OraInstrInq ( p_api_version IN NUMBER,
603 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
604 p_commit IN VARCHAR2 := FND_API.G_TRUE,
605 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
606 p_payer_id IN VARCHAR2,
607 p_instr_id IN NUMBER,
608 x_return_status OUT NOCOPY VARCHAR2,
609 x_msg_count OUT NOCOPY NUMBER,
610 x_msg_data OUT NOCOPY VARCHAR2,
611 x_pmtInstrRec OUT NOCOPY PmtInstr_rec_type
612 );
613
614 -- 5.1 OraInstrInq
615 --
616 -- Overloaded version of above API that takes the system security key as
617 -- an argument in case an instrument is encrypted
618 --
619 -------------------------------------------------------------------------------
620 /*#
621 * The oraInstrInq API Queries payment instrument and returns the
622 * payment instrument information for an instr_id based on the
623 * payer_id and instr_id.
624 * This overloaded version also takes the system security key
625 * as an argument in case the instrument is encrypted.
626 *
627 * @param p_api_version version of the API; current version is 1.0
628 * @rep:paraminfo {@rep:required}
629 * @param p_init_msg_list standard API parameter; default as FND_API.G_FALSE
630 * @param p_commit standard API parameter; default as FND_API.G_TRUE
631 * @param p_validation_level standard API parameter; default as
632 * FND_API.G_VALID_LEVEL_FULL
633 * @param p_payer_id payer identifier string
634 * @rep:paraminfo {@rep:required}
635 * @param p_instr_id payment instrument unique identifier
636 * @rep:paraminfo {@rep:required}
637 * @param p_sys_sec_key instrument registration security key
638 * @param x_return_status standard API parameter - output; indicates the overall
639 * status of the API call
640 * @param x_msg_count standard API parameter - output; holds the number of
641 * messages in the API message list
642 * @param x_msg_data standard API parameter - output; if the number is one,
643 * then message data holds the message in an encoded format
644 * @param x_pmtInstrRec payment instrument of the payer
645 *
646 * @rep:scope public
647 * @rep:displayname Query Payment Instrument
648 * @rep:category BUSINESS_ENTITY IBY_CREDITCARD
649 */
650
651 PROCEDURE OraInstrInq ( p_api_version IN NUMBER,
652 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
653 p_commit IN VARCHAR2 := FND_API.G_TRUE,
654 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
655 p_payer_id IN VARCHAR2,
656 p_instr_id IN NUMBER,
657 p_sys_sec_key IN VARCHAR2,
658 x_return_status OUT NOCOPY VARCHAR2,
659 x_msg_count OUT NOCOPY NUMBER,
660 x_msg_data OUT NOCOPY VARCHAR2,
661 x_pmtInstrRec OUT NOCOPY PmtInstr_rec_type
662 );
663
664
665 -------------------------------------------------------------------------------
666 /* UTILITY FUNCTION#1: ENCODE
667 This function returns a Base64 encoded string.
668 This function is being used temporarily as there is no standard function available
669 in 8i. It is available in 9i though. This should be discarded when used for 9i.
670 */
671 -------------------------------------------------------------------------------
672
673 FUNCTION encode(s IN VARCHAR2) RETURN VARCHAR2;
674
675 -------------------------------------------------------------------------------
676 /* UTILITY FUNCTION#2: DECODE
677 This function returns a decoded string for a Base64 encoded string.
678 This function is being used temporarily as there is no standard function available
679 in 8i. It is available in 9i though. This should be discarded when used for 9i.
680 */
681 -------------------------------------------------------------------------------
682 FUNCTION decode(s IN VARCHAR2) RETURN VARCHAR2;
683
684 -- Secures the sensitive attributes of a credit card and returns the
685 -- corresponding segment IDs.
686 -- At present, the card expiry date and the card holder name are
687 -- considered to be sensitive. So, this API will secure those fields.
688 --
689 -- param x_return_status indicates the return status of the procedure; 'S'
690 -- indicates success, 'U' indicates an error
691 -- param x_msg_count holds the number of error messages in the message list
692 -- param x_msg_data contains the error messages
693 -- param x_resp_rec entity that stores the attrbutes of the
694 -- response
695 -- scope: private
696
697 PROCEDURE SecureCardInfo
698 ( p_cardExpiryDate IN DATE,
699 p_expSegmentId IN NUMBER,
700 p_cardHolderName IN VARCHAR2,
701 p_chnameSegmentId IN NUMBER,
702 p_chnameMaskSetting IN VARCHAR2,
703 p_chnameUnmaskLength IN NUMBER,
704 x_return_status OUT NOCOPY VARCHAR2,
705 x_msg_count OUT NOCOPY NUMBER,
706 x_msg_data OUT NOCOPY VARCHAR2,
707 x_resp_rec OUT NOCOPY SecureCardInfoResp_rec_type
708 );
709
710 -- Gets the Expiration Status (Y/N) of a credit card w.r.t.
711 -- a particular date.
712 --
713 -- param x_return_status indicates the return status of the procedure; 'S'
714 -- indicates success, 'U' indicates an error
715 -- param x_msg_count holds the number of error messages in the message list
716 -- param x_msg_data contains the error messages
717 -- param x_resp_rec entity that stores the attrbutes of the
718 -- response
719 -- scope: private
720
721 PROCEDURE Get_Expiration_Status
722 ( p_instrid IN NUMBER,
723 p_inputDate IN DATE,
724 x_return_status OUT NOCOPY VARCHAR2,
725 x_msg_count OUT NOCOPY NUMBER,
726 x_msg_data OUT NOCOPY VARCHAR2,
727 x_resp_rec OUT NOCOPY GetExpStatusResp_rec_type
728 );
729
730
731
732
733 END IBY_INSTRREG_PUB;