DBA Data[Home] [Help]

PACKAGE: APPS.IBY_INSTRREG_PUB

Source


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