1 PACKAGE iby_transactioncc_pkg AS
2 /*$Header: ibytxccs.pls 120.26.12010000.5 2009/01/15 14:50:01 lmallick ship $ */
3
4 --
5 -- various trxn status constants
6 --
7 C_STATUS_SUCCESS CONSTANT NUMBER := 0;
8 C_STATUS_COMMUNICATION_ERROR CONSTANT NUMBER := 1;
9 C_STATUS_BEP_FAIL CONSTANT NUMBER := 5;
10 C_STATUS_REQUEST_PENDING CONSTANT NUMBER := 11;
11 C_STATUS_SCHED_IN_PROGRESS CONSTANT NUMBER := 12;
12 C_STATUS_REQUEST_SCHEDULED CONSTANT NUMBER := 13;
13 C_STATUS_VOICE_AUTH_REQD CONSTANT NUMBER := 21;
14 C_STATUS_OPEN_BATCHED CONSTANT NUMBER := 100;
15 C_STATUS_BATCH_TRANSITIONAL CONSTANT NUMBER := 109;
16 C_STATUS_BATCH_PENDING CONSTANT NUMBER := 111;
17
18 --
19 -- credit card req types
20 --
21 C_REQTYPE_BATCHCLOSE CONSTANT VARCHAR2(100) := 'ORAPMTCLOSEBATCH';
22 C_REQTYPE_PDC_BATCHCLOSE CONSTANT VARCHAR2(100) := 'ORAPMTPDCCLOSEBATCH';
23 C_REQTYPE_EFT_BATCHCLOSE CONSTANT VARCHAR2(100) := 'ORAPMTEFTCLOSEBATCH';
24
25 C_REQTYPE_CAPTURE CONSTANT VARCHAR2(100) := 'ORAPMTCAPTURE';
26 C_REQTYPE_CREDIT CONSTANT VARCHAR2(100) := 'ORAPMTCREDIT';
27 C_REQTYPE_RETURN CONSTANT VARCHAR2(100) := 'ORAPMTRETURN';
28 C_REQTYPE_REQUEST CONSTANT VARCHAR2(100) := 'ORAPMTREQ';
29 C_REQTYPE_BATCHREQ CONSTANT VARCHAR2(100) := 'ORAPMTBATCHREQ';
30
31 /*
32 * Record that stores the transaction attributes that are
33 * used as criteria for grouping.
34 */
35 TYPE trxnGroupCriteriaType IS RECORD (
36 trxn_id
37 IBY_TRXN_SUMMARIES_ALL.transactionid%TYPE,
38 process_profile_code
39 IBY_TRXN_SUMMARIES_ALL.process_profile_code%TYPE,
40 bep_key
41 IBY_TRXN_SUMMARIES_ALL.bepkey%TYPE,
42 org_id
43 IBY_TRXN_SUMMARIES_ALL.org_id%TYPE,
44 org_type
45 IBY_TRXN_SUMMARIES_ALL.org_type%TYPE,
46 curr_code
47 IBY_TRXN_SUMMARIES_ALL.currencynamecode%TYPE,
48 amount
49 IBY_TRXN_SUMMARIES_ALL.amount%TYPE,
50 legal_entity_id
51 IBY_TRXN_SUMMARIES_ALL.legal_entity_id%TYPE,
52 int_bank_acct_id
53 IBY_TRXN_SUMMARIES_ALL.payeeinstrid%TYPE,
54 settle_date
55 IBY_TRXN_SUMMARIES_ALL.settledate%TYPE,
56 group_by_org
57 IBY_FNDCPT_SYS_CC_PF_B.group_by_org%TYPE,
58 group_by_le
59 IBY_FNDCPT_SYS_CC_PF_B.group_by_legal_entity%TYPE,
60 group_by_int_bank_acct
61 IBY_FNDCPT_SYS_CC_PF_B.group_by_int_bank_account%TYPE,
62 group_by_curr
63 IBY_FNDCPT_SYS_CC_PF_B.group_by_settlement_curr%TYPE,
64 group_by_settle_date
65 IBY_FNDCPT_SYS_CC_PF_B.group_by_settlement_date%TYPE,
66 max_amt_curr
67 IBY_FNDCPT_SYS_CC_PF_B.limit_by_amt_curr%TYPE,
68 fx_rate_type
69 IBY_FNDCPT_SYS_CC_PF_B.limit_by_exch_rate_type%TYPE,
70 max_amt_limit
71 IBY_FNDCPT_SYS_CC_PF_B.limit_by_total_amt%TYPE,
72 num_trxns_limit
73 IBY_FNDCPT_SYS_CC_PF_B.limit_by_settlement_num%TYPE
74 );
75
76 /*
77 * Table of transaction grouping criteria.
78 */
79 TYPE trxnGroupCriteriaTabType IS TABLE OF trxnGroupCriteriaType
80 INDEX BY BINARY_INTEGER;
81
82 /*
83 * Record to store attributes of a batch that
84 * are influenced by transaction grouping rules.
85 *
86 * The IBY_BATCHES_ALL table will be updated with
87 * these attributes after transaction grouping.
88 */
89 TYPE batchAttrRecType IS RECORD (
90 mbatch_id
91 IBY_BATCHES_ALL.mbatchid%TYPE,
92 batch_id
93 IBY_BATCHES_ALL.batchid%TYPE,
94 profile_code
95 IBY_BATCHES_ALL.process_profile_code%TYPE,
96 bep_key
97 IBY_BATCHES_ALL.bepkey%TYPE,
98 org_id
99 IBY_BATCHES_ALL.org_id%TYPE,
100 org_type
101 IBY_BATCHES_ALL.org_type%TYPE,
102 le_id
103 IBY_BATCHES_ALL.legal_entity_id%TYPE,
104 int_bank_acct_id
105 IBY_BATCHES_ALL.payeeinstrid%TYPE,
106 curr_code
107 IBY_BATCHES_ALL.currencynamecode%TYPE,
108 settle_date
109 IBY_BATCHES_ALL.settledate%TYPE
110 );
111
112 /*
113 * Table of grouping based batch attributes.
114 */
115 TYPE batchAttrTabType IS TABLE OF batchAttrRecType
116 INDEX BY BINARY_INTEGER;
117
118
119 /*
120 * Record that holds the relationship between
121 * a batch and transaction.
122 */
123 TYPE trxnsInBatchRecType IS RECORD (
124 trxn_id
125 IBY_TRXN_SUMMARIES_ALL.transactionid%TYPE,
126 mbatch_id
127 IBY_TRXN_SUMMARIES_ALL.mbatchid%TYPE,
128 batch_id
129 IBY_TRXN_SUMMARIES_ALL.batchid%TYPE
130 );
131
132 /*
133 * Table of trxn-batch relationships.
134 */
135 TYPE trxnsInBatchTabType IS TABLE OF trxnsInBatchRecType
136 INDEX BY BINARY_INTEGER;
137
138 /*
139 * Table of mbatch ids.
140 *
141 * Maps to IBY_BATCHES_ALL.MBATCHID.
142 */
143 TYPE mBatchIdsTab IS TABLE OF IBY_BATCHES_ALL.mbatchid%TYPE
144 INDEX BY BINARY_INTEGER;
145
146
147 PROCEDURE validate_open_batch
148 (
149 p_bep_id IN iby_trxn_summaries_all.bepid%TYPE,
150 p_mbatch_id IN iby_batches_all.mbatchid%TYPE,
151 p_sec_key_on IN VARCHAR2,
152 x_trxn_count OUT NOCOPY iby_batches_all.numtrxns%TYPE,
153 x_batch_currency OUT NOCOPY iby_batches_all.currencynamecode%TYPE
154 );
155
156 PROCEDURE prepare_instr_data
157 (p_commit IN VARCHAR2,
158 p_sys_key IN iby_security_pkg.DES3_KEY_TYPE,
159 p_instrnum IN iby_trxn_summaries_all.instrnumber%TYPE,
160 p_instrtype IN iby_trxn_summaries_all.instrtype%TYPE,
161 x_instrnum OUT NOCOPY iby_trxn_summaries_all.instrnumber%TYPE,
162 x_instr_subtype OUT NOCOPY iby_trxn_summaries_all.instrsubtype%TYPE,
163 x_instr_hash OUT NOCOPY iby_trxn_summaries_all.instrnum_hash%TYPE,
164 x_range_id OUT NOCOPY iby_trxn_summaries_all.instrnum_sec_segment_id%TYPE,
165 x_instr_len OUT NOCOPY iby_trxn_summaries_all.instrnum_length%TYPE,
166 x_segment_id OUT NOCOPY iby_trxn_summaries_all.instrnum_sec_segment_id%TYPE
167 );
168
169 PROCEDURE insert_extensibility
170 (
171 p_trxnmid IN iby_trxn_summaries_all.trxnmid%TYPE,
172 p_commit IN VARCHAR2,
173 p_extend_names IN JTF_VARCHAR2_TABLE_100,
174 p_extend_vals IN JTF_VARCHAR2_TABLE_200
175 );
176
177 /* Inserts a new row into the IBY_TRANSACTIONS table. This method */
178 /* would be called every time a MIPP authorize operation is performed. */
179
180 PROCEDURE insert_auth_txn
181 (
182 ecapp_id_in IN iby_trxn_summaries_all.ecappid%TYPE,
183 req_type_in IN iby_trxn_summaries_all.ReqType%TYPE,
184 order_id_in IN iby_transactions_v.order_id%TYPE,
185 merchant_id_in IN iby_transactions_v.merchant_id%TYPE,
186 vendor_id_in IN iby_transactions_v.vendor_id%TYPE,
187 vendor_key_in IN iby_transactions_v.bepkey%TYPE,
188 amount_in IN iby_transactions_v.amount%TYPE,
189 currency_in IN iby_transactions_v.currency%TYPE,
190 status_in IN iby_transactions_v.status%TYPE,
191 time_in IN iby_transactions_v.time%TYPE DEFAULT sysdate,
192 payment_name_in IN iby_transactions_v.payment_name%TYPE,
193 payment_type_in IN iby_transactions_v.payment_type%TYPE,
194 trxn_type_in IN iby_transactions_v.trxn_type%TYPE DEFAULT NULL,
195 authcode_in IN iby_transactions_v.authcode%TYPE DEFAULT NULL,
196 referencecode_in IN iby_transactions_v.referencecode%TYPE DEFAULT NULL,
197 AVScode_in IN iby_transactions_v.AVScode%TYPE DEFAULT NULL,
198 acquirer_in IN iby_transactions_v.acquirer%TYPE DEFAULT NULL,
199 Auxmsg_in IN iby_transactions_v.Auxmsg%TYPE DEFAULT NULL,
200 vendor_code_in IN iby_transactions_v.vendor_code%TYPE DEFAULT NULL,
201 vendor_message_in IN iby_transactions_v.vendor_message%TYPE DEFAULT NULL,
202 error_location_in IN iby_transactions_v.error_location%TYPE DEFAULT NULL,
203 trace_number_in IN iby_transactions_v.TraceNumber%TYPE DEFAULT NULL,
204 org_id_in IN iby_trxn_summaries_all.org_id%type DEFAULT NULL,
205 billeracct_in IN iby_tangible.acctno%type,
206 refinfo_in IN iby_tangible.refinfo%type,
207 memo_in IN iby_tangible.memo%type,
208 order_medium_in IN iby_tangible.order_medium%TYPE,
209 eft_auth_method_in IN iby_tangible.eft_auth_method%TYPE,
210 payerinstrid_in IN iby_trxn_summaries_all.payerinstrid%type,
211 instrnum_in IN iby_trxn_summaries_all.instrnumber%type,
212 payerid_in IN iby_trxn_summaries_all.payerid%type,
213 instrtype_in IN iby_trxn_summaries_all.instrType%type,
214 cvv2result_in IN iby_trxn_core.CVV2Result%type,
215 master_key_in IN iby_security_pkg.DES3_KEY_TYPE,
216 subkey_seed_in IN RAW,
217 trxnref_in IN iby_trxn_summaries_all.trxnref%TYPE,
218 dateofvoiceauth_in IN iby_trxn_core.date_of_voice_authorization%TYPE,
219 instr_expirydate_in IN iby_trxn_core.instr_expirydate%TYPE,
220 instr_sec_val_in IN VARCHAR2,
221 card_subtype_in IN iby_trxn_core.card_subtype_code%TYPE,
222 card_data_level_in IN iby_trxn_core.card_data_level%TYPE,
223 instr_owner_name_in IN iby_trxn_core.instr_owner_name%TYPE,
224 instr_address_line1_in IN iby_trxn_core.instr_owner_address_line1%TYPE,
225 instr_address_line2_in IN iby_trxn_core.instr_owner_address_line2%TYPE,
226 instr_address_line3_in IN iby_trxn_core.instr_owner_address_line3%TYPE,
227 instr_city_in IN iby_trxn_core.instr_owner_city%TYPE,
228 instr_state_in IN iby_trxn_core.instr_owner_state_province%TYPE,
229 instr_country_in IN iby_trxn_core.instr_owner_country%TYPE,
230 instr_postalcode_in IN iby_trxn_core.instr_owner_postalcode%TYPE,
231 instr_phonenumber_in IN iby_trxn_core.instr_owner_phone%TYPE,
232 instr_email_in IN iby_trxn_core.instr_owner_email%TYPE,
233 pos_reader_cap_in IN iby_trxn_core.pos_reader_capability_code%TYPE,
234 pos_entry_method_in IN iby_trxn_core.pos_entry_method_code%TYPE,
235 pos_card_id_method_in IN iby_trxn_core.pos_id_method_code%TYPE,
236 pos_auth_source_in IN iby_trxn_core.pos_auth_source_code%TYPE,
237 reader_data_in IN iby_trxn_core.reader_data%TYPE,
238 extend_names_in IN JTF_VARCHAR2_TABLE_100,
239 extend_vals_in IN JTF_VARCHAR2_TABLE_200,
240 debit_network_code_in IN iby_trxn_core.debit_network_code%TYPE,
241 surcharge_amount_in IN iby_trxn_core.surcharge_amount%TYPE,
242 proc_tracenumber_in IN iby_trxn_core.proc_tracenumber%TYPE,
243 transaction_id_out OUT NOCOPY iby_trxn_summaries_all.TransactionID%TYPE,
244 transaction_mid_out OUT NOCOPY iby_trxn_summaries_all.trxnmid%TYPE,
245 org_type_in IN iby_trxn_summaries_all.org_type%TYPE,
246 payment_channel_code_in IN iby_trxn_summaries_all.payment_channel_code%TYPE,
247 factored_flag_in IN iby_trxn_summaries_all.factored_flag%TYPE,
248 process_profile_code_in IN iby_trxn_summaries_all.process_profile_code%TYPE,
249 sub_key_id_in IN iby_trxn_summaries_all.sub_key_id%TYPE,
250 voiceAuthFlag_in IN iby_trxn_core.voiceauthflag%TYPE
251 );
252
253
254 /* Inserts a new row into the IBY_TRANSACTIONS table. This method */
255 /* would be called every time a MIPP capture, credit, return, or void */
256 /* operation is performed. */
257
258
259 PROCEDURE insert_other_txn
260 (
261 ecapp_id_in IN iby_trxn_summaries_all.ECAPPID%TYPE,
262 req_type_in IN iby_trxn_summaries_all.ReqType%TYPE,
263 order_id_in IN iby_transactions_v.order_id%TYPE,
264 merchant_id_in IN iby_transactions_v.merchant_id%TYPE,
265 vendor_id_in IN iby_transactions_v.vendor_id%TYPE,
266 vendor_key_in IN iby_transactions_v.bepkey%TYPE,
267 status_in IN iby_transactions_v.status%TYPE,
268 time_in IN iby_transactions_v.time%TYPE DEFAULT sysdate,
269 payment_type_in IN iby_transactions_v.payment_type%TYPE,
270 payment_name_in IN iby_transactions_v.payment_name%TYPE DEFAULT NULL,
271 trxn_type_in IN iby_transactions_v.trxn_type%TYPE DEFAULT NULL,
272 amount_in IN iby_transactions_v.amount%TYPE DEFAULT NULL,
273 currency_in IN iby_transactions_v.currency%TYPE DEFAULT NULL,
274 referencecode_in IN iby_transactions_v.referencecode%TYPE DEFAULT NULL,
275 vendor_code_in IN iby_transactions_v.vendor_code%TYPE DEFAULT NULL,
276 vendor_message_in IN iby_transactions_v.vendor_message%TYPE DEFAULT NULL,
277 error_location_in IN iby_transactions_v.error_location%TYPE DEFAULT NULL,
278 trace_number_in IN iby_transactions_v.TraceNumber%TYPE DEFAULT NULL,
279 org_id_in IN iby_trxn_summaries_all.org_id%type DEFAULT NULL,
280 billeracct_in IN iby_tangible.acctno%type,
281 refinfo_in IN iby_tangible.refinfo%type,
282 memo_in IN iby_tangible.memo%type,
283 order_medium_in IN iby_tangible.order_medium%TYPE,
284 eft_auth_method_in IN iby_tangible.eft_auth_method%TYPE,
285 payerinstrid_in IN iby_trxn_summaries_all.payerinstrid%type,
286 instrnum_in IN iby_trxn_summaries_all.instrnumber%type,
287 payerid_in IN iby_trxn_summaries_all.payerid%type,
288 master_key_in IN iby_security_pkg.DES3_KEY_TYPE,
289 subkey_seed_in IN RAW,
290 trxnref_in IN iby_trxn_summaries_all.trxnref%TYPE,
291 instr_expirydate_in IN iby_trxn_core.instr_expirydate%TYPE,
292 card_subtype_in IN iby_trxn_core.card_subtype_code%TYPE,
293 instr_owner_name_in IN iby_trxn_core.instr_owner_name%TYPE,
294 instr_address_line1_in IN iby_trxn_core.instr_owner_address_line1%TYPE,
295 instr_address_line2_in IN iby_trxn_core.instr_owner_address_line2%TYPE,
296 instr_address_line3_in IN iby_trxn_core.instr_owner_address_line3%TYPE,
297 instr_city_in IN iby_trxn_core.instr_owner_city%TYPE,
298 instr_state_in IN iby_trxn_core.instr_owner_state_province%TYPE,
299 instr_country_in IN iby_trxn_core.instr_owner_country%TYPE,
300 instr_postalcode_in IN iby_trxn_core.instr_owner_postalcode%TYPE,
301 instr_phonenumber_in IN iby_trxn_core.instr_owner_phone%TYPE,
302 instr_email_in IN iby_trxn_core.instr_owner_email%TYPE,
303 extend_names_in IN JTF_VARCHAR2_TABLE_100,
304 extend_vals_in IN JTF_VARCHAR2_TABLE_200,
305 transaction_id_in_out IN OUT NOCOPY iby_trxn_summaries_all.TransactionID%TYPE,
306 transaction_mid_out OUT NOCOPY iby_trxn_summaries_all.trxnmid%TYPE,
307 org_type_in IN iby_trxn_summaries_all.org_type%TYPE,
308 payment_channel_code_in IN iby_trxn_summaries_all.payment_channel_code%TYPE,
309 factored_flag_in IN iby_trxn_summaries_all.factored_flag%TYPE,
310 settlement_date_in IN iby_trxn_summaries_all.settledate%TYPE,
311 settlement_due_date_in IN iby_trxn_summaries_all.settlement_due_date%TYPE
312 );
313
314
315 /* Inserts a row into the iby_transaction table if auth, capture, */
316 /* return, credit, and void timeout */
317
318 PROCEDURE insert_timeout_txn
319 (
320 req_type_in IN iby_trxn_summaries_all.ReqType%TYPE,
324 vendor_key_in IN iby_transactions_v.bepkey%TYPE,
321 order_id_in IN iby_transactions_v.order_id%TYPE,
322 merchant_id_in IN iby_transactions_v.merchant_id%TYPE,
323 vendor_id_in IN iby_transactions_v.vendor_id%TYPE,
325 ecapp_id_in IN iby_trxn_summaries_all.ecappid%TYPE,
326 time_in IN iby_transactions_v.time%TYPE DEFAULT sysdate,
327 status_in IN iby_transactions_v.status%TYPE,
328 org_id_in IN iby_trxn_summaries_all.org_id%type DEFAULT NULL,
329 amount_in IN iby_tangible.amount%type,
330 currency_in IN iby_tangible.currencynamecode%type,
331 billeracct_in IN iby_tangible.acctno%type,
332 refinfo_in IN iby_tangible.refinfo%type,
333 memo_in IN iby_tangible.memo%type,
334 order_medium_in IN iby_tangible.order_medium%TYPE,
335 eft_auth_method_in IN iby_tangible.eft_auth_method%TYPE,
336 payerinstrid_in IN iby_trxn_summaries_all.payerinstrid%type,
337 instrnum_in IN iby_trxn_summaries_all.instrnumber%type,
338 payerid_in IN iby_trxn_summaries_all.payerid%type,
339 instrtype_in IN iby_trxn_summaries_all.instrType%type,
340 master_key_in IN iby_security_pkg.DES3_KEY_TYPE,
341 subkey_seed_in IN RAW,
342 trxnref_in IN iby_trxn_summaries_all.trxnref%TYPE,
343 transaction_id_out OUT NOCOPY iby_trxn_summaries_all.TransactionID%TYPE,
344 transaction_mid_out OUT NOCOPY iby_trxn_summaries_all.trxnmid%TYPE,
345 trxntypeid_in IN iby_trxn_summaries_all.trxntypeid%TYPE,
346 org_type_in IN iby_trxn_summaries_all.org_type%TYPE,
347 payment_channel_code_in IN iby_trxn_summaries_all.payment_channel_code%TYPE,
348 factored_flag_in IN iby_trxn_summaries_all.factored_flag%TYPE
349 );
350
351
352 /* Checks if a row exists for a set of parameters */
353 /* This function is used by querybatch and query transaction */
354 /* procedures before inserting a new row into the transactions */
355 /* table */
356
357 FUNCTION checkrows
358 (order_id_in IN iby_transactions_v.order_id%TYPE,
359 merchant_id_in IN iby_transactions_v.merchant_id%TYPE,
360 vendor_id_in IN iby_transactions_v.vendor_id%TYPE,
361 status_in IN iby_transactions_v.status%TYPE,
362 trxn_type_in IN iby_transactions_v.trxn_type%TYPE)
363 RETURN number;
364
365
366
367 /*
368 * Inserts a row about batch status into iby_batches_all. This will
369 * be called for link error, timeout error or other batch status with
370 * gateway payment systems. For processor payment systems, this will
371 * create a new batch and associate all trxns in the current, unnamed
372 * open batch with it.
373 */
374 PROCEDURE insert_batch_status
375 (merch_batchid_in IN iby_batches_all.batchid%TYPE,
376 merchant_id_in IN iby_batches_all.payeeid%TYPE,
377 vendor_id_in IN iby_batches_all.bepid%TYPE,
378 vendor_key_in IN iby_batches_all.bepkey%TYPE,
379 pmt_type_in IN iby_batches_all.paymentmethodname%TYPE,
380 status_in IN iby_batches_all.batchstatus%TYPE,
381 time_in IN iby_batches_all.batchclosedate%TYPE DEFAULT SYSDATE,
382 viby_batchid_in IN iby_batches_all.vpsbatchid%TYPE,
383 currency_in IN iby_batches_all.currencynamecode%TYPE DEFAULT NULL,
384 numtrxns_in IN iby_batches_all.NumTrxns%TYPE DEFAULT NULL,
385 batchstate_in IN iby_batches_all.BatchStateid%TYPE DEFAULT NULL,
386 batchtotal_in IN iby_batches_all.BatchTotal%TYPE DEFAULT NULL,
387 saleamount_in IN iby_batches_all.BatchSales%TYPE DEFAULT NULL,
388 cramount_in IN iby_batches_all.BatchCredit%TYPE DEFAULT NULL,
389 gwid_in IN iby_batches_all.GWBatchID%TYPE DEFAULT NULL,
390 vendor_code_in IN iby_batches_all.bepcode%TYPE DEFAULT NULL,
391 vendor_message_in IN iby_batches_all.bepmessage%TYPE DEFAULT NULL,
392 error_location_in IN iby_batches_all.errorlocation%TYPE DEFAULT NULL,
393 terminal_id_in IN iby_batches_all.TerminalId%TYPE DEFAULT NULL,
394 acquirer_id_in IN iby_batches_all.Acquirer%TYPE DEFAULT NULL,
395 org_id_in IN iby_trxn_summaries_all.org_id%type DEFAULT NULL,
396 req_type_in IN iby_batches_all.reqtype%type,
397 sec_key_present_in IN VARCHAR2,
398 mbatchid_out OUT NOCOPY iby_batches_all.mbatchid%type
399 );
400
401 /*
402 * Performs batch close operation by grouping pending transactions.
403 * This method can generate multiple mbatchids for a single
404 * batch close call depending upon how many batches are
405 * generated by applying grouping rules.
406 */
407 PROCEDURE insert_batch_status_new
408 (merch_batchid_in IN iby_batches_all.batchid%TYPE,
409 profile_code_in IN iby_batches_all.process_profile_code%TYPE,
410 merchant_id_in IN iby_batches_all.payeeid%TYPE,
411 vendor_id_in IN iby_batches_all.bepid%TYPE,
412 vendor_key_in IN iby_batches_all.bepkey%TYPE,
413 pmt_type_in IN iby_batches_all.paymentmethodname%TYPE,
414 status_in IN iby_batches_all.batchstatus%TYPE,
418 numtrxns_in IN iby_batches_all.NumTrxns%TYPE,
415 time_in IN iby_batches_all.batchclosedate%TYPE,
416 viby_batchid_in IN iby_batches_all.vpsbatchid%TYPE ,
417 currency_in IN iby_batches_all.currencynamecode%TYPE,
419 batchstate_in IN iby_batches_all.BatchStateid%TYPE,
420 batchtotal_in IN iby_batches_all.BatchTotal%TYPE,
421 saleamount_in IN iby_batches_all.BatchSales%TYPE,
422 cramount_in IN iby_batches_all.BatchCredit%TYPE,
423 gwid_in IN iby_batches_all.GWBatchID%TYPE,
424 vendor_code_in IN iby_batches_all.BEPcode%TYPE,
425 vendor_message_in IN iby_batches_all.BEPmessage%TYPE,
426 error_location_in IN iby_batches_all.errorlocation%TYPE,
427 terminal_id_in IN iby_batches_all.TerminalId%TYPE,
428 acquirer_id_in IN iby_batches_all.Acquirer%TYPE,
429 org_id_in IN iby_trxn_summaries_all.org_id%TYPE,
430 req_type_in IN iby_batches_all.reqtype%TYPE,
431 sec_key_present_in IN VARCHAR2,
432 acct_profile_in IN iby_batches_all.process_profile_code%TYPE,
433 instr_type_in IN iby_batches_all.instrument_type%TYPE,
434 br_disputed_flag_in IN iby_batches_all.br_disputed_flag%TYPE,
435 f_pmt_channel_in IN iby_trxn_summaries_all.
436 payment_channel_code%TYPE,
437 f_curr_in IN iby_trxn_summaries_all.
438 currencynamecode%TYPE,
439 f_settle_date IN iby_trxn_summaries_all.
440 settledate%TYPE,
441 f_due_date IN iby_trxn_summaries_all.
442 settlement_due_date%TYPE,
443 f_maturity_date IN iby_trxn_summaries_all.
444 br_maturity_date%TYPE,
445 f_instr_type IN iby_trxn_summaries_all.
446 instrtype%TYPE,
447 mbatch_ids_out OUT NOCOPY JTF_NUMBER_TABLE,
448 batch_ids_out OUT NOCOPY JTF_VARCHAR2_TABLE_100
449 );
450
451 /* Overloaded form of the above API. This one takes an
452 Array of user profiles instead of a single one.
453 */
454 PROCEDURE insert_batch_status_new
455 (merch_batchid_in IN iby_batches_all.batchid%TYPE,
456 profile_code_array IN JTF_VARCHAR2_TABLE_100,
457 merchant_id_in IN iby_batches_all.payeeid%TYPE,
458 vendor_id_in IN iby_batches_all.bepid%TYPE,
459 vendor_key_in IN iby_batches_all.bepkey%TYPE,
460 pmt_type_in IN iby_batches_all.paymentmethodname%TYPE,
461 status_in IN iby_batches_all.batchstatus%TYPE,
462 time_in IN iby_batches_all.batchclosedate%TYPE,
463 viby_batchid_in IN iby_batches_all.vpsbatchid%TYPE ,
464 currency_in IN iby_batches_all.currencynamecode%TYPE,
465 numtrxns_in IN iby_batches_all.NumTrxns%TYPE,
466 batchstate_in IN iby_batches_all.BatchStateid%TYPE,
467 batchtotal_in IN iby_batches_all.BatchTotal%TYPE,
468 saleamount_in IN iby_batches_all.BatchSales%TYPE,
469 cramount_in IN iby_batches_all.BatchCredit%TYPE,
470 gwid_in IN iby_batches_all.GWBatchID%TYPE,
471 vendor_code_in IN iby_batches_all.BEPcode%TYPE,
472 vendor_message_in IN iby_batches_all.BEPmessage%TYPE,
473 error_location_in IN iby_batches_all.errorlocation%TYPE,
474 terminal_id_in IN iby_batches_all.TerminalId%TYPE,
475 acquirer_id_in IN iby_batches_all.Acquirer%TYPE,
476 org_id_in IN iby_trxn_summaries_all.org_id%TYPE,
477 req_type_in IN iby_batches_all.reqtype%TYPE,
478 sec_key_present_in IN VARCHAR2,
479 acct_profile_in IN iby_batches_all.process_profile_code%TYPE,
480 instr_type_in IN iby_batches_all.instrument_type%TYPE,
481 br_disputed_flag_in IN iby_batches_all.br_disputed_flag%TYPE,
482 f_pmt_channel_in IN iby_trxn_summaries_all.
483 payment_channel_code%TYPE,
484 f_curr_in IN iby_trxn_summaries_all.
485 currencynamecode%TYPE,
486 f_settle_date IN iby_trxn_summaries_all.
487 settledate%TYPE,
488 f_due_date IN iby_trxn_summaries_all.
489 settlement_due_date%TYPE,
490 f_maturity_date IN iby_trxn_summaries_all.
491 br_maturity_date%TYPE,
492 f_instr_type IN iby_trxn_summaries_all.
493 instrtype%TYPE,
494 mbatch_ids_out OUT NOCOPY JTF_NUMBER_TABLE,
495 batch_ids_out OUT NOCOPY JTF_VARCHAR2_TABLE_100
496 );
497
498
499
500 /* Inserts the transaction record for the closebatch operation */
501
502 PROCEDURE insert_batch_txn
503 (ecapp_id_in IN iby_trxn_summaries_all.ECAPPID%TYPE,
504 order_id_in IN iby_transactions_v.order_id%TYPE,
505 merchant_id_in IN iby_transactions_v.merchant_id%TYPE,
506 merch_batchid_in IN iby_transactions_v.MerchBatchID%TYPE,
507 vendor_id_in IN iby_transactions_v.vendor_id%TYPE,
508 vendor_key_in IN iby_transactions_v.bepkey%TYPE,
509 status_in IN iby_transactions_v.status%TYPE,
510 time_in IN iby_transactions_v.time%TYPE
514 DEFAULT NULL,
511 DEFAULT sysdate,
512 trxn_type_in IN iby_transactions_v.trxn_type%TYPE,
513 vendor_code_in IN iby_transactions_v.vendor_code%TYPE
515 vendor_message_in IN iby_transactions_v.vendor_message%TYPE
516 DEFAULT NULL,
517 error_location_in IN iby_transactions_v.error_location%TYPE
518 DEFAULT NULL,
519 trace_number_in IN iby_transactions_v.TraceNumber%TYPE
520 DEFAULT NULL,
521
522 org_id_in IN iby_trxn_summaries_all.org_id%type
523 DEFAULT NULL,
524 transaction_id_out OUT NOCOPY iby_trxn_summaries_all.TransactionID%TYPE);
525
526
527 /* Inserts transaction record for transaction query operation */
528
529
530 PROCEDURE insert_query_txn
531 (transaction_id_in IN iby_trxn_summaries_all.TransactionID%TYPE,
532 order_id_in IN iby_transactions_v.order_id%TYPE,
533 merchant_id_in IN iby_transactions_v.merchant_id%TYPE,
534 vendor_id_in IN iby_transactions_v.vendor_id%TYPE,
535 vendor_key_in IN iby_transactions_v.bepkey%TYPE,
536 status_in IN iby_transactions_v.status%TYPE,
537 time_in IN iby_transactions_v.time%TYPE DEFAULT sysdate,
538 trxn_type_in IN iby_transactions_v.trxn_type%TYPE,
539 amount_in IN iby_transactions_v.amount%TYPE DEFAULT NULL,
540 currency_in IN iby_transactions_v.currency%TYPE DEFAULT NULL,
541 payment_name_in IN iby_transactions_v.payment_name%TYPE DEFAULT NULL,
542 authcode_in IN iby_transactions_v.authcode%TYPE DEFAULT NULL,
543 referencecode_in IN iby_transactions_v.referencecode%TYPE DEFAULT NULL,
544 avscode_in IN iby_transactions_v.AVScode%TYPE DEFAULT NULL,
545 acquirer_in IN iby_transactions_v.acquirer%TYPE DEFAULT NULL,
546 auxmsg_in IN iby_transactions_v.Auxmsg%TYPE DEFAULT NULL,
547 vendor_code_in IN iby_transactions_v.vendor_code%TYPE DEFAULT NULL,
548 vendor_message_in IN iby_transactions_v.vendor_message%TYPE DEFAULT NULL,
549 error_location_in IN iby_transactions_v.error_location%TYPE DEFAULT NULL,
550 trace_number_in IN iby_transactions_v.TraceNumber%TYPE DEFAULT NULL,
551 org_id_in IN iby_trxn_summaries_all.org_id%type DEFAULT NULL,
552 ecappid_in IN iby_ecapp.ecappid%type,
553 req_type_in IN iby_trxn_summaries_all.reqtype%type);
554
555
556
557 /*
558 ** Procedure: getMBatchId
559 ** Purpose: retrieve mBatchid from iby_Batch table based on Batchid
560 */
561 Procedure getMBatchId(i_Batchid in iby_Batches_all.Batchid%type,
562 i_Payeeid in iby_Batches_all.Payeeid%type,
563 o_mBatchid out nocopy iby_Batches_all.mBatchid%type);
564
565 /*
566 ** Function: getTID
567 ** Purpose: get the next trxnid availabe, make sure there is only one TID
568 ** per tangibleid, payeeid combination
569 */
570 Function getTID(i_payeeid in iby_payee.payeeid%type,
571 i_tangibleid in iby_tangible.tangibleid%type)
572 return number;
573
574
575 /*
576 ** Function: getTIDUniqueCheck
577 ** Purpose: If there is already a trxnid available for a
578 ** tangibleid, payeeid combination this method
579 ** returns -1, else it returns a unique trxnid.
580 */
581 Function getTIDUniqueCheck(i_payeeid in iby_payee.payeeid%type,
582 i_tangibleid in iby_tangible.tangibleid%type)
583 return number;
584
585
586 Function getNumPendingTrxns(i_payeeid in iby_payee.payeeid%type,
587 i_tangibleid in iby_tangible.tangibleid%type,
588 i_reqtype in iby_trxn_summaries_all.reqtype%type)
589 return number;
590
591 Function getOrgId(i_tid in iby_trxn_summaries_all.transactionid%type)
592 return number;
593
594 /*
595 * USE: Updates the status of trxns stored in an iPayment internal batch.
596 * This must be done after a batch close so that they are not sent
597 * multiple times.
598 *
599 * ARGS:
600 * 1. the merchant/payee id
601 * 2. the bep/payment system id
602 * 3. the bep key
603 * 4. the old status; used to filter which trxns are in a batch
604 * 5. the new status to which all trxns should be set
605 * 6. the id of the batch to which the trxns will belong
606 */
607 PROCEDURE updateBatchedTrxns
608 (
609 payeeid_in IN iby_trxn_summaries_all.payeeid%TYPE,
610 bepid_in IN iby_trxn_summaries_all.bepid%TYPE,
611 bepkey_in IN iby_trxn_summaries_all.bepkey%TYPE,
612 oldstatus_in IN iby_trxn_summaries_all.status%TYPE,
613 newstatus_in IN iby_trxn_summaries_all.status%TYPE,
614 oldbatchid_in IN iby_trxn_summaries_all.batchid%TYPE,
615 newbatchid_in IN iby_trxn_summaries_all.batchid%TYPE
616 );
617
618 /*
619 * USE: Updates a batched trxn based on batch query values.
620 *
621 * ARGS:
622 * 1. the merchant/payee id
623 * 2. the order tangible id of the trxn
624 * 3. the trxn type id of the trxn
625 * 4. the id of the batch to which the trxn belongs
626 * 5. the new status of the trxn
627 * 6. the final BEP code for the trxn
628 * 7. the final BEP message for the trxn
629 * 8. error location for the trxn
630 *
631 * OUTS:
635 * For all parameters that default to null- if not
632 * 9. the trxnid of the given transaction
633 *
634 * NOTES:
636 * set then the applicable row in the table will not be updated
637 */
638 PROCEDURE updateBatchQueryTrxn
639 (
640 payeeid_in IN iby_trxn_summaries_all.payeeid%TYPE,
641 orderid_in IN iby_trxn_summaries_all.batchid%TYPE,
642 trxn_type_in IN iby_trxn_summaries_all.trxntypeid%TYPE,
643 batchid_in IN iby_trxn_summaries_all.batchid%TYPE,
644 status_in IN iby_trxn_summaries_all.status%TYPE,
645 bep_code_in IN iby_trxn_summaries_all.bepcode%TYPE DEFAULT NULL,
646 bep_msg_in IN iby_trxn_summaries_all.bepmessage%TYPE DEFAULT NULL,
647 error_loc_in IN iby_trxn_summaries_all.errorlocation%TYPE DEFAULT NULL,
648 trxnid_out OUT NOCOPY iby_trxn_summaries_all.transactionid%TYPE
649 );
650
651 /*
652 * USE: Overloaded version of the above method used for batched
653 * authorizations; passes extra fields such as auth code, cvv2
654 * result, etc.
655 *
656 * ARGS:
657 * 9. the auth code
658 * 10. the avs code
659 * 11. the cvv2 result
660 *
661 * OUTS:
662 * 12. the trxnid of the given transaction
663 *
664 * NOTES:
665 * For all parameters that default to null- if not
666 * set then the applicable row in the table will not be updated
667 */
668 PROCEDURE updateBatchQueryTrxn
669 (
670 payeeid_in IN iby_trxn_summaries_all.payeeid%TYPE,
671 orderid_in IN iby_trxn_summaries_all.batchid%TYPE,
672 trxn_type_in IN iby_trxn_summaries_all.trxntypeid%TYPE,
673 batchid_in IN iby_trxn_summaries_all.batchid%TYPE,
674 status_in IN iby_trxn_summaries_all.status%TYPE,
675 bep_code_in IN iby_trxn_summaries_all.bepcode%TYPE DEFAULT NULL,
676 bep_msg_in IN iby_trxn_summaries_all.bepmessage%TYPE DEFAULT NULL,
677 error_loc_in IN iby_trxn_summaries_all.errorlocation%TYPE DEFAULT NULL,
678 authcode_in IN iby_trxn_core.authcode%TYPE DEFAULT NULL,
679 avscode_in IN iby_trxn_core.avscode%TYPE DEFAULT NULL,
680 cvv2result_in IN iby_trxn_core.cvv2result%TYPE DEFAULT NULL,
681 trxnid_out OUT NOCOPY iby_trxn_summaries_all.transactionid%TYPE
682 );
683
684 PROCEDURE Update_Batch
685 (
686 ecapp_id_in IN iby_batches_all.ecappid%TYPE,
687 payeeid_in IN iby_trxn_summaries_all.payeeid%TYPE,
688 batchid_in IN iby_trxn_summaries_all.batchid%TYPE,
689 batch_status_in IN iby_batches_all.batchstatus%TYPE,
690 batch_total_in IN iby_batches_all.batchtotal%TYPE,
691 sale_amount_in IN iby_batches_all.batchsales%TYPE,
692 credit_amount_in IN iby_batches_all.batchcredit%TYPE,
693 bep_code_in IN iby_batches_all.bepcode%TYPE,
694 bep_message_in IN iby_batches_all.bepmessage%TYPE,
695 error_location_in IN iby_batches_all.errorlocation%TYPE,
696 ack_type_in IN VARCHAR2,
697 trxn_orderid_in IN JTF_VARCHAR2_TABLE_100,
698 trxn_reqtype_in IN JTF_VARCHAR2_TABLE_100,
699 trxn_status_in IN JTF_VARCHAR2_TABLE_100,
700 trxn_bep_code_in IN JTF_VARCHAR2_TABLE_100,
701 trxn_bep_msg_in IN JTF_VARCHAR2_TABLE_100,
702 trxn_error_loc_in IN JTF_VARCHAR2_TABLE_100,
703 trxn_authcode_in IN JTF_VARCHAR2_TABLE_100,
704 trxn_avscode_in IN JTF_VARCHAR2_TABLE_100,
705 trxn_cvv2result_in IN JTF_VARCHAR2_TABLE_100,
706 trxn_tracenumber IN JTF_VARCHAR2_TABLE_100
707 );
708
709
710 FUNCTION unencrypt_instr_num
711 (p_instrnum IN iby_trxn_summaries_all.instrnumber%TYPE,
712 p_payee_key IN iby_security_pkg.des3_key_type,
713 p_payee_subkey_cipher IN iby_payee_subkeys.subkey_cipher_text%TYPE,
714 p_sys_key IN RAW,
715 p_sys_subkey_cipher IN iby_sys_security_subkeys.subkey_cipher_text%TYPE,
716 p_segment_id IN iby_security_segments.sec_segment_id%TYPE,
717 p_segment_cipher IN iby_security_segments.segment_cipher_text%TYPE,
718 p_card_prefix IN iby_cc_issuer_ranges.card_number_prefix%TYPE,
719 p_card_len IN iby_cc_issuer_ranges.card_number_length%TYPE,
720 p_digit_check IN iby_creditcard_issuers_b.digit_check_flag%TYPE
721 )
722 RETURN iby_trxn_summaries_all.instrnumber%TYPE;
723
724 /*
725 * USE: Unencrypts the instrument number associated with the given trxn
726 * master id.
727 *
728 * ARGS:
729 * 1. trxn master id
730 * 2. the payee master key for that trxn
731 *
732 * OUTS:
733 * 3. unencrypted instrument number
734 *
735 * NOTES:
736 * For all parameters that default to null- if not
737 * set then the applicable row in the table will not be updated
738 */
739 PROCEDURE unencrypt_instr_num
740 (trxnmid_in IN iby_trxn_summaries_all.trxnmid%TYPE,
741 master_key_in IN iby_security_pkg.DES3_KEY_TYPE,
745 /* Functional version of above procedure so that it can be used
742 instr_num_out OUT NOCOPY iby_trxn_summaries_all.instrnumber%TYPE
743 );
744
746 * 'in-line' in SQL statements.
747 */
748 FUNCTION unencrypt_instr_num
749 (trxnmid_in IN iby_trxn_summaries_all.trxnmid%TYPE,
750 master_key_in IN iby_security_pkg.DES3_KEY_TYPE
751 )
752 RETURN iby_trxn_summaries_all.instrnumber%TYPE;
753
754 /* Wrapper of above function for UI. In the UI the
755 * SQL is executed by the framework. We can not catch
756 * the exception thrown from the function call.
757 * It will cause unacceptable error in the UI.
758 * In case of exceptions this wrapper function will
759 * simply swallow it and return null.
760 * The UI will display empty instrument number
761 * for this case.
762 */
763 FUNCTION unencrypt_instr_num_ui_wrp
764 (
765 trxnmid_in IN iby_trxn_summaries_all.trxnmid%TYPE,
766 master_key_in IN iby_security_pkg.DES3_KEY_TYPE
767 )
768 RETURN iby_trxn_summaries_all.instrnumber%TYPE;
769
770 -- USE
771 -- Encrypts (historical) transactional credit card data
772 --
773 PROCEDURE Encrypt_CC_Data
774 (p_sys_key IN IBY_SECURITY_PKG.DES3_KEY_TYPE,x_err_code OUT NOCOPY VARCHAR2);
775
776 -- USE
777 -- Decrypts (historical) transactional credit card data
778 --
779 PROCEDURE Decrypt_CC_Data
780 (p_sys_key IN IBY_SECURITY_PKG.DES3_KEY_TYPE,x_err_code OUT NOCOPY VARCHAR2);
781
782 /*
783 * USE: Checks if the number of transactions in the current open
784 * batch exceeds the max batch size.
785 * ARGS:
786 * 1. the ecapp id - used to scope the payee id
787 * 2. the payee id - specifies the owning payee of the batch
788 * 3. bep id - specifies the bep associated with the batch
789 * 4. bep key - the account number for the associated batch
790 *
791 * OUTS:
792 * 5. trxn count - number of trxns in the open batch
793 * 6. batch id - the next value from the batch id sequence if the
794 * batch size exceeds its specifified limit; if within
795 * its limits then NULL
796 *
797 */
798 PROCEDURE check_batch_size
799 (
800 ecappid_in IN iby_trxn_summaries_all.ecappid%TYPE,
801 payeeid_in IN iby_trxn_summaries_all.payeeid%TYPE,
802 bepid_in IN iby_trxn_summaries_all.bepid%TYPE,
803 bepkey_in IN iby_trxn_summaries_all.bepkey%TYPE,
804 orgid_in IN iby_batches_all.org_id%TYPE,
805 seckey_present_in IN VARCHAR2,
806 trxncount_out OUT NOCOPY NUMBER,
807 batchid_out OUT NOCOPY iby_batches_all.batchid%TYPE
808 );
809
810 /*--------------------------------------------------------------------
811 | NAME:
812 | performTransactionGrouping
813 |
814 | PURPOSE:
815 |
816 |
817 |
818 | PARAMETERS:
819 | IN
820 |
821 |
822 | OUT
823 |
824 |
825 | RETURNS:
826 |
827 | NOTES:
828 |
829 *---------------------------------------------------------------------*/
830 PROCEDURE performTransactionGrouping(
831 p_profile_code IN IBY_FNDCPT_USER_CC_PF_B.
832 user_cc_profile_code%TYPE,
833 instr_type IN IBY_TRXN_SUMMARIES_ALL.
834 instrtype%TYPE,
835 req_type IN IBY_BATCHES_ALL.
836 reqtype%TYPE,
837 f_pmt_channel_in IN IBY_TRXN_SUMMARIES_ALL.
838 payment_channel_code%TYPE,
839 f_curr_in IN IBY_TRXN_SUMMARIES_ALL.
840 currencynamecode%TYPE,
841 f_settle_date IN IBY_TRXN_SUMMARIES_ALL.
842 settledate%TYPE,
843 f_due_date IN IBY_TRXN_SUMMARIES_ALL.
844 settlement_due_date%TYPE,
845 f_maturity_date IN IBY_TRXN_SUMMARIES_ALL.
846 br_maturity_date%TYPE,
847 f_instr_type IN IBY_TRXN_SUMMARIES_ALL.
848 instrtype%TYPE,
849 x_batchTab IN OUT NOCOPY IBY_TRANSACTIONCC_PKG.
850 batchAttrTabType,
851 x_trxnsInBatchTab IN OUT NOCOPY IBY_TRANSACTIONCC_PKG.
852 trxnsInBatchTabType
853 );
854
855
856 /*--------------------------------------------------------------------
857 | NAME:
858 | performTransactionGrouping
859 |
860 | PURPOSE:
861 | Overloaded form of the earlier API.
862 | Takes an array of user profiles as input
863 | instead of a single one.
864 |
865 | PARAMETERS:
866 | IN
867 |
868 |
869 | OUT
870 |
871 |
872 | RETURNS:
873 |
874 | NOTES:
875 |
876 *---------------------------------------------------------------------*/
877 PROCEDURE performTransactionGrouping(
878 profile_code_array IN JTF_VARCHAR2_TABLE_100,
879 instr_type IN IBY_TRXN_SUMMARIES_ALL.
880 instrtype%TYPE,
881 req_type IN IBY_BATCHES_ALL.
882 reqtype%TYPE,
883 f_pmt_channel_in IN IBY_TRXN_SUMMARIES_ALL.
884 payment_channel_code%TYPE,
885 f_curr_in IN IBY_TRXN_SUMMARIES_ALL.
886 currencynamecode%TYPE,
887 f_settle_date IN IBY_TRXN_SUMMARIES_ALL.
888 settledate%TYPE,
889 f_due_date IN IBY_TRXN_SUMMARIES_ALL.
890 settlement_due_date%TYPE,
891 f_maturity_date IN IBY_TRXN_SUMMARIES_ALL.
892 br_maturity_date%TYPE,
893 f_instr_type IN IBY_TRXN_SUMMARIES_ALL.
894 instrtype%TYPE,
895 x_batchTab IN OUT NOCOPY IBY_TRANSACTIONCC_PKG.
896 batchAttrTabType,
897 x_trxnsInBatchTab IN OUT NOCOPY IBY_TRANSACTIONCC_PKG.
898 trxnsInBatchTabType
899 );
900
901 /*--------------------------------------------------------------------
902 | NAME:
903 | insertTrxnIntoBatch
904 |
905 | PURPOSE:
906 | Inserts a given transaction into a currently running batch
907 | or into a new batch as per given flag.
908 |
909 | This method is called by every grouping rule to add
910 | a given transaction into a current batch/new batch.
911 |
912 | PARAMETERS:
913 | IN
914 |
915 |
916 | OUT
917 |
918 |
919 | RETURNS:
920 |
921 | NOTES:
922 |
923 *---------------------------------------------------------------------*/
924 PROCEDURE insertTrxnIntoBatch(
925 x_batchRec IN OUT NOCOPY batchAttrRecType,
926 x_batchTab IN OUT NOCOPY batchAttrTabType,
927 p_newBatchFlag IN BOOLEAN,
928 x_currentBatchId IN OUT NOCOPY IBY_BATCHES_ALL.batchid%TYPE,
929 x_trxnsInBatchTab IN OUT NOCOPY trxnsInBatchTabType,
930 x_trxnsInBatchRec IN OUT NOCOPY trxnsInBatchRecType,
931 x_trxnsInBatchCount IN OUT NOCOPY NUMBER
932 );
933
934 /*--------------------------------------------------------------------
935 | NAME:
936 | getNextBatchId
937 |
938 | PURPOSE:
939 | Returns the next batch id from a sequence. These ids are
940 | used to uniquely number batches.
941 |
942 | PARAMETERS:
943 | IN
944 |
945 |
946 | OUT
947 |
948 |
949 | RETURNS:
950 |
951 | NOTES:
952 |
953 *---------------------------------------------------------------------*/
954 PROCEDURE getNextBatchId(
955 x_batchID IN OUT NOCOPY IBY_BATCHES_ALL.batchid%TYPE
956 );
957
958 /*--------------------------------------------------------------------
959 | NAME:
960 | print_debuginfo
961 |
962 | PURPOSE:
963 | This procedure prints the debug message to the concurrent manager
964 | log file.
965 |
966 | PARAMETERS:
967 | IN
968 | p_debug_text - The debug message to be printed
969 |
970 | OUT
971 |
972 |
973 | RETURNS:
974 |
975 | NOTES:
976 |
977 *---------------------------------------------------------------------*/
978 PROCEDURE print_debuginfo(
979 p_module IN VARCHAR2,
980 p_debug_text IN VARCHAR2
981 );
982
983 /*--------------------------------------------------------------------
984 | NAME:
985 | Update_Payer_Notif_Batch
986 |
987 | PURPOSE:
988 | This procedure updates the payer_notification_required flag for
989 | all the transactions in a batch.
990 |
991 | PARAMETERS:
992 | IN
993 | p_debug_text - The debug message to be printed
994 |
995 | OUT
996 |
997 |
998 | RETURNS:
999 |
1000 | NOTES:
1001 |
1002 *---------------------------------------------------------------------*/
1003 PROCEDURE Update_Payer_Notif_Batch(
1004 mbatchid_in IN iby_batches_all.mbatchid%TYPE
1005 );
1006
1007 END iby_transactioncc_pkg;
1008
1009