1 package iby_fipayments_pkg as
2 /*$Header: ibyfipms.pls 120.4.12000000.2 2007/06/13 21:02:47 jleybovi ship $*/
3
4 /*
5 ** Procedure: createPayment.
6 ** Purpose: creates a payment for schedule.
7 ** Description: Check whether the payment request id is already sent or
8 ** not. if yes raise an error. Otherwise, check whether
9 ** user holds the specified instrument or not.
10 ** Check whether specified payee id exists or not.
11 ** If all the check are validated then create the
12 ** tangible, payment and request objects. Status of the payment
13 ** is marked as PENDING.
14 ** return the tid of the payments object.
15 */
16 procedure createPayment(i_ecappid in iby_trxn_summaries_all.ecappid%type,
17 i_payeeid in iby_trxn_summaries_all.payeeid%type,
18 i_instrid in iby_trxn_summaries_all.payerinstrid%type,
19 i_payerid in iby_trxn_summaries_all.payerid%type,
20 i_tangibleid in iby_trxn_summaries_all.tangibleid%type,
21 i_billamount in iby_trxn_summaries_all.amount%type,
22 i_billcurDef in iby_trxn_summaries_all.currencynamecode%type,
23 i_billAcct in iby_tangible.acctno%type,
24 i_billRefInfo in iby_tangible.refinfo%type,
25 i_billMemo in iby_tangible.memo%type,
26 i_billOrdermedium in iby_tangible.order_medium%TYPE,
27 i_billEftAuthMethod in iby_tangible.eft_auth_method%TYPE,
28 i_scheddate in iby_trxn_summaries_all.settledate%type,
29 i_reqtype in iby_trxn_summaries_all.reqtype%type,
30 i_reqdate in iby_trxn_summaries_all.reqdate%type,
31 i_bepid in iby_trxn_summaries_all.bepid%type,
32 i_bepkey in iby_trxn_summaries_all.bepkey%type,
33 i_pmtmethod in iby_trxn_summaries_all.paymentmethodname%type,
34 i_psreqId in iby_trxn_fi.psreqid%type,
35 i_nlslang in iby_trxn_summaries_all.nlslang%type,
36 i_splitId in iby_trxn_fi.splitId%type
37 DEFAULT 0,
38 i_org_id in iby_trxn_summaries_all.org_id%type,
39 i_org_type in iby_trxn_summaries_all.org_type%type,
40 i_bnfcryinstrid in iby_trxn_summaries_all.payeeinstrid%type,
41 i_custacctid in iby_trxn_summaries_all.cust_account_id%type,
42 i_acctsiteid in iby_trxn_summaries_all.acct_site_id%type,
43 i_acctsiteuseid in iby_trxn_summaries_all.acct_site_use_id%type,
44 i_profilecode in iby_trxn_summaries_all.process_profile_code%type,
45 io_tid in out nocopy iby_trxn_summaries_all.transactionid%type);
46 /*
47 ** Procedure: modifyPayment.
48 ** Purpose: modify the payment that matches the tid passed.
49 ** Description: Check whether the payment request id is already sent or
50 ** not. if yes raise an error. Otherwise, check whether
51 ** user holds the specified instrument or not.
52 ** Check whether specified payee id exists or not.
53 ** If all the check are validated then create the
54 ** tangible. Modify the payment object that payment id matched,
55 ** then create the request object.
56 */
57 procedure modifyPayment(i_ecappid in iby_ecapp.ecappid%type,
58 i_payeeid in iby_trxn_summaries_all.payeeid%type,
59 i_instrid in iby_trxn_summaries_all.payerinstrid%type,
60 i_payerid in iby_trxn_summaries_all.payerid%type,
61 i_tangibleid in iby_trxn_summaries_all.tangibleid%type,
62 i_billAmount in iby_trxn_summaries_all.amount%type,
63 i_billcurDef in iby_trxn_summaries_all.currencynamecode%type,
64 i_billAcct in iby_tangible.acctno%type,
65 i_billRefInfo in iby_tangible.refinfo%type,
66 i_billMemo in iby_tangible.memo%type,
67 i_billOrdermedium in iby_tangible.order_medium%TYPE,
68 i_billEftAuthMethod in iby_tangible.eft_auth_method%TYPE,
69 i_scheddate in iby_trxn_summaries_all.settledate%type,
70 i_reqtype in iby_trxn_summaries_all.reqtype%type,
71 i_reqdate in iby_trxn_summaries_all.reqdate%type,
72 i_bepid in iby_trxn_summaries_all.bepid%type,
73 i_bepkey in iby_trxn_summaries_all.bepkey%type,
74 i_pmtmethod in iby_trxn_summaries_all.paymentmethodname%type,
75 i_psreqId in iby_trxn_fi.psreqid%type,
76 i_nlslang in iby_trxn_summaries_all.nlslang%type,
77 i_tid in iby_trxn_summaries_all.transactionid%type,
78 i_org_id in iby_trxn_summaries_all.org_id%type);
79 /*
80 ** Procedure: deletePayment.
81 ** Purpose: Marks the payment whose id matches the tid passed as
82 ** 'CANCELLED'.
83 */
84 -- procedure deletePayment(i_ecappid in iby_ecapp.ecappid%type,
85 procedure deletePayment(i_tid in iby_trxn_summaries_all.transactionId%type);
86 /*
87 ** Procedure: requestExists..
88 ** Purpose: check if there is already arequest with same payeeid, tagible
89 ** id and request type. If it is already there then returns
90 ** true otherwise returns false.
91 */
92 Function requestExists(i_payeeid iby_trxn_summaries_all.payeeid%type,
93 i_tangibleid iby_trxn_summaries_all.tangibleid%type,
94 i_splitId in iby_trxn_fi.splitId%type,
95 i_reqtype iby_trxn_summaries_all.reqtype%type)
96 return boolean;
97 /*
98 ** Procedure: requestExists..
99 ** Purpose: check if there is already arequest with same tid
100 ** and request type. If it is already there then returns
101 ** true otherwise returns false.
102 */
103 Function requestExists(i_tid iby_trxn_summaries_all.transactionId%type,
104 i_reqtype iby_trxn_summaries_all.reqtype%type)
105 return boolean;
106
107 /*
108 * Procedure: checkInstrId
109 * Purpose: raise exception if instrid doesn't exist
110 *
111 *
112 */
113 procedure checkInstrId(i_instrid in iby_ext_bank_accounts_v.ext_bank_account_id%TYPE);
114
115 /*
116 * Procedure: setTrxnStatus
117 * Purpose: Modify the status of the transaction
118 *
119 */
120
121 procedure setTrxnStatus(i_tmid in iby_trxn_summaries_all.trxnmid%type,
122 i_status in iby_trxn_summaries_all.status%type);
123
124 /*
125 ** Procedure: createReturnPayment.
126 ** Purpose: Create the payment whose id matches the tid passed as
127 ** 'ORAPMTRETURN'.
128 */
129
130 procedure createReturnPayment(
131 i_tid in iby_trxn_summaries_all.transactionId%type,
132 i_currencycode in iby_trxn_summaries_all.currencynamecode%type,
133 i_amount in iby_trxn_summaries_all.amount%type,
134 io_trxnmid in out nocopy iby_trxn_summaries_all.trxnmid%type
135 );
136
137 /*
138 * Procedure: updateTrxn
139 * Purpose: Update the transaction status with the return results
140 *
141 */
142
143 procedure updateTrxn(
144 i_trxnmid in iby_trxn_summaries_all.trxnmid%type,
145 i_status in iby_trxn_summaries_all.status%type,
146 i_bepcode IN iby_trxn_summaries_all.BEPCode%TYPE,
147 i_bepmessage IN iby_trxn_summaries_all.BEPMessage%TYPE,
148 i_errorlocation IN iby_trxn_summaries_all.errorlocation%TYPE,
149 i_referenceCode IN iby_trxn_summaries_all.proc_reference_code%TYPE);
150 end iby_fipayments_pkg;