DBA Data[Home] [Help]

PACKAGE: APPS.IBY_BANKPAYMENT_UPDT_PUB

Source


1 PACKAGE IBY_BANKPAYMENT_UPDT_PUB AUTHID CURRENT_USER AS
2 /*$Header: ibypbpups.pls 115.7 2003/08/02 02:42:20 fxzhang noship $ */
3 
4 /* ========================================================================
5 -- Procedure Name:   updateBatchStatus
6 --
7 -- Purpose:         This procedure will update the iby_pay_batches_all table
8 --                  with the new batch status value.
9 --                  The possible batch status values considered at present
10 --                  includes  -
11 --                  1)  18 - Submitted to Processor
12 --                  2)   8 - Request not supported
13 --                  3)  12 - Scheduler in progess
14 --                  4) 101 - Communication error
15 --                  5) 301 - Formatted
16 --                  6) 302 - Confirmed
17 --                  7) 303 - Canceled
18 --                  8)   7 - Batch Failure
19 -- Parameters:
20 -- IN               1) p_batch_id      NUMBER
21 --                  The batch id.
22 --
23 --                  2)p_new_status     NUMBER
24 --                  The new batch status.
25 --
26 --                  2)p_error_code     VARCHAR2
27 --                  The error code if any.
28 --
29 --                  2)p_error_message  VARCHAR2
30 --                  The error message if any.
31 --
32 --  =======================================================================*/
33 
34 PROCEDURE updateBatchStatus(
35 
36             p_batch_id        IN    iby_pay_batches_all.batch_id%TYPE,
37             p_new_status      IN    iby_pay_batches_all.batch_status%TYPE,
38             p_error_code      IN    iby_pay_batches_all.bep_code%TYPE,
39             p_error_message   IN    iby_pay_batches_all.bep_message%TYPE
40  );
41 
42 /* ========================================================================
43 -- Procedure Name:   updateECBatches
44 --
45 -- Purpose:         This procedure will update all EC batches associated with
46 --                  an iPayment batch to a new status.
47 --  =======================================================================*/
48 
49 PROCEDURE updateECBatches
50 (
51 	payerid_in     IN iby_pay_batches_all.payer_id%TYPE,
52 	bepid_in       IN	iby_pay_batches_all.bepid%TYPE,
53 	bepkey_in      IN	iby_pay_batches_all.bepkey%TYPE,
54 	oldstatus_in   IN	iby_pay_batches_all.batch_status%TYPE,
55 	newstatus_in   IN	iby_pay_batches_all.batch_status%TYPE,
56 	oldbatchid_in  IN	iby_pay_batches_all.iby_batch_id%TYPE,
57 	newbatchid_in  IN	iby_pay_batches_all.iby_batch_id%TYPE
58 );
59 
60 
61 /* ========================================================================
62 -- Procedure Name:  updateTrxnStatus
63 --
64 -- Purpose:          This procedure updates the transaction status field
65 --                   in the iby_pay_payments_all table with the new transaction
66 --                   status value. For a particular batch, all the
67 --                   transactions will be updated with the same status value.
68 --                   Since the batch acknowledgment is not considered at
69 --                   present this condition is sufficient.
70 --                   The possible transaction status values considered at
71 --                   present includes
72 --                   1) 18 - Submitted to Processor
73 --                   2)  8 - Request not supported
74 --                   3) 11 - Pending
75 --                   4) 20 - Invalid Transaction
76 --                   5) 21 - Transaction Stopped
77 -- Parameters:
78 -- IN                1) p_batch_id      NUMBER
79 --                   The batch id.
80 --
81 --                   2) p_trxn_id       NUMBER
82 --                   The transaction id.
83 --
84 --                   3)p_new_status     NUMBER
85 --                   The new transaction status.
86 --
87 --                   4)p_error_code     VARCHAR2
88 --                   The error code if any.
89 --
90 --                   5)p_error_message  VARCHAR2
91 --                   The error message if any.
92 --
93 --  =======================================================================*/
94 
95 PROCEDURE updateTrxnStatus(
96 
97             p_batch_id        IN    iby_pay_payments_all.batch_id%TYPE,
98             p_trxn_id         IN    iby_pay_payments_all.pmt_trxn_id%TYPE,
99             p_new_status      IN    iby_pay_payments_all.pmt_status%TYPE,
100             p_error_code      IN    iby_pay_payments_all.bep_code%TYPE,
101             p_error_message   IN    iby_pay_payments_all.bep_message%TYPE
102  );
103 
104 
105 /* ========================================================================
106 -- Procedure Name:  setBatchFail
107 --
108 -- Purpose:          This procedure updates the iPayment batch and all
109 --                   its child EC batches and trxns to fail based
110 --                   on the batch query result returned from the servlet.
111 --                   1) 207 - Batch failed at Bank. for iby merged batch
112 --                            and EC batch
113 --                   2) 220 - Transaction failed at Bank. for trxn
114 --
115 -- Parameters:
116 -- IN
117 --                   1) p_payerid       VARCHAR2
118 --                   The payerid for the iby batch
119 --                   iby_batches_all.payeeid
120 --
121 --                   2) p_iby_batchid      VARCHAR2
122 --                   The iby merged batch (message) id
123 --                   iby_batches_all.batchid
124 --
125 --                   3)p_error_code     VARCHAR2
126 --                   The error code if any.
127 --
128 --                   4)p_error_message  VARCHAR2
129 --                   The error message if any.
130 --
131 --  =======================================================================*/
132 PROCEDURE setBatchFail (
133             p_payerid          IN    VARCHAR2,
134             p_iby_batchid      IN    VARCHAR2,
135             p_error_code       IN    VARCHAR2,
136             p_error_message    IN    VARCHAR2
137 );
138 
139 
140 
141 /* ========================================================================
142 -- Procedure Name:  updateQueryStatus
143 --
144 -- Purpose:          This procedure updates the iPayment batch and all
145 --                   its child EC batches - those do not have a finished
146 --                   status based on the trxn statuses returned from
147 --                   the servlet. Note the applicable trxn statuses updates
148 --                   must have been done before this procedure is called.
149 --                   It's not an error if this procedure is called for
150 --                   a iby merged batch that has a final status. In that
151 --                   case nothing will be done. Same goes for an EC batch
152 --                   with a final status.
153 --                   Statuses considered to be final:
154 --                   iby batch:
155 --                   1) 0 - success
156 --                   2) 206 - partial sucess -
157 --                            all child batch and trxn status known
158 --                   3) 207 - Batch failed at Bank.
159 --                   EC batch:
160 --                   1) 0 - success
161 --                   2) 206 - partial sucess -
162 --                            all child trxn status known
163 --                   3) 207 - Batch failed at Bank.
164 --                   Trxn:
165 --                   1) 0 - success
166 --                   2) 5 - BEP specific error
167 --                   3) 220 - Transaction failed at Bank
168 --
169 -- Parameters:
170 -- IN
171 --                   1) p_payerid       VARCHAR2
172 --                   The payerid for the iby batch
173 --                   iby_batches_all.payeeid
174 --
175 --                   2) p_iby_batchid      VARCHAR2
176 --                   The iby merged batch (message) id
177 --                   iby_batches_all.batchid
178 --
179 --  =======================================================================*/
180 PROCEDURE updateQueryStatus (
181             p_payerid          IN    VARCHAR2,
182             p_iby_batchid      IN    VARCHAR2
183 );
184 
185 
186 END IBY_BANKPAYMENT_UPDT_PUB;