50: l_invoice_to_org_id OE_ORDER_LINES_ALL.invoice_to_org_id%TYPE;
51: l_err_message VARCHAR2(4000);
52: l_instrument_security_code VARCHAR2(30);
53: l_cust_account_id NUMBER;
54: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
55:
56: l_party_site_id NUMBER;
57: l_instrument_id NUMBER; -- bug 5170754
58:
57: l_instrument_id NUMBER; -- bug 5170754
58:
59: BEGIN
60: IF l_debug_level > 0 THEN
61: oe_debug_pub.add('ENTERING OE_PAYMENT_TRXN_UTIL.Create_Payment_Trxn....');
62: oe_debug_pub.add('Instrument security code and payment number.....'||p_instrument_security_code||' and '||p_payment_number);
63: oe_debug_pub.add('Instrument id'||p_instrument_id);
64: oe_debug_pub.add('Instrument assgn id'||p_instrument_assignment_id);
65: oe_debug_pub.add('Trxn extension id'||P_x_trxn_extension_id);
58:
59: BEGIN
60: IF l_debug_level > 0 THEN
61: oe_debug_pub.add('ENTERING OE_PAYMENT_TRXN_UTIL.Create_Payment_Trxn....');
62: oe_debug_pub.add('Instrument security code and payment number.....'||p_instrument_security_code||' and '||p_payment_number);
63: oe_debug_pub.add('Instrument id'||p_instrument_id);
64: oe_debug_pub.add('Instrument assgn id'||p_instrument_assignment_id);
65: oe_debug_pub.add('Trxn extension id'||P_x_trxn_extension_id);
66: END IF;
59: BEGIN
60: IF l_debug_level > 0 THEN
61: oe_debug_pub.add('ENTERING OE_PAYMENT_TRXN_UTIL.Create_Payment_Trxn....');
62: oe_debug_pub.add('Instrument security code and payment number.....'||p_instrument_security_code||' and '||p_payment_number);
63: oe_debug_pub.add('Instrument id'||p_instrument_id);
64: oe_debug_pub.add('Instrument assgn id'||p_instrument_assignment_id);
65: oe_debug_pub.add('Trxn extension id'||P_x_trxn_extension_id);
66: END IF;
67: BEGIN
60: IF l_debug_level > 0 THEN
61: oe_debug_pub.add('ENTERING OE_PAYMENT_TRXN_UTIL.Create_Payment_Trxn....');
62: oe_debug_pub.add('Instrument security code and payment number.....'||p_instrument_security_code||' and '||p_payment_number);
63: oe_debug_pub.add('Instrument id'||p_instrument_id);
64: oe_debug_pub.add('Instrument assgn id'||p_instrument_assignment_id);
65: oe_debug_pub.add('Trxn extension id'||P_x_trxn_extension_id);
66: END IF;
67: BEGIN
68:
61: oe_debug_pub.add('ENTERING OE_PAYMENT_TRXN_UTIL.Create_Payment_Trxn....');
62: oe_debug_pub.add('Instrument security code and payment number.....'||p_instrument_security_code||' and '||p_payment_number);
63: oe_debug_pub.add('Instrument id'||p_instrument_id);
64: oe_debug_pub.add('Instrument assgn id'||p_instrument_assignment_id);
65: oe_debug_pub.add('Trxn extension id'||P_x_trxn_extension_id);
66: END IF;
67: BEGIN
68:
69: -- map payment type to the payment channel
78: */
79: l_pmt_channel_code := 'BANK_ACCT_XFER';
80: END IF;
81: IF l_debug_level > 0 THEN
82: oe_debug_pub.add('ksurendr payment channel code '||l_pmt_channel_code);
83: END IF;
84:
85: EXCEPTION
86: WHEN OTHERS THEN
84:
85: EXCEPTION
86: WHEN OTHERS THEN
87: IF l_debug_level > 0 THEN
88: oe_debug_pub.add('Error in getting payment channel code'||l_pmt_channel_code);
89: oe_debug_pub.add('Return status'||l_return_status||l_msg_data);
90: RAISE;
91: END IF;
92: END;
85: EXCEPTION
86: WHEN OTHERS THEN
87: IF l_debug_level > 0 THEN
88: oe_debug_pub.add('Error in getting payment channel code'||l_pmt_channel_code);
89: oe_debug_pub.add('Return status'||l_return_status||l_msg_data);
90: RAISE;
91: END IF;
92: END;
93:
106: l_invoice_to_org_id := OE_Order_Cache.g_header_rec.invoice_to_org_id;
107: l_org_id := OE_Order_Cache.g_header_rec.org_id;
108: END IF;
109: IF l_debug_level > 0 THEN
110: oe_debug_pub.add('Invoice_to_org_id'||l_invoice_to_org_id);
111: oe_debug_pub.add('org id'||l_org_id);
112: END IF;
113: /*
114: EXCEPTION
107: l_org_id := OE_Order_Cache.g_header_rec.org_id;
108: END IF;
109: IF l_debug_level > 0 THEN
110: oe_debug_pub.add('Invoice_to_org_id'||l_invoice_to_org_id);
111: oe_debug_pub.add('org id'||l_org_id);
112: END IF;
113: /*
114: EXCEPTION
115: WHEN OTHERS THEN
114: EXCEPTION
115: WHEN OTHERS THEN
116: l_err_message := SQLERRM;
117: IF l_debug_level > 0 THEN
118: oe_debug_pub.add('Error in getting org id'||l_err_message);
119: oe_debug_pub.add('Invoice to org id'||l_invoice_to_org_id);
120: oe_debug_pub.add('Org id'||l_org_id);
121: RAISE;
122: END IF;
115: WHEN OTHERS THEN
116: l_err_message := SQLERRM;
117: IF l_debug_level > 0 THEN
118: oe_debug_pub.add('Error in getting org id'||l_err_message);
119: oe_debug_pub.add('Invoice to org id'||l_invoice_to_org_id);
120: oe_debug_pub.add('Org id'||l_org_id);
121: RAISE;
122: END IF;
123: END;
116: l_err_message := SQLERRM;
117: IF l_debug_level > 0 THEN
118: oe_debug_pub.add('Error in getting org id'||l_err_message);
119: oe_debug_pub.add('Invoice to org id'||l_invoice_to_org_id);
120: oe_debug_pub.add('Org id'||l_org_id);
121: RAISE;
122: END IF;
123: END;
124: */
135: AND ACCT_SITE.CUST_ACCOUNT_ID = HCA.CUST_ACCOUNT_ID
136: AND SITE.ORG_ID = ACCT_SITE.ORG_ID;
137:
138: IF l_debug_level > 0 THEN
139: oe_debug_pub.add('Party id in Create payment trxn'||l_party_id);
140: END IF;
141:
142: l_payer.payment_function := 'CUSTOMER_PAYMENT';
143: l_payer.party_id := l_party_id;
145: l_payer.org_id := l_org_id;
146: l_payer.cust_account_id := l_cust_account_id;
147: l_payer.account_site_id := p_site_use_id;
148: IF l_debug_level > 0 THEN
149: oe_debug_pub.add('Cust id and acct site id'||p_cust_id||'and'||p_site_use_id);
150: oe_debug_pub.add('Payer context values');
151: oe_debug_pub.add('Payment function --- CUSTOMER_PAYMENT');
152: oe_debug_pub.add('PARTY ID'||l_party_id);
153: oe_debug_pub.add('org_id'||l_org_id);
146: l_payer.cust_account_id := l_cust_account_id;
147: l_payer.account_site_id := p_site_use_id;
148: IF l_debug_level > 0 THEN
149: oe_debug_pub.add('Cust id and acct site id'||p_cust_id||'and'||p_site_use_id);
150: oe_debug_pub.add('Payer context values');
151: oe_debug_pub.add('Payment function --- CUSTOMER_PAYMENT');
152: oe_debug_pub.add('PARTY ID'||l_party_id);
153: oe_debug_pub.add('org_id'||l_org_id);
154: oe_debug_pub.add('org type'||l_org_type);
147: l_payer.account_site_id := p_site_use_id;
148: IF l_debug_level > 0 THEN
149: oe_debug_pub.add('Cust id and acct site id'||p_cust_id||'and'||p_site_use_id);
150: oe_debug_pub.add('Payer context values');
151: oe_debug_pub.add('Payment function --- CUSTOMER_PAYMENT');
152: oe_debug_pub.add('PARTY ID'||l_party_id);
153: oe_debug_pub.add('org_id'||l_org_id);
154: oe_debug_pub.add('org type'||l_org_type);
155: oe_debug_pub.add('cust acct id'||l_cust_account_id);
148: IF l_debug_level > 0 THEN
149: oe_debug_pub.add('Cust id and acct site id'||p_cust_id||'and'||p_site_use_id);
150: oe_debug_pub.add('Payer context values');
151: oe_debug_pub.add('Payment function --- CUSTOMER_PAYMENT');
152: oe_debug_pub.add('PARTY ID'||l_party_id);
153: oe_debug_pub.add('org_id'||l_org_id);
154: oe_debug_pub.add('org type'||l_org_type);
155: oe_debug_pub.add('cust acct id'||l_cust_account_id);
156: oe_debug_pub.add('account site id'||p_site_use_id);
149: oe_debug_pub.add('Cust id and acct site id'||p_cust_id||'and'||p_site_use_id);
150: oe_debug_pub.add('Payer context values');
151: oe_debug_pub.add('Payment function --- CUSTOMER_PAYMENT');
152: oe_debug_pub.add('PARTY ID'||l_party_id);
153: oe_debug_pub.add('org_id'||l_org_id);
154: oe_debug_pub.add('org type'||l_org_type);
155: oe_debug_pub.add('cust acct id'||l_cust_account_id);
156: oe_debug_pub.add('account site id'||p_site_use_id);
157: END IF;
150: oe_debug_pub.add('Payer context values');
151: oe_debug_pub.add('Payment function --- CUSTOMER_PAYMENT');
152: oe_debug_pub.add('PARTY ID'||l_party_id);
153: oe_debug_pub.add('org_id'||l_org_id);
154: oe_debug_pub.add('org type'||l_org_type);
155: oe_debug_pub.add('cust acct id'||l_cust_account_id);
156: oe_debug_pub.add('account site id'||p_site_use_id);
157: END IF;
158:
151: oe_debug_pub.add('Payment function --- CUSTOMER_PAYMENT');
152: oe_debug_pub.add('PARTY ID'||l_party_id);
153: oe_debug_pub.add('org_id'||l_org_id);
154: oe_debug_pub.add('org type'||l_org_type);
155: oe_debug_pub.add('cust acct id'||l_cust_account_id);
156: oe_debug_pub.add('account site id'||p_site_use_id);
157: END IF;
158:
159: EXCEPTION
152: oe_debug_pub.add('PARTY ID'||l_party_id);
153: oe_debug_pub.add('org_id'||l_org_id);
154: oe_debug_pub.add('org type'||l_org_type);
155: oe_debug_pub.add('cust acct id'||l_cust_account_id);
156: oe_debug_pub.add('account site id'||p_site_use_id);
157: END IF;
158:
159: EXCEPTION
160: WHEN OTHERS THEN
158:
159: EXCEPTION
160: WHEN OTHERS THEN
161: IF l_debug_level > 0 THEN
162: oe_debug_pub.add('Error in PARTY ID'||l_party_id);
163: oe_debug_pub.add('Invoice to org id'||l_invoice_to_org_id);
164: oe_debug_pub.add('Org id'||l_org_id);
165: oe_debug_pub.add('payment_number'||p_payment_number);
166: oe_debug_pub.add('Return status'||l_return_status||l_msg_data);
159: EXCEPTION
160: WHEN OTHERS THEN
161: IF l_debug_level > 0 THEN
162: oe_debug_pub.add('Error in PARTY ID'||l_party_id);
163: oe_debug_pub.add('Invoice to org id'||l_invoice_to_org_id);
164: oe_debug_pub.add('Org id'||l_org_id);
165: oe_debug_pub.add('payment_number'||p_payment_number);
166: oe_debug_pub.add('Return status'||l_return_status||l_msg_data);
167: RAISE FND_API.G_EXC_ERROR;
160: WHEN OTHERS THEN
161: IF l_debug_level > 0 THEN
162: oe_debug_pub.add('Error in PARTY ID'||l_party_id);
163: oe_debug_pub.add('Invoice to org id'||l_invoice_to_org_id);
164: oe_debug_pub.add('Org id'||l_org_id);
165: oe_debug_pub.add('payment_number'||p_payment_number);
166: oe_debug_pub.add('Return status'||l_return_status||l_msg_data);
167: RAISE FND_API.G_EXC_ERROR;
168: END IF;
161: IF l_debug_level > 0 THEN
162: oe_debug_pub.add('Error in PARTY ID'||l_party_id);
163: oe_debug_pub.add('Invoice to org id'||l_invoice_to_org_id);
164: oe_debug_pub.add('Org id'||l_org_id);
165: oe_debug_pub.add('payment_number'||p_payment_number);
166: oe_debug_pub.add('Return status'||l_return_status||l_msg_data);
167: RAISE FND_API.G_EXC_ERROR;
168: END IF;
169: END;
162: oe_debug_pub.add('Error in PARTY ID'||l_party_id);
163: oe_debug_pub.add('Invoice to org id'||l_invoice_to_org_id);
164: oe_debug_pub.add('Org id'||l_org_id);
165: oe_debug_pub.add('payment_number'||p_payment_number);
166: oe_debug_pub.add('Return status'||l_return_status||l_msg_data);
167: RAISE FND_API.G_EXC_ERROR;
168: END IF;
169: END;
170:
198: --id even though the assignment id is passed from the front end.
199:
200: IF p_payment_trx_id IS NOT NULL THEN
201: IF l_debug_level > 0 THEN
202: oe_debug_pub.add('Assignment id for ach / direct debit --> '||p_payment_trx_id);
203: END IF;
204:
205: SELECT INSTRUMENT_ID into
206: l_instrument_id from
210: l_assignment_attribs.instrument.instrument_id := l_instrument_id;
211: END IF;
212:
213: IF l_debug_level > 0 THEN
214: oe_debug_pub.add('Before call to Set payer instr assignment API...');
215: oe_debug_pub.add('Assignment attributes passed ');
216: oe_debug_pub.add('l_instrument.instrument_id ---> '||p_instrument_id);
217: oe_debug_pub.add('l_instrument.instrument_type -> '||l_instrument_type);
218: END IF;
211: END IF;
212:
213: IF l_debug_level > 0 THEN
214: oe_debug_pub.add('Before call to Set payer instr assignment API...');
215: oe_debug_pub.add('Assignment attributes passed ');
216: oe_debug_pub.add('l_instrument.instrument_id ---> '||p_instrument_id);
217: oe_debug_pub.add('l_instrument.instrument_type -> '||l_instrument_type);
218: END IF;
219:
212:
213: IF l_debug_level > 0 THEN
214: oe_debug_pub.add('Before call to Set payer instr assignment API...');
215: oe_debug_pub.add('Assignment attributes passed ');
216: oe_debug_pub.add('l_instrument.instrument_id ---> '||p_instrument_id);
217: oe_debug_pub.add('l_instrument.instrument_type -> '||l_instrument_type);
218: END IF;
219:
220: IBY_FNDCPT_SETUP_PUB.Set_Payer_Instr_Assignment
213: IF l_debug_level > 0 THEN
214: oe_debug_pub.add('Before call to Set payer instr assignment API...');
215: oe_debug_pub.add('Assignment attributes passed ');
216: oe_debug_pub.add('l_instrument.instrument_id ---> '||p_instrument_id);
217: oe_debug_pub.add('l_instrument.instrument_type -> '||l_instrument_type);
218: END IF;
219:
220: IBY_FNDCPT_SETUP_PUB.Set_Payer_Instr_Assignment
221: (p_api_version => 1.0,
229: X_response => l_response_code);
230:
231: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
232: IF l_debug_level > 0 THEN
233: oe_debug_pub.add('Result error code in set payer instr assignment'||l_response_code.result_code);
234: END IF;
235: RAISE FND_API.G_EXC_ERROR;
236: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
237: IF l_debug_level > 0 THEN
234: END IF;
235: RAISE FND_API.G_EXC_ERROR;
236: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
237: IF l_debug_level > 0 THEN
238: oe_debug_pub.add('Result error code in set payer instr assignment'||l_response_code.result_code);
239: END IF;
240: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
241: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
242: IF l_debug_level > 0 THEN
239: END IF;
240: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
241: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
242: IF l_debug_level > 0 THEN
243: oe_debug_pub.add('Set Payer instr assignment Successful....');
244: oe_debug_pub.add('After calling Set_Payer_Instr_Assignment');
245: oe_debug_pub.add('Instr assignment id'||l_assign_id);
246: END IF;
247: END IF;
240: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
241: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
242: IF l_debug_level > 0 THEN
243: oe_debug_pub.add('Set Payer instr assignment Successful....');
244: oe_debug_pub.add('After calling Set_Payer_Instr_Assignment');
245: oe_debug_pub.add('Instr assignment id'||l_assign_id);
246: END IF;
247: END IF;
248: --END IF; bug 5170754
241: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
242: IF l_debug_level > 0 THEN
243: oe_debug_pub.add('Set Payer instr assignment Successful....');
244: oe_debug_pub.add('After calling Set_Payer_Instr_Assignment');
245: oe_debug_pub.add('Instr assignment id'||l_assign_id);
246: END IF;
247: END IF;
248: --END IF; bug 5170754
249: ELSIF p_payment_type_code = 'CREDIT_CARD' THEN
252: L_credit_card_rec.expiration_date := p_exp_date;
253: l_credit_card_rec.Card_Holder_Name := p_card_holder_name;
254: l_credit_Card_rec.card_id := p_instrument_id;
255: IF l_debug_level > 0 THEN
256: oe_debug_pub.add('Before call to Update_Card API....');
257: oe_debug_pub.add('Expiration date --> '||p_exp_date);
258: oe_debug_pub.add('Holder Name ------> '||p_card_holder_name);
259: oe_debug_pub.add('Instrument id ----> '||p_instrument_id);
260: END IF;
253: l_credit_card_rec.Card_Holder_Name := p_card_holder_name;
254: l_credit_Card_rec.card_id := p_instrument_id;
255: IF l_debug_level > 0 THEN
256: oe_debug_pub.add('Before call to Update_Card API....');
257: oe_debug_pub.add('Expiration date --> '||p_exp_date);
258: oe_debug_pub.add('Holder Name ------> '||p_card_holder_name);
259: oe_debug_pub.add('Instrument id ----> '||p_instrument_id);
260: END IF;
261: IBY_FNDCPT_SETUP_PUB.Update_Card
254: l_credit_Card_rec.card_id := p_instrument_id;
255: IF l_debug_level > 0 THEN
256: oe_debug_pub.add('Before call to Update_Card API....');
257: oe_debug_pub.add('Expiration date --> '||p_exp_date);
258: oe_debug_pub.add('Holder Name ------> '||p_card_holder_name);
259: oe_debug_pub.add('Instrument id ----> '||p_instrument_id);
260: END IF;
261: IBY_FNDCPT_SETUP_PUB.Update_Card
262: (
255: IF l_debug_level > 0 THEN
256: oe_debug_pub.add('Before call to Update_Card API....');
257: oe_debug_pub.add('Expiration date --> '||p_exp_date);
258: oe_debug_pub.add('Holder Name ------> '||p_card_holder_name);
259: oe_debug_pub.add('Instrument id ----> '||p_instrument_id);
260: END IF;
261: IBY_FNDCPT_SETUP_PUB.Update_Card
262: (
263: p_api_version => 1.0,
271: );
272: --oe_msg_pub.add_text(p_message_text => l_response_code.result_message);
273: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
274: IF l_debug_level > 0 THEN
275: oe_debug_pub.add('Result error code in Update_Card exp'||l_response_code.result_code);
276: END IF;
277: RAISE FND_API.G_EXC_ERROR;
278: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
279: IF l_debug_level > 0 THEN
276: END IF;
277: RAISE FND_API.G_EXC_ERROR;
278: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
279: IF l_debug_level > 0 THEN
280: oe_debug_pub.add('Result error code in Update_Card unxc'||l_response_code.result_code);
281: END IF;
282: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
283: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
284: IF l_debug_level > 0 THEN
281: END IF;
282: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
283: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
284: IF l_debug_level > 0 THEN
285: oe_debug_pub.add('Update_Card Successful....');
286: oe_debug_pub.add('Return status '||l_return_status);
287: END IF;
288: END IF;
289: END IF;
282: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
283: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
284: IF l_debug_level > 0 THEN
285: oe_debug_pub.add('Update_Card Successful....');
286: oe_debug_pub.add('Return status '||l_return_status);
287: END IF;
288: END IF;
289: END IF;
290:
289: END IF;
290:
291: IF p_instrument_assignment_id IS NOT NULL THEN
292: IF l_debug_level > 0 THEN
293: oe_debug_pub.add('Before call to Set payer instr assignment API...');
294: oe_debug_pub.add('Assignment attributes passed ');
295: oe_debug_pub.add('l_instrument.instrument_id ---> '||p_instrument_id);
296: oe_debug_pub.add('l_instrument.instrument_type -> '||l_instrument_type);
297: END IF;
290:
291: IF p_instrument_assignment_id IS NOT NULL THEN
292: IF l_debug_level > 0 THEN
293: oe_debug_pub.add('Before call to Set payer instr assignment API...');
294: oe_debug_pub.add('Assignment attributes passed ');
295: oe_debug_pub.add('l_instrument.instrument_id ---> '||p_instrument_id);
296: oe_debug_pub.add('l_instrument.instrument_type -> '||l_instrument_type);
297: END IF;
298:
291: IF p_instrument_assignment_id IS NOT NULL THEN
292: IF l_debug_level > 0 THEN
293: oe_debug_pub.add('Before call to Set payer instr assignment API...');
294: oe_debug_pub.add('Assignment attributes passed ');
295: oe_debug_pub.add('l_instrument.instrument_id ---> '||p_instrument_id);
296: oe_debug_pub.add('l_instrument.instrument_type -> '||l_instrument_type);
297: END IF;
298:
299: IBY_FNDCPT_SETUP_PUB.Set_Payer_Instr_Assignment
292: IF l_debug_level > 0 THEN
293: oe_debug_pub.add('Before call to Set payer instr assignment API...');
294: oe_debug_pub.add('Assignment attributes passed ');
295: oe_debug_pub.add('l_instrument.instrument_id ---> '||p_instrument_id);
296: oe_debug_pub.add('l_instrument.instrument_type -> '||l_instrument_type);
297: END IF;
298:
299: IBY_FNDCPT_SETUP_PUB.Set_Payer_Instr_Assignment
300: (p_api_version => 1.0,
308: X_response => l_response_code);
309:
310: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
311: IF l_debug_level > 0 THEN
312: oe_debug_pub.add('Result error code in set payer instr assignment'||l_response_code.result_code);
313: END IF;
314: RAISE FND_API.G_EXC_ERROR;
315: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
316: IF l_debug_level > 0 THEN
313: END IF;
314: RAISE FND_API.G_EXC_ERROR;
315: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
316: IF l_debug_level > 0 THEN
317: oe_debug_pub.add('Result error code in set payer instr assignment'||l_response_code.result_code);
318: END IF;
319: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
320: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
321: IF l_debug_level > 0 THEN
318: END IF;
319: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
320: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
321: IF l_debug_level > 0 THEN
322: oe_debug_pub.add('Set Payer instr assignment Successful....');
323: oe_debug_pub.add('After calling Set_Payer_Instr_Assignment');
324: oe_debug_pub.add('Instr assignment id'||l_assign_id);
325: END IF;
326: END IF;
319: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
320: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
321: IF l_debug_level > 0 THEN
322: oe_debug_pub.add('Set Payer instr assignment Successful....');
323: oe_debug_pub.add('After calling Set_Payer_Instr_Assignment');
324: oe_debug_pub.add('Instr assignment id'||l_assign_id);
325: END IF;
326: END IF;
327: --l_assign_id := p_instrument_assignment_id;
320: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
321: IF l_debug_level > 0 THEN
322: oe_debug_pub.add('Set Payer instr assignment Successful....');
323: oe_debug_pub.add('After calling Set_Payer_Instr_Assignment');
324: oe_debug_pub.add('Instr assignment id'||l_assign_id);
325: END IF;
326: END IF;
327: --l_assign_id := p_instrument_assignment_id;
328: ELSE
326: END IF;
327: --l_assign_id := p_instrument_assignment_id;
328: ELSE
329: IF l_debug_level > 0 THEN
330: oe_debug_pub.add('Values of credit card passed to process_credit_card');
331: oe_debug_pub.add('Owner id'||l_party_id);
332: oe_debug_pub.add('site use id /invoice to org id'||p_site_use_id);
333: oe_debug_pub.add('l_party_site_id/stmt billing address id'||l_party_site_id);
334: oe_debug_pub.add('card number'||p_card_number);
327: --l_assign_id := p_instrument_assignment_id;
328: ELSE
329: IF l_debug_level > 0 THEN
330: oe_debug_pub.add('Values of credit card passed to process_credit_card');
331: oe_debug_pub.add('Owner id'||l_party_id);
332: oe_debug_pub.add('site use id /invoice to org id'||p_site_use_id);
333: oe_debug_pub.add('l_party_site_id/stmt billing address id'||l_party_site_id);
334: oe_debug_pub.add('card number'||p_card_number);
335: oe_debug_pub.add('expiration date'||p_exp_date);
328: ELSE
329: IF l_debug_level > 0 THEN
330: oe_debug_pub.add('Values of credit card passed to process_credit_card');
331: oe_debug_pub.add('Owner id'||l_party_id);
332: oe_debug_pub.add('site use id /invoice to org id'||p_site_use_id);
333: oe_debug_pub.add('l_party_site_id/stmt billing address id'||l_party_site_id);
334: oe_debug_pub.add('card number'||p_card_number);
335: oe_debug_pub.add('expiration date'||p_exp_date);
336: oe_debug_pub.add('instrument_type'||l_instrument_type);
329: IF l_debug_level > 0 THEN
330: oe_debug_pub.add('Values of credit card passed to process_credit_card');
331: oe_debug_pub.add('Owner id'||l_party_id);
332: oe_debug_pub.add('site use id /invoice to org id'||p_site_use_id);
333: oe_debug_pub.add('l_party_site_id/stmt billing address id'||l_party_site_id);
334: oe_debug_pub.add('card number'||p_card_number);
335: oe_debug_pub.add('expiration date'||p_exp_date);
336: oe_debug_pub.add('instrument_type'||l_instrument_type);
337: oe_debug_pub.add('Card issuer'||p_card_code);
330: oe_debug_pub.add('Values of credit card passed to process_credit_card');
331: oe_debug_pub.add('Owner id'||l_party_id);
332: oe_debug_pub.add('site use id /invoice to org id'||p_site_use_id);
333: oe_debug_pub.add('l_party_site_id/stmt billing address id'||l_party_site_id);
334: oe_debug_pub.add('card number'||p_card_number);
335: oe_debug_pub.add('expiration date'||p_exp_date);
336: oe_debug_pub.add('instrument_type'||l_instrument_type);
337: oe_debug_pub.add('Card issuer'||p_card_code);
338: oe_debug_pub.add('Instrument id'||l_assignment_attribs.instrument.instrument_id);
331: oe_debug_pub.add('Owner id'||l_party_id);
332: oe_debug_pub.add('site use id /invoice to org id'||p_site_use_id);
333: oe_debug_pub.add('l_party_site_id/stmt billing address id'||l_party_site_id);
334: oe_debug_pub.add('card number'||p_card_number);
335: oe_debug_pub.add('expiration date'||p_exp_date);
336: oe_debug_pub.add('instrument_type'||l_instrument_type);
337: oe_debug_pub.add('Card issuer'||p_card_code);
338: oe_debug_pub.add('Instrument id'||l_assignment_attribs.instrument.instrument_id);
339: oe_debug_pub.add('call to process credit card');
332: oe_debug_pub.add('site use id /invoice to org id'||p_site_use_id);
333: oe_debug_pub.add('l_party_site_id/stmt billing address id'||l_party_site_id);
334: oe_debug_pub.add('card number'||p_card_number);
335: oe_debug_pub.add('expiration date'||p_exp_date);
336: oe_debug_pub.add('instrument_type'||l_instrument_type);
337: oe_debug_pub.add('Card issuer'||p_card_code);
338: oe_debug_pub.add('Instrument id'||l_assignment_attribs.instrument.instrument_id);
339: oe_debug_pub.add('call to process credit card');
340: END IF;
333: oe_debug_pub.add('l_party_site_id/stmt billing address id'||l_party_site_id);
334: oe_debug_pub.add('card number'||p_card_number);
335: oe_debug_pub.add('expiration date'||p_exp_date);
336: oe_debug_pub.add('instrument_type'||l_instrument_type);
337: oe_debug_pub.add('Card issuer'||p_card_code);
338: oe_debug_pub.add('Instrument id'||l_assignment_attribs.instrument.instrument_id);
339: oe_debug_pub.add('call to process credit card');
340: END IF;
341:
334: oe_debug_pub.add('card number'||p_card_number);
335: oe_debug_pub.add('expiration date'||p_exp_date);
336: oe_debug_pub.add('instrument_type'||l_instrument_type);
337: oe_debug_pub.add('Card issuer'||p_card_code);
338: oe_debug_pub.add('Instrument id'||l_assignment_attribs.instrument.instrument_id);
339: oe_debug_pub.add('call to process credit card');
340: END IF;
341:
342: L_credit_card_rec.owner_id := l_party_id;
335: oe_debug_pub.add('expiration date'||p_exp_date);
336: oe_debug_pub.add('instrument_type'||l_instrument_type);
337: oe_debug_pub.add('Card issuer'||p_card_code);
338: oe_debug_pub.add('Instrument id'||l_assignment_attribs.instrument.instrument_id);
339: oe_debug_pub.add('call to process credit card');
340: END IF;
341:
342: L_credit_card_rec.owner_id := l_party_id;
343: L_credit_card_rec.billing_address_id := l_party_site_id;
364: --oe_msg_pub.add_text(p_message_text => l_response_code.result_message);
365:
366: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
367: IF l_debug_level > 0 THEN
368: oe_debug_pub.add('Result error code in Process_Credit_Card -->'||l_response_code.result_code);
369: END IF;
370: IF l_response_code.result_code = 'INVALID_CARD_NUMBER' THEN
371: FND_MESSAGE.SET_NAME('ONT','OE_VPM_CC_ACCT_NOT_SET');
372: OE_MSG_PUB.ADD;
370: IF l_response_code.result_code = 'INVALID_CARD_NUMBER' THEN
371: FND_MESSAGE.SET_NAME('ONT','OE_VPM_CC_ACCT_NOT_SET');
372: OE_MSG_PUB.ADD;
373: IF l_debug_level > 0 THEN
374: oe_debug_pub.add( 'OEXUPTXB: Invalid card number or expiration date' ) ;
375: END IF;
376: ELSIF l_response_code.result_code = 'INVALID_ADDRESS' THEN
377: FND_MESSAGE.SET_NAME('ONT','OE_CC_BILL_TO_ADDRESS_INVALID');
378: OE_MSG_PUB.ADD;
376: ELSIF l_response_code.result_code = 'INVALID_ADDRESS' THEN
377: FND_MESSAGE.SET_NAME('ONT','OE_CC_BILL_TO_ADDRESS_INVALID');
378: OE_MSG_PUB.ADD;
379: IF l_debug_level > 0 THEN
380: oe_debug_pub.add( 'OEXUPTXB: Invalid billing address' ) ;
381: END IF;
382: ELSIF l_response_code.result_code = 'INVALID_CARD_ISSUER' THEN
383: FND_MESSAGE.SET_NAME('ONT','OE_VPM_CC_ACCT_NOT_SET'); --bug 5012613
384: OE_MSG_PUB.ADD;
382: ELSIF l_response_code.result_code = 'INVALID_CARD_ISSUER' THEN
383: FND_MESSAGE.SET_NAME('ONT','OE_VPM_CC_ACCT_NOT_SET'); --bug 5012613
384: OE_MSG_PUB.ADD;
385: IF l_debug_level > 0 THEN
386: oe_debug_pub.add( 'OEXUPTXB: Invalid billing address' ) ;
387: END IF;
388: ELSE --Setting a generic message bug 5244099
389: FND_MESSAGE.SET_NAME('ONT','OE_VPM_CC_ACCT_NOT_SET');
390: OE_MSG_PUB.ADD;
388: ELSE --Setting a generic message bug 5244099
389: FND_MESSAGE.SET_NAME('ONT','OE_VPM_CC_ACCT_NOT_SET');
390: OE_MSG_PUB.ADD;
391: IF l_debug_level > 0 THEN
392: oe_debug_pub.add( 'OEXUPTXB: Setting the generic message' ) ;
393: END IF;
394: END IF;
395: RAISE FND_API.G_EXC_ERROR;
396: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
396: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
397: FND_MESSAGE.SET_NAME('ONT','OE_VPM_CC_ACCT_NOT_SET'); --bug 5244099
398: OE_MSG_PUB.ADD;
399: IF l_debug_level > 0 THEN
400: oe_debug_pub.add('Unexpected result error code in Process_Credit_Card-->'||l_response_code.result_code);
401: END IF;
402: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
403: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
404: IF l_debug_level > 0 THEN
401: END IF;
402: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
403: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
404: IF l_debug_level > 0 THEN
405: oe_debug_pub.add('Process_Credit_Card assignment Successful....');
406: oe_debug_pub.add('After calling Process_Credit_Card');
407: oe_debug_pub.add('Instr assignment id'||l_assign_id);
408: END IF;
409: --If trxn extension id is null and approval code is not, then
402: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
403: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
404: IF l_debug_level > 0 THEN
405: oe_debug_pub.add('Process_Credit_Card assignment Successful....');
406: oe_debug_pub.add('After calling Process_Credit_Card');
407: oe_debug_pub.add('Instr assignment id'||l_assign_id);
408: END IF;
409: --If trxn extension id is null and approval code is not, then
410: --this approval code was obtained from outside payments system
403: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
404: IF l_debug_level > 0 THEN
405: oe_debug_pub.add('Process_Credit_Card assignment Successful....');
406: oe_debug_pub.add('After calling Process_Credit_Card');
407: oe_debug_pub.add('Instr assignment id'||l_assign_id);
408: END IF;
409: --If trxn extension id is null and approval code is not, then
410: --this approval code was obtained from outside payments system
411: --and we need to set up voice authorization in this case.
431: ELSE
432: -- p_x_trxn_extension_id is not null, then find the instrument assignment id first,
433: -- then create a new trxn transaction id using this assignment id. This is used in Copy Order.
434: IF l_debug_level > 0 THEN
435: oe_debug_pub.add('Before call to Get Transaction Extension API...');
436: oe_debug_pub.add('Trxn attributes passed ');
437: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 ---> '||p_line_id);
438: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 ---> '||p_payment_number);
439: oe_debug_pub.add('L_trxn_attribs.order_id -----------> '||p_header_id);
432: -- p_x_trxn_extension_id is not null, then find the instrument assignment id first,
433: -- then create a new trxn transaction id using this assignment id. This is used in Copy Order.
434: IF l_debug_level > 0 THEN
435: oe_debug_pub.add('Before call to Get Transaction Extension API...');
436: oe_debug_pub.add('Trxn attributes passed ');
437: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 ---> '||p_line_id);
438: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 ---> '||p_payment_number);
439: oe_debug_pub.add('L_trxn_attribs.order_id -----------> '||p_header_id);
440: END IF;
433: -- then create a new trxn transaction id using this assignment id. This is used in Copy Order.
434: IF l_debug_level > 0 THEN
435: oe_debug_pub.add('Before call to Get Transaction Extension API...');
436: oe_debug_pub.add('Trxn attributes passed ');
437: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 ---> '||p_line_id);
438: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 ---> '||p_payment_number);
439: oe_debug_pub.add('L_trxn_attribs.order_id -----------> '||p_header_id);
440: END IF;
441: IBY_FNDCPT_TRXN_PUB.Get_Transaction_Extension
434: IF l_debug_level > 0 THEN
435: oe_debug_pub.add('Before call to Get Transaction Extension API...');
436: oe_debug_pub.add('Trxn attributes passed ');
437: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 ---> '||p_line_id);
438: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 ---> '||p_payment_number);
439: oe_debug_pub.add('L_trxn_attribs.order_id -----------> '||p_header_id);
440: END IF;
441: IBY_FNDCPT_TRXN_PUB.Get_Transaction_Extension
442: (p_api_version => 1.0,
435: oe_debug_pub.add('Before call to Get Transaction Extension API...');
436: oe_debug_pub.add('Trxn attributes passed ');
437: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 ---> '||p_line_id);
438: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 ---> '||p_payment_number);
439: oe_debug_pub.add('L_trxn_attribs.order_id -----------> '||p_header_id);
440: END IF;
441: IBY_FNDCPT_TRXN_PUB.Get_Transaction_Extension
442: (p_api_version => 1.0,
443: X_return_status => l_return_status,
450: --x_settled => l_settled,
451: X_response => l_response_code);
452: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
453: IF l_debug_level > 0 THEN
454: oe_debug_pub.add('Result error code in Get_Transaction_Extension'||l_response_code.result_code);
455: END IF;
456: RAISE FND_API.G_EXC_ERROR;
457: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
458: IF l_debug_level > 0 THEN
455: END IF;
456: RAISE FND_API.G_EXC_ERROR;
457: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
458: IF l_debug_level > 0 THEN
459: oe_debug_pub.add('Result error code in Get_Transaction_Extension'||l_response_code.result_code);
460: END IF;
461: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
462: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
463: IF l_debug_level > 0 THEN
460: END IF;
461: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
462: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
463: IF l_debug_level > 0 THEN
464: oe_debug_pub.add('Get_Transaction_Extension assignment Successful....');
465: oe_debug_pub.add('After call to Get Transaction Extension'||l_return_status);
466: oe_debug_pub.add('After call to get trxn...instr sec code'||l_trxn_attribs.instrument_security_code);
467: END IF;
468: END IF;
461: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
462: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
463: IF l_debug_level > 0 THEN
464: oe_debug_pub.add('Get_Transaction_Extension assignment Successful....');
465: oe_debug_pub.add('After call to Get Transaction Extension'||l_return_status);
466: oe_debug_pub.add('After call to get trxn...instr sec code'||l_trxn_attribs.instrument_security_code);
467: END IF;
468: END IF;
469:
462: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
463: IF l_debug_level > 0 THEN
464: oe_debug_pub.add('Get_Transaction_Extension assignment Successful....');
465: oe_debug_pub.add('After call to Get Transaction Extension'||l_return_status);
466: oe_debug_pub.add('After call to get trxn...instr sec code'||l_trxn_attribs.instrument_security_code);
467: END IF;
468: END IF;
469:
470: -- Based on the trxn extension id get the corresponding
471: -- assignment id from the payments table
472: select instr_assignment_id into l_assign_id
473: from IBY_TRXN_EXTENSIONS_V where trxn_extension_id = p_x_trxn_extension_id;
474: IF l_debug_level > 0 THEN
475: oe_debug_pub.add('Instrument assignment id for existing instrument'||l_assign_id);
476: END IF;
477:
478: END IF;
479:
497:
498: END IF;
499:
500: IF l_debug_level > 0 THEN
501: oe_debug_pub.add('Before calling create_transaction extension');
502: oe_debug_pub.add('payment channel -->'||l_pmt_channel_code);
503: oe_debug_pub.add('Assignment id ---->'|| l_assign_id);
504: oe_debug_pub.add('trxn attributes record type values');
505: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
498: END IF;
499:
500: IF l_debug_level > 0 THEN
501: oe_debug_pub.add('Before calling create_transaction extension');
502: oe_debug_pub.add('payment channel -->'||l_pmt_channel_code);
503: oe_debug_pub.add('Assignment id ---->'|| l_assign_id);
504: oe_debug_pub.add('trxn attributes record type values');
505: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
506: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> 660');
499:
500: IF l_debug_level > 0 THEN
501: oe_debug_pub.add('Before calling create_transaction extension');
502: oe_debug_pub.add('payment channel -->'||l_pmt_channel_code);
503: oe_debug_pub.add('Assignment id ---->'|| l_assign_id);
504: oe_debug_pub.add('trxn attributes record type values');
505: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
506: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> 660');
507: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||p_header_id);
500: IF l_debug_level > 0 THEN
501: oe_debug_pub.add('Before calling create_transaction extension');
502: oe_debug_pub.add('payment channel -->'||l_pmt_channel_code);
503: oe_debug_pub.add('Assignment id ---->'|| l_assign_id);
504: oe_debug_pub.add('trxn attributes record type values');
505: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
506: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> 660');
507: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||p_header_id);
508: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||p_line_id);
501: oe_debug_pub.add('Before calling create_transaction extension');
502: oe_debug_pub.add('payment channel -->'||l_pmt_channel_code);
503: oe_debug_pub.add('Assignment id ---->'|| l_assign_id);
504: oe_debug_pub.add('trxn attributes record type values');
505: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
506: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> 660');
507: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||p_header_id);
508: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||p_line_id);
509: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 --->'||p_payment_number);
502: oe_debug_pub.add('payment channel -->'||l_pmt_channel_code);
503: oe_debug_pub.add('Assignment id ---->'|| l_assign_id);
504: oe_debug_pub.add('trxn attributes record type values');
505: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
506: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> 660');
507: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||p_header_id);
508: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||p_line_id);
509: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 --->'||p_payment_number);
510: oe_debug_pub.add('l_trxn_attribs.VoiceAuth_date ---->'||p_credit_card_approval_date);
503: oe_debug_pub.add('Assignment id ---->'|| l_assign_id);
504: oe_debug_pub.add('trxn attributes record type values');
505: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
506: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> 660');
507: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||p_header_id);
508: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||p_line_id);
509: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 --->'||p_payment_number);
510: oe_debug_pub.add('l_trxn_attribs.VoiceAuth_date ---->'||p_credit_card_approval_date);
511: oe_debug_pub.add('l_trxn_attribs.VoiceAuth_code ---->'||p_credit_card_approval_code);
504: oe_debug_pub.add('trxn attributes record type values');
505: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
506: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> 660');
507: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||p_header_id);
508: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||p_line_id);
509: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 --->'||p_payment_number);
510: oe_debug_pub.add('l_trxn_attribs.VoiceAuth_date ---->'||p_credit_card_approval_date);
511: oe_debug_pub.add('l_trxn_attribs.VoiceAuth_code ---->'||p_credit_card_approval_code);
512: END IF;
505: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
506: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> 660');
507: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||p_header_id);
508: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||p_line_id);
509: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 --->'||p_payment_number);
510: oe_debug_pub.add('l_trxn_attribs.VoiceAuth_date ---->'||p_credit_card_approval_date);
511: oe_debug_pub.add('l_trxn_attribs.VoiceAuth_code ---->'||p_credit_card_approval_code);
512: END IF;
513: --bug 5176015
506: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> 660');
507: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||p_header_id);
508: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||p_line_id);
509: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 --->'||p_payment_number);
510: oe_debug_pub.add('l_trxn_attribs.VoiceAuth_date ---->'||p_credit_card_approval_date);
511: oe_debug_pub.add('l_trxn_attribs.VoiceAuth_code ---->'||p_credit_card_approval_code);
512: END IF;
513: --bug 5176015
514: IF l_assign_id IS NOT NULL THEN
507: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||p_header_id);
508: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||p_line_id);
509: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 --->'||p_payment_number);
510: oe_debug_pub.add('l_trxn_attribs.VoiceAuth_date ---->'||p_credit_card_approval_date);
511: oe_debug_pub.add('l_trxn_attribs.VoiceAuth_code ---->'||p_credit_card_approval_code);
512: END IF;
513: --bug 5176015
514: IF l_assign_id IS NOT NULL THEN
515:
517: l_trxn_attribs.order_id := p_header_id;
518: l_trxn_attribs.trxn_ref_number1 := p_line_id;
519:
520: IF l_debug_level > 0 THEN
521: oe_debug_pub.add('new l_trxn_attribs.order_id -----> '||l_trxn_attribs.order_id);
522: END IF;
523:
524: IBY_Fndcpt_Trxn_Pub.Create_Transaction_Extension
525: (p_api_version => 1.0,
538:
539: --oe_msg_pub.add_text(p_message_text => l_response_code.result_message);
540:
541: IF l_debug_level > 0 THEN
542: oe_debug_pub.add('After calling Create_Transaction_Extension'||l_trxn_extension_id);
543: oe_debug_pub.add('Result code'||l_Response_code.result_code);
544: oe_debug_pub.add('Return status'||l_Return_Status);
545: END IF;
546:
539: --oe_msg_pub.add_text(p_message_text => l_response_code.result_message);
540:
541: IF l_debug_level > 0 THEN
542: oe_debug_pub.add('After calling Create_Transaction_Extension'||l_trxn_extension_id);
543: oe_debug_pub.add('Result code'||l_Response_code.result_code);
544: oe_debug_pub.add('Return status'||l_Return_Status);
545: END IF;
546:
547: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
540:
541: IF l_debug_level > 0 THEN
542: oe_debug_pub.add('After calling Create_Transaction_Extension'||l_trxn_extension_id);
543: oe_debug_pub.add('Result code'||l_Response_code.result_code);
544: oe_debug_pub.add('Return status'||l_Return_Status);
545: END IF;
546:
547: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
548: IF l_debug_level > 0 THEN
545: END IF;
546:
547: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
548: IF l_debug_level > 0 THEN
549: oe_debug_pub.add('Result error code in Create_Transaction_Extension'||l_response_code.result_code);
550: END IF;
551: RAISE FND_API.G_EXC_ERROR;
552: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
553: IF l_debug_level > 0 THEN
550: END IF;
551: RAISE FND_API.G_EXC_ERROR;
552: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
553: IF l_debug_level > 0 THEN
554: oe_debug_pub.add('Result error code in Create_Transaction_Extension'||l_response_code.result_code);
555: END IF;
556: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
557: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
558: IF l_debug_level > 0 THEN
555: END IF;
556: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
557: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
558: IF l_debug_level > 0 THEN
559: oe_debug_pub.add('Create_Transaction_Extension assignment Successful....');
560: oe_debug_pub.add('After call to Create_Transaction_Extension'||l_return_status);
561: oe_debug_pub.add('After call to create Transaction Extension');
562: oe_debug_pub.add('New trxn extension id'||l_trxn_extension_id);
563: oe_debug_pub.add('Return status'||l_return_status);
556: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
557: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
558: IF l_debug_level > 0 THEN
559: oe_debug_pub.add('Create_Transaction_Extension assignment Successful....');
560: oe_debug_pub.add('After call to Create_Transaction_Extension'||l_return_status);
561: oe_debug_pub.add('After call to create Transaction Extension');
562: oe_debug_pub.add('New trxn extension id'||l_trxn_extension_id);
563: oe_debug_pub.add('Return status'||l_return_status);
564: END IF;
557: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
558: IF l_debug_level > 0 THEN
559: oe_debug_pub.add('Create_Transaction_Extension assignment Successful....');
560: oe_debug_pub.add('After call to Create_Transaction_Extension'||l_return_status);
561: oe_debug_pub.add('After call to create Transaction Extension');
562: oe_debug_pub.add('New trxn extension id'||l_trxn_extension_id);
563: oe_debug_pub.add('Return status'||l_return_status);
564: END IF;
565:
558: IF l_debug_level > 0 THEN
559: oe_debug_pub.add('Create_Transaction_Extension assignment Successful....');
560: oe_debug_pub.add('After call to Create_Transaction_Extension'||l_return_status);
561: oe_debug_pub.add('After call to create Transaction Extension');
562: oe_debug_pub.add('New trxn extension id'||l_trxn_extension_id);
563: oe_debug_pub.add('Return status'||l_return_status);
564: END IF;
565:
566: -- bug 5204275
559: oe_debug_pub.add('Create_Transaction_Extension assignment Successful....');
560: oe_debug_pub.add('After call to Create_Transaction_Extension'||l_return_status);
561: oe_debug_pub.add('After call to create Transaction Extension');
562: oe_debug_pub.add('New trxn extension id'||l_trxn_extension_id);
563: oe_debug_pub.add('Return status'||l_return_status);
564: END IF;
565:
566: -- bug 5204275
567: IF p_payment_type_code = 'CREDIT_CARD'
579: --bug 5176015
580: P_x_trxn_extension_id := l_trxn_extension_id;
581: X_return_status := FND_API.G_RET_STS_SUCCESS;
582: IF l_debug_level > 0 THEN
583: oe_debug_pub.add('Exiting Create_Payment_Trxn.....');
584: END IF;
585: EXCEPTION
586:
587: WHEN FND_API.G_EXC_ERROR THEN
586:
587: WHEN FND_API.G_EXC_ERROR THEN
588: l_err_message := SQLERRM;
589: IF l_debug_level > 0 THEN
590: oe_debug_pub.add('Create_Transaction_Extension assignment error....exc');
591: oe_debug_pub.add('After call to Create_Transaction_Extension'||l_return_status);
592: oe_debug_pub.add('Result code'||l_response_code.result_code);
593: oe_debug_pub.add('Error'||l_err_message);
594: END IF;
587: WHEN FND_API.G_EXC_ERROR THEN
588: l_err_message := SQLERRM;
589: IF l_debug_level > 0 THEN
590: oe_debug_pub.add('Create_Transaction_Extension assignment error....exc');
591: oe_debug_pub.add('After call to Create_Transaction_Extension'||l_return_status);
592: oe_debug_pub.add('Result code'||l_response_code.result_code);
593: oe_debug_pub.add('Error'||l_err_message);
594: END IF;
595:
588: l_err_message := SQLERRM;
589: IF l_debug_level > 0 THEN
590: oe_debug_pub.add('Create_Transaction_Extension assignment error....exc');
591: oe_debug_pub.add('After call to Create_Transaction_Extension'||l_return_status);
592: oe_debug_pub.add('Result code'||l_response_code.result_code);
593: oe_debug_pub.add('Error'||l_err_message);
594: END IF;
595:
596: X_return_status := FND_API.G_RET_STS_ERROR;
589: IF l_debug_level > 0 THEN
590: oe_debug_pub.add('Create_Transaction_Extension assignment error....exc');
591: oe_debug_pub.add('After call to Create_Transaction_Extension'||l_return_status);
592: oe_debug_pub.add('Result code'||l_response_code.result_code);
593: oe_debug_pub.add('Error'||l_err_message);
594: END IF;
595:
596: X_return_status := FND_API.G_RET_STS_ERROR;
597: OE_MSG_PUB.Count_And_Get
602:
603: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
604: l_err_message := SQLERRM;
605: IF l_debug_level > 0 THEN
606: oe_debug_pub.add('Create_Transaction_Extension assignment error....unxc');
607: oe_debug_pub.add('After call to Create_Transaction_Extension'||l_return_status);
608: oe_debug_pub.add('Result code'||l_response_code.result_code);
609: oe_debug_pub.add('f Error'||l_err_message);
610: END IF;
603: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
604: l_err_message := SQLERRM;
605: IF l_debug_level > 0 THEN
606: oe_debug_pub.add('Create_Transaction_Extension assignment error....unxc');
607: oe_debug_pub.add('After call to Create_Transaction_Extension'||l_return_status);
608: oe_debug_pub.add('Result code'||l_response_code.result_code);
609: oe_debug_pub.add('f Error'||l_err_message);
610: END IF;
611:
604: l_err_message := SQLERRM;
605: IF l_debug_level > 0 THEN
606: oe_debug_pub.add('Create_Transaction_Extension assignment error....unxc');
607: oe_debug_pub.add('After call to Create_Transaction_Extension'||l_return_status);
608: oe_debug_pub.add('Result code'||l_response_code.result_code);
609: oe_debug_pub.add('f Error'||l_err_message);
610: END IF;
611:
612: X_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
605: IF l_debug_level > 0 THEN
606: oe_debug_pub.add('Create_Transaction_Extension assignment error....unxc');
607: oe_debug_pub.add('After call to Create_Transaction_Extension'||l_return_status);
608: oe_debug_pub.add('Result code'||l_response_code.result_code);
609: oe_debug_pub.add('f Error'||l_err_message);
610: END IF;
611:
612: X_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
613: OE_MSG_PUB.Count_And_Get
618:
619: WHEN OTHERS THEN
620: l_err_message := SQLERRM;
621: IF l_debug_level > 0 THEN
622: oe_debug_pub.add('Create_Transaction_Extension assignment error....others');
623: oe_debug_pub.add('After call to Create_Transaction_Extension'||l_return_status);
624: oe_debug_pub.add('Result code'||l_response_code.result_code);
625: oe_debug_pub.add('trx Error'||l_err_message);
626: END IF;
619: WHEN OTHERS THEN
620: l_err_message := SQLERRM;
621: IF l_debug_level > 0 THEN
622: oe_debug_pub.add('Create_Transaction_Extension assignment error....others');
623: oe_debug_pub.add('After call to Create_Transaction_Extension'||l_return_status);
624: oe_debug_pub.add('Result code'||l_response_code.result_code);
625: oe_debug_pub.add('trx Error'||l_err_message);
626: END IF;
627:
620: l_err_message := SQLERRM;
621: IF l_debug_level > 0 THEN
622: oe_debug_pub.add('Create_Transaction_Extension assignment error....others');
623: oe_debug_pub.add('After call to Create_Transaction_Extension'||l_return_status);
624: oe_debug_pub.add('Result code'||l_response_code.result_code);
625: oe_debug_pub.add('trx Error'||l_err_message);
626: END IF;
627:
628: X_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
621: IF l_debug_level > 0 THEN
622: oe_debug_pub.add('Create_Transaction_Extension assignment error....others');
623: oe_debug_pub.add('After call to Create_Transaction_Extension'||l_return_status);
624: oe_debug_pub.add('Result code'||l_response_code.result_code);
625: oe_debug_pub.add('trx Error'||l_err_message);
626: END IF;
627:
628: X_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
629: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
687: L_instrument IBY_FNDCPT_SETUP_PUB.PmtInstrument_rec_type;
688: L_assign_id NUMBER;
689: l_invoice_to_org_id OE_ORDER_LINES_ALL.invoice_to_org_id%TYPE;
690: L_pmt_channel_code IBY_FNDCPT_PMT_CHNNLS_VL.payment_channel_code%TYPE;
691: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
692: l_payment_number NUMBER;
693: l_cust_account_id NUMBER; --New
694: l_party_site_id NUMBER;
695: --Bug 4885313
712: BEGIN
713:
714:
715: IF l_debug_level > 0 THEN
716: oe_debug_pub.add('Entering OE_PAYMENT_TRXN_UTIL.Update_Payment_Trxn...');
717: END IF;
718:
719: IF p_payment_type_code IN( 'CREDIT_CARD') THEN
720: L_pmt_channel_code := p_payment_type_code;
729: l_pmt_channel_code := 'BANK_ACCT_XFER';
730: END IF;
731:
732: IF l_debug_level > 0 THEN
733: oe_debug_pub.add('Payment channel code returned --->'||l_pmt_channel_code);
734: END IF;
735:
736: --Getting the instrument type based on
737: --payment channel code
740: FROM iby_fndcpt_all_pmt_channels_v ifapc
741: WHERE ifapc.payment_channel_code = l_pmt_channel_code;
742:
743: IF l_debug_level > 0 THEN
744: oe_debug_pub.add('Instrument type and instrument id'||l_instrument_type||' and '||l_instrument_id);
745: END IF;
746:
747: --Get party id for the bill to site Verify
748:
760: l_org_id := OE_Order_Cache.g_header_rec.org_id;
761: end if;
762:
763: IF l_debug_level > 0 THEN
764: oe_debug_pub.add('INVOICE_TO_ORG_ID and ORG_ID'||l_invoice_to_org_id||' and '||l_org_id);
765: END IF;
766:
767: Begin
768: Select hca.party_id, acct_site.cust_account_id,acct_site.party_site_id
781: Null;
782: End;
783:
784: IF l_debug_level > 0 THEN
785: oe_debug_pub.add('Party id retrieved from hz tables-->'||l_party_id);
786: oe_debug_pub.add('Payment trxid..'||p_payment_trx_id);
787: END IF;
788:
789:
782: End;
783:
784: IF l_debug_level > 0 THEN
785: oe_debug_pub.add('Party id retrieved from hz tables-->'||l_party_id);
786: oe_debug_pub.add('Payment trxid..'||p_payment_trx_id);
787: END IF;
788:
789:
790: l_payer.payment_function := 'CUSTOMER_PAYMENT';
794: l_payer.cust_account_id := l_cust_account_id;
795: l_payer.account_site_id := p_site_use_id;
796:
797: IF l_debug_level > 0 THEN
798: oe_debug_pub.add('Payer context values');
799: oe_debug_pub.add('Payment function --- CUSTOMER_PAYMENT');
800: oe_debug_pub.add('PARTY ID'||l_party_id);
801: oe_debug_pub.add('org_id'||l_org_id);
802: oe_debug_pub.add('org type'||l_org_type);
795: l_payer.account_site_id := p_site_use_id;
796:
797: IF l_debug_level > 0 THEN
798: oe_debug_pub.add('Payer context values');
799: oe_debug_pub.add('Payment function --- CUSTOMER_PAYMENT');
800: oe_debug_pub.add('PARTY ID'||l_party_id);
801: oe_debug_pub.add('org_id'||l_org_id);
802: oe_debug_pub.add('org type'||l_org_type);
803: oe_debug_pub.add('cust acct id'||l_cust_account_id);
796:
797: IF l_debug_level > 0 THEN
798: oe_debug_pub.add('Payer context values');
799: oe_debug_pub.add('Payment function --- CUSTOMER_PAYMENT');
800: oe_debug_pub.add('PARTY ID'||l_party_id);
801: oe_debug_pub.add('org_id'||l_org_id);
802: oe_debug_pub.add('org type'||l_org_type);
803: oe_debug_pub.add('cust acct id'||l_cust_account_id);
804: oe_debug_pub.add('account site id'||p_site_use_id);
797: IF l_debug_level > 0 THEN
798: oe_debug_pub.add('Payer context values');
799: oe_debug_pub.add('Payment function --- CUSTOMER_PAYMENT');
800: oe_debug_pub.add('PARTY ID'||l_party_id);
801: oe_debug_pub.add('org_id'||l_org_id);
802: oe_debug_pub.add('org type'||l_org_type);
803: oe_debug_pub.add('cust acct id'||l_cust_account_id);
804: oe_debug_pub.add('account site id'||p_site_use_id);
805: END IF;
798: oe_debug_pub.add('Payer context values');
799: oe_debug_pub.add('Payment function --- CUSTOMER_PAYMENT');
800: oe_debug_pub.add('PARTY ID'||l_party_id);
801: oe_debug_pub.add('org_id'||l_org_id);
802: oe_debug_pub.add('org type'||l_org_type);
803: oe_debug_pub.add('cust acct id'||l_cust_account_id);
804: oe_debug_pub.add('account site id'||p_site_use_id);
805: END IF;
806:
799: oe_debug_pub.add('Payment function --- CUSTOMER_PAYMENT');
800: oe_debug_pub.add('PARTY ID'||l_party_id);
801: oe_debug_pub.add('org_id'||l_org_id);
802: oe_debug_pub.add('org type'||l_org_type);
803: oe_debug_pub.add('cust acct id'||l_cust_account_id);
804: oe_debug_pub.add('account site id'||p_site_use_id);
805: END IF;
806:
807: IF p_payment_type_code IN ('ACH', 'DIRECT_DEBIT') THEN
800: oe_debug_pub.add('PARTY ID'||l_party_id);
801: oe_debug_pub.add('org_id'||l_org_id);
802: oe_debug_pub.add('org type'||l_org_type);
803: oe_debug_pub.add('cust acct id'||l_cust_account_id);
804: oe_debug_pub.add('account site id'||p_site_use_id);
805: END IF;
806:
807: IF p_payment_type_code IN ('ACH', 'DIRECT_DEBIT') THEN
808: --bug 5170754
815: --set_payer_assignment API of payments to get the assignment
816: --id even though the assignment id is passed from the front end.
817: IF p_payment_trx_id IS NOT NULL THEN
818: IF l_debug_level > 0 THEN
819: oe_debug_pub.add('Assignment id for ach / direct debit --> '||p_payment_trx_id);
820: END IF;
821:
822: SELECT INSTRUMENT_ID into
823: l_instrument_id from
830: l_instrument.instrument_type := l_instrument_type;
831: l_assignment_attribs.instrument := l_instrument;
832:
833: IF l_debug_level > 0 THEN
834: oe_debug_pub.add('Before call to Set payer instr assignment API...');
835: oe_debug_pub.add('Assignment attributes passed ');
836: oe_debug_pub.add('l_instrument.instrument_id ---> '||l_instrument_id);
837: oe_debug_pub.add('l_instrument.instrument_type -> '||l_instrument_type);
838: END IF;
831: l_assignment_attribs.instrument := l_instrument;
832:
833: IF l_debug_level > 0 THEN
834: oe_debug_pub.add('Before call to Set payer instr assignment API...');
835: oe_debug_pub.add('Assignment attributes passed ');
836: oe_debug_pub.add('l_instrument.instrument_id ---> '||l_instrument_id);
837: oe_debug_pub.add('l_instrument.instrument_type -> '||l_instrument_type);
838: END IF;
839:
832:
833: IF l_debug_level > 0 THEN
834: oe_debug_pub.add('Before call to Set payer instr assignment API...');
835: oe_debug_pub.add('Assignment attributes passed ');
836: oe_debug_pub.add('l_instrument.instrument_id ---> '||l_instrument_id);
837: oe_debug_pub.add('l_instrument.instrument_type -> '||l_instrument_type);
838: END IF;
839:
840: --
833: IF l_debug_level > 0 THEN
834: oe_debug_pub.add('Before call to Set payer instr assignment API...');
835: oe_debug_pub.add('Assignment attributes passed ');
836: oe_debug_pub.add('l_instrument.instrument_id ---> '||l_instrument_id);
837: oe_debug_pub.add('l_instrument.instrument_type -> '||l_instrument_type);
838: END IF;
839:
840: --
841: IBY_FNDCPT_SETUP_PUB.Set_Payer_Instr_Assignment
852: --oe_msg_pub.add_text(p_message_text => l_response_code.result_message);
853:
854: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
855: IF l_debug_level > 0 THEN
856: oe_debug_pub.add('Result error code in Set_Payer_Instr_Assignment'||l_response_code.result_code);
857: END IF;
858: IF l_response_code.result_code = 'INVALID_CARD_NUMBER' THEN
859: FND_MESSAGE.SET_NAME('ONT','OE_VPM_CC_ACCT_NOT_SET');
860: OE_MSG_PUB.ADD;
858: IF l_response_code.result_code = 'INVALID_CARD_NUMBER' THEN
859: FND_MESSAGE.SET_NAME('ONT','OE_VPM_CC_ACCT_NOT_SET');
860: OE_MSG_PUB.ADD;
861: IF l_debug_level > 0 THEN
862: oe_debug_pub.add( 'OEXUPTXB: Invalid card number or expiration date' ) ;
863: END IF;
864: ELSIF l_response_code.result_code = 'INVALID_ADDRESS' THEN
865: FND_MESSAGE.SET_NAME('ONT','OE_CC_BILL_TO_ADDRESS_INVALID');
866: OE_MSG_PUB.ADD;
864: ELSIF l_response_code.result_code = 'INVALID_ADDRESS' THEN
865: FND_MESSAGE.SET_NAME('ONT','OE_CC_BILL_TO_ADDRESS_INVALID');
866: OE_MSG_PUB.ADD;
867: IF l_debug_level > 0 THEN
868: oe_debug_pub.add( 'OEXUPTXB: Invalid billing address' ) ;
869: END IF;
870: ELSIF l_response_code.result_code = 'INVALID_CARD_ISSUER' THEN
871: FND_MESSAGE.SET_NAME('ONT','OE_VPM_CC_ACCT_NOT_SET'); --bug 5012613
872: OE_MSG_PUB.ADD;
870: ELSIF l_response_code.result_code = 'INVALID_CARD_ISSUER' THEN
871: FND_MESSAGE.SET_NAME('ONT','OE_VPM_CC_ACCT_NOT_SET'); --bug 5012613
872: OE_MSG_PUB.ADD;
873: IF l_debug_level > 0 THEN
874: oe_debug_pub.add( 'OEXUPTXB: Invalid billing address' ) ;
875: END IF;
876: END IF;
877: RAISE FND_API.G_EXC_ERROR;
878: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
876: END IF;
877: RAISE FND_API.G_EXC_ERROR;
878: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
879: IF l_debug_level > 0 THEN
880: oe_debug_pub.add('Result error code in Set_Payer_Instr_Assignment'||l_response_code.result_code);
881: END IF;
882: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
883: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
884: IF l_debug_level > 0 THEN
881: END IF;
882: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
883: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
884: IF l_debug_level > 0 THEN
885: oe_debug_pub.add('Set_Payer_Instr_Assignment assignment Successful....');
886: oe_debug_pub.add('After calling Set_Payer_Instr_Assignment');
887: oe_debug_pub.add('Instr assignment id'||l_assign_id);
888: END IF;
889: END IF;
882: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
883: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
884: IF l_debug_level > 0 THEN
885: oe_debug_pub.add('Set_Payer_Instr_Assignment assignment Successful....');
886: oe_debug_pub.add('After calling Set_Payer_Instr_Assignment');
887: oe_debug_pub.add('Instr assignment id'||l_assign_id);
888: END IF;
889: END IF;
890:
883: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
884: IF l_debug_level > 0 THEN
885: oe_debug_pub.add('Set_Payer_Instr_Assignment assignment Successful....');
886: oe_debug_pub.add('After calling Set_Payer_Instr_Assignment');
887: oe_debug_pub.add('Instr assignment id'||l_assign_id);
888: END IF;
889: END IF;
890:
891: --END IF; --bug 5170754
891: --END IF; --bug 5170754
892: ELSIF p_payment_type_code = 'CREDIT_CARD' THEN
893:
894: IF l_debug_level > 0 THEN
895: oe_debug_pub.add('l_inst id'||l_instrument_id);
896: oe_debug_pub.add('Instr assignment id'||l_instrument_assignment_id);
897: oe_debug_pub.add('X value'||instr(p_card_number,'X'));
898: END IF;
899:
892: ELSIF p_payment_type_code = 'CREDIT_CARD' THEN
893:
894: IF l_debug_level > 0 THEN
895: oe_debug_pub.add('l_inst id'||l_instrument_id);
896: oe_debug_pub.add('Instr assignment id'||l_instrument_assignment_id);
897: oe_debug_pub.add('X value'||instr(p_card_number,'X'));
898: END IF;
899:
900: IF p_update_card_flag = 'Y' AND l_instrument_id is not null THEN
893:
894: IF l_debug_level > 0 THEN
895: oe_debug_pub.add('l_inst id'||l_instrument_id);
896: oe_debug_pub.add('Instr assignment id'||l_instrument_assignment_id);
897: oe_debug_pub.add('X value'||instr(p_card_number,'X'));
898: END IF;
899:
900: IF p_update_card_flag = 'Y' AND l_instrument_id is not null THEN
901: IF l_debug_level > 0 THEN
898: END IF;
899:
900: IF p_update_card_flag = 'Y' AND l_instrument_id is not null THEN
901: IF l_debug_level > 0 THEN
902: oe_debug_pub.add('Before calling update_card..');
903: oe_debug_pub.add('Expiration date passed...'||p_exp_date);
904: oe_debug_pub.add('Holder name'||p_card_holder_name);
905: oe_debug_pub.add('Instrument id'||l_instrument_id);
906: END IF;
899:
900: IF p_update_card_flag = 'Y' AND l_instrument_id is not null THEN
901: IF l_debug_level > 0 THEN
902: oe_debug_pub.add('Before calling update_card..');
903: oe_debug_pub.add('Expiration date passed...'||p_exp_date);
904: oe_debug_pub.add('Holder name'||p_card_holder_name);
905: oe_debug_pub.add('Instrument id'||l_instrument_id);
906: END IF;
907: L_credit_card_rec.expiration_date := p_exp_date;
900: IF p_update_card_flag = 'Y' AND l_instrument_id is not null THEN
901: IF l_debug_level > 0 THEN
902: oe_debug_pub.add('Before calling update_card..');
903: oe_debug_pub.add('Expiration date passed...'||p_exp_date);
904: oe_debug_pub.add('Holder name'||p_card_holder_name);
905: oe_debug_pub.add('Instrument id'||l_instrument_id);
906: END IF;
907: L_credit_card_rec.expiration_date := p_exp_date;
908: l_credit_card_rec.Card_Holder_Name := p_card_holder_name;
901: IF l_debug_level > 0 THEN
902: oe_debug_pub.add('Before calling update_card..');
903: oe_debug_pub.add('Expiration date passed...'||p_exp_date);
904: oe_debug_pub.add('Holder name'||p_card_holder_name);
905: oe_debug_pub.add('Instrument id'||l_instrument_id);
906: END IF;
907: L_credit_card_rec.expiration_date := p_exp_date;
908: l_credit_card_rec.Card_Holder_Name := p_card_holder_name;
909: l_credit_Card_rec.card_id := l_instrument_id;
921: --oe_msg_pub.add_text(p_message_text => l_response_code.result_message);
922:
923: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
924: IF l_debug_level > 0 THEN
925: oe_debug_pub.add('Result error code in Update_Card exp'||l_response_code.result_code);
926: END IF;
927: RAISE FND_API.G_EXC_ERROR;
928: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
929: IF l_debug_level > 0 THEN
926: END IF;
927: RAISE FND_API.G_EXC_ERROR;
928: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
929: IF l_debug_level > 0 THEN
930: oe_debug_pub.add('Result error code in Update_Card unxc'||l_response_code.result_code);
931: END IF;
932: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
933: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
934: IF l_debug_level > 0 THEN
931: END IF;
932: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
933: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
934: IF l_debug_level > 0 THEN
935: oe_debug_pub.add('Update_Card Successful....');
936: oe_debug_pub.add('Return status '||l_return_status);
937: END IF;
938: END IF; --return status
939: END IF; --update card flag
932: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
933: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
934: IF l_debug_level > 0 THEN
935: oe_debug_pub.add('Update_Card Successful....');
936: oe_debug_pub.add('Return status '||l_return_status);
937: END IF;
938: END IF; --return status
939: END IF; --update card flag
940:
939: END IF; --update card flag
940:
941: IF l_instrument_assignment_id IS NOT NULL THEN
942: IF l_debug_level > 0 THEN
943: oe_debug_pub.add('Before call to Set payer instr assignment API...');
944: oe_debug_pub.add('Assignment attributes passed ');
945: oe_debug_pub.add('l_instrument.instrument_id ---> '||l_instrument_id);
946: oe_debug_pub.add('l_instrument.instrument_type -> '||l_instrument_type);
947: END IF;
940:
941: IF l_instrument_assignment_id IS NOT NULL THEN
942: IF l_debug_level > 0 THEN
943: oe_debug_pub.add('Before call to Set payer instr assignment API...');
944: oe_debug_pub.add('Assignment attributes passed ');
945: oe_debug_pub.add('l_instrument.instrument_id ---> '||l_instrument_id);
946: oe_debug_pub.add('l_instrument.instrument_type -> '||l_instrument_type);
947: END IF;
948: l_instrument.instrument_id := l_instrument_id;
941: IF l_instrument_assignment_id IS NOT NULL THEN
942: IF l_debug_level > 0 THEN
943: oe_debug_pub.add('Before call to Set payer instr assignment API...');
944: oe_debug_pub.add('Assignment attributes passed ');
945: oe_debug_pub.add('l_instrument.instrument_id ---> '||l_instrument_id);
946: oe_debug_pub.add('l_instrument.instrument_type -> '||l_instrument_type);
947: END IF;
948: l_instrument.instrument_id := l_instrument_id;
949: l_instrument.instrument_type := l_instrument_type;
942: IF l_debug_level > 0 THEN
943: oe_debug_pub.add('Before call to Set payer instr assignment API...');
944: oe_debug_pub.add('Assignment attributes passed ');
945: oe_debug_pub.add('l_instrument.instrument_id ---> '||l_instrument_id);
946: oe_debug_pub.add('l_instrument.instrument_type -> '||l_instrument_type);
947: END IF;
948: l_instrument.instrument_id := l_instrument_id;
949: l_instrument.instrument_type := l_instrument_type;
950: l_assignment_attribs.instrument := l_instrument;
961: X_response => l_response_code);
962:
963: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
964: IF l_debug_level > 0 THEN
965: oe_debug_pub.add('Result error code in set payer instr assignment'||l_response_code.result_code);
966: END IF;
967: RAISE FND_API.G_EXC_ERROR;
968: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
969: IF l_debug_level > 0 THEN
966: END IF;
967: RAISE FND_API.G_EXC_ERROR;
968: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
969: IF l_debug_level > 0 THEN
970: oe_debug_pub.add('Result error code in set payer instr assignment'||l_response_code.result_code);
971: END IF;
972: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
973: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
974: IF l_debug_level > 0 THEN
971: END IF;
972: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
973: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
974: IF l_debug_level > 0 THEN
975: oe_debug_pub.add('Set Payer instr assignment Successful....');
976: oe_debug_pub.add('After calling Set_Payer_Instr_Assignment');
977: oe_debug_pub.add('Instr assignment id'||l_assign_id);
978: END IF;
979: END IF;
972: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
973: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
974: IF l_debug_level > 0 THEN
975: oe_debug_pub.add('Set Payer instr assignment Successful....');
976: oe_debug_pub.add('After calling Set_Payer_Instr_Assignment');
977: oe_debug_pub.add('Instr assignment id'||l_assign_id);
978: END IF;
979: END IF;
980: ELSE
973: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
974: IF l_debug_level > 0 THEN
975: oe_debug_pub.add('Set Payer instr assignment Successful....');
976: oe_debug_pub.add('After calling Set_Payer_Instr_Assignment');
977: oe_debug_pub.add('Instr assignment id'||l_assign_id);
978: END IF;
979: END IF;
980: ELSE
981: L_credit_card_rec.owner_id := l_party_id;
986: L_credit_card_rec.card_issuer := p_card_code;
987: L_credit_card_rec.instrument_type := l_instrument_type;
988:
989: IF l_debug_level > 0 THEN
990: oe_debug_pub.add('Before calling process credit card....');
991: oe_debug_pub.add('l_party_site_id/stmt billing add'||l_party_site_id);
992: oe_debug_pub.add('site use id/invoice to org'||p_site_use_id);
993: oe_debug_pub.add('card number'||p_card_number);
994: oe_debug_pub.add('expiration date'||p_exp_date);
987: L_credit_card_rec.instrument_type := l_instrument_type;
988:
989: IF l_debug_level > 0 THEN
990: oe_debug_pub.add('Before calling process credit card....');
991: oe_debug_pub.add('l_party_site_id/stmt billing add'||l_party_site_id);
992: oe_debug_pub.add('site use id/invoice to org'||p_site_use_id);
993: oe_debug_pub.add('card number'||p_card_number);
994: oe_debug_pub.add('expiration date'||p_exp_date);
995: oe_debug_pub.add('instrument_type'||l_instrument_type);
988:
989: IF l_debug_level > 0 THEN
990: oe_debug_pub.add('Before calling process credit card....');
991: oe_debug_pub.add('l_party_site_id/stmt billing add'||l_party_site_id);
992: oe_debug_pub.add('site use id/invoice to org'||p_site_use_id);
993: oe_debug_pub.add('card number'||p_card_number);
994: oe_debug_pub.add('expiration date'||p_exp_date);
995: oe_debug_pub.add('instrument_type'||l_instrument_type);
996: oe_debug_pub.add('Card issuer'||p_card_code);
989: IF l_debug_level > 0 THEN
990: oe_debug_pub.add('Before calling process credit card....');
991: oe_debug_pub.add('l_party_site_id/stmt billing add'||l_party_site_id);
992: oe_debug_pub.add('site use id/invoice to org'||p_site_use_id);
993: oe_debug_pub.add('card number'||p_card_number);
994: oe_debug_pub.add('expiration date'||p_exp_date);
995: oe_debug_pub.add('instrument_type'||l_instrument_type);
996: oe_debug_pub.add('Card issuer'||p_card_code);
997: oe_debug_pub.add('Instrument id'||l_instrument_id);
990: oe_debug_pub.add('Before calling process credit card....');
991: oe_debug_pub.add('l_party_site_id/stmt billing add'||l_party_site_id);
992: oe_debug_pub.add('site use id/invoice to org'||p_site_use_id);
993: oe_debug_pub.add('card number'||p_card_number);
994: oe_debug_pub.add('expiration date'||p_exp_date);
995: oe_debug_pub.add('instrument_type'||l_instrument_type);
996: oe_debug_pub.add('Card issuer'||p_card_code);
997: oe_debug_pub.add('Instrument id'||l_instrument_id);
998: oe_debug_pub.add('Holder name'||p_card_holder_name);
991: oe_debug_pub.add('l_party_site_id/stmt billing add'||l_party_site_id);
992: oe_debug_pub.add('site use id/invoice to org'||p_site_use_id);
993: oe_debug_pub.add('card number'||p_card_number);
994: oe_debug_pub.add('expiration date'||p_exp_date);
995: oe_debug_pub.add('instrument_type'||l_instrument_type);
996: oe_debug_pub.add('Card issuer'||p_card_code);
997: oe_debug_pub.add('Instrument id'||l_instrument_id);
998: oe_debug_pub.add('Holder name'||p_card_holder_name);
999: oe_debug_pub.add('call to process credit card');
992: oe_debug_pub.add('site use id/invoice to org'||p_site_use_id);
993: oe_debug_pub.add('card number'||p_card_number);
994: oe_debug_pub.add('expiration date'||p_exp_date);
995: oe_debug_pub.add('instrument_type'||l_instrument_type);
996: oe_debug_pub.add('Card issuer'||p_card_code);
997: oe_debug_pub.add('Instrument id'||l_instrument_id);
998: oe_debug_pub.add('Holder name'||p_card_holder_name);
999: oe_debug_pub.add('call to process credit card');
1000: END IF;
993: oe_debug_pub.add('card number'||p_card_number);
994: oe_debug_pub.add('expiration date'||p_exp_date);
995: oe_debug_pub.add('instrument_type'||l_instrument_type);
996: oe_debug_pub.add('Card issuer'||p_card_code);
997: oe_debug_pub.add('Instrument id'||l_instrument_id);
998: oe_debug_pub.add('Holder name'||p_card_holder_name);
999: oe_debug_pub.add('call to process credit card');
1000: END IF;
1001:
994: oe_debug_pub.add('expiration date'||p_exp_date);
995: oe_debug_pub.add('instrument_type'||l_instrument_type);
996: oe_debug_pub.add('Card issuer'||p_card_code);
997: oe_debug_pub.add('Instrument id'||l_instrument_id);
998: oe_debug_pub.add('Holder name'||p_card_holder_name);
999: oe_debug_pub.add('call to process credit card');
1000: END IF;
1001:
1002: IBY_FNDCPT_SETUP_PUB.Process_Credit_Card
995: oe_debug_pub.add('instrument_type'||l_instrument_type);
996: oe_debug_pub.add('Card issuer'||p_card_code);
997: oe_debug_pub.add('Instrument id'||l_instrument_id);
998: oe_debug_pub.add('Holder name'||p_card_holder_name);
999: oe_debug_pub.add('call to process credit card');
1000: END IF;
1001:
1002: IBY_FNDCPT_SETUP_PUB.Process_Credit_Card
1003: (p_api_version => 1.0,
1013:
1014: --oe_msg_pub.add_text(p_message_text => l_response_code.result_message);
1015:
1016: IF l_debug_level > 0 THEN
1017: oe_debug_pub.add('After call to process credit card....');
1018: END IF;
1019:
1020:
1021: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
1019:
1020:
1021: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
1022: IF l_debug_level > 0 THEN
1023: oe_debug_pub.add('Result error code in Process_Credit_Card -->'||l_response_code.result_code);
1024: END IF;
1025: IF l_response_code.result_code = 'INVALID_CARD_NUMBER' THEN
1026: FND_MESSAGE.SET_NAME('ONT','OE_VPM_CC_ACCT_NOT_SET');
1027: OE_MSG_PUB.ADD;
1025: IF l_response_code.result_code = 'INVALID_CARD_NUMBER' THEN
1026: FND_MESSAGE.SET_NAME('ONT','OE_VPM_CC_ACCT_NOT_SET');
1027: OE_MSG_PUB.ADD;
1028: IF l_debug_level > 0 THEN
1029: oe_debug_pub.add( 'OEXUPTXB: Invalid card number or expiration date' ) ;
1030: END IF;
1031: ELSIF l_response_code.result_code = 'INVALID_ADDRESS' THEN
1032: FND_MESSAGE.SET_NAME('ONT','OE_CC_BILL_TO_ADDRESS_INVALID');
1033: OE_MSG_PUB.ADD;
1031: ELSIF l_response_code.result_code = 'INVALID_ADDRESS' THEN
1032: FND_MESSAGE.SET_NAME('ONT','OE_CC_BILL_TO_ADDRESS_INVALID');
1033: OE_MSG_PUB.ADD;
1034: IF l_debug_level > 0 THEN
1035: oe_debug_pub.add( 'OEXUPTXB: Invalid billing address' ) ;
1036: END IF;
1037: ELSIF l_response_code.result_code = 'INVALID_CARD_ISSUER' THEN
1038: FND_MESSAGE.SET_NAME('ONT','OE_VPM_CC_ACCT_NOT_SET'); --bug 5012613
1039: OE_MSG_PUB.ADD;
1037: ELSIF l_response_code.result_code = 'INVALID_CARD_ISSUER' THEN
1038: FND_MESSAGE.SET_NAME('ONT','OE_VPM_CC_ACCT_NOT_SET'); --bug 5012613
1039: OE_MSG_PUB.ADD;
1040: IF l_debug_level > 0 THEN
1041: oe_debug_pub.add( 'OEXUPTXB: Invalid billing address' ) ;
1042: END IF;
1043: ELSE --Setting a generic message bug 5244099
1044: FND_MESSAGE.SET_NAME('ONT','OE_VPM_CC_ACCT_NOT_SET');
1045: OE_MSG_PUB.ADD;
1043: ELSE --Setting a generic message bug 5244099
1044: FND_MESSAGE.SET_NAME('ONT','OE_VPM_CC_ACCT_NOT_SET');
1045: OE_MSG_PUB.ADD;
1046: IF l_debug_level > 0 THEN
1047: oe_debug_pub.add( 'OEXUPTXB: Setting the generic message' ) ;
1048: END IF;
1049: END IF;
1050: RAISE FND_API.G_EXC_ERROR;
1051: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1051: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1052: FND_MESSAGE.SET_NAME('ONT','OE_VPM_CC_ACCT_NOT_SET'); --bug 5244099
1053: OE_MSG_PUB.ADD;
1054: IF l_debug_level > 0 THEN
1055: oe_debug_pub.add('Unexpected result error code in Process_Credit_Card-->'||l_response_code.result_code);
1056: END IF;
1057: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1058: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
1059: IF l_debug_level > 0 THEN
1056: END IF;
1057: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1058: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
1059: IF l_debug_level > 0 THEN
1060: oe_debug_pub.add('Process_Credit_Card assignment Successful....');
1061: oe_debug_pub.add('After calling Process_Credit_Card');
1062: oe_debug_pub.add('Instr assignment id'||l_assign_id);
1063: END IF;
1064: END IF; --Return status
1057: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1058: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
1059: IF l_debug_level > 0 THEN
1060: oe_debug_pub.add('Process_Credit_Card assignment Successful....');
1061: oe_debug_pub.add('After calling Process_Credit_Card');
1062: oe_debug_pub.add('Instr assignment id'||l_assign_id);
1063: END IF;
1064: END IF; --Return status
1065: END IF;--Instrument assignment id
1058: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
1059: IF l_debug_level > 0 THEN
1060: oe_debug_pub.add('Process_Credit_Card assignment Successful....');
1061: oe_debug_pub.add('After calling Process_Credit_Card');
1062: oe_debug_pub.add('Instr assignment id'||l_assign_id);
1063: END IF;
1064: END IF; --Return status
1065: END IF;--Instrument assignment id
1066: END IF;--payment type code
1077: IF OE_Payment_Trxn_Util.g_old_bill_to_site IS NULL THEN
1078: --
1079: --
1080: IF l_debug_level > 0 THEN
1081: oe_debug_pub.add('Calling update transaction extension...');
1082: END IF;
1083:
1084: IF p_payment_type_code IN ('ACH', 'DIRECT_DEBIT') THEN
1085: l_trxn_attribs.Originating_Application_Id := 660;
1096: END IF;
1097: END IF;
1098:
1099: IF l_debug_level > 0 THEN
1100: oe_debug_pub.add('Values passed to Update_trxn_extn');
1101: oe_debug_pub.add('payment channel -->'||l_pmt_channel_code);
1102: oe_debug_pub.add('Assignment id ---->'|| l_assign_id);
1103: oe_debug_pub.add('trxn attributes record type values');
1104: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1097: END IF;
1098:
1099: IF l_debug_level > 0 THEN
1100: oe_debug_pub.add('Values passed to Update_trxn_extn');
1101: oe_debug_pub.add('payment channel -->'||l_pmt_channel_code);
1102: oe_debug_pub.add('Assignment id ---->'|| l_assign_id);
1103: oe_debug_pub.add('trxn attributes record type values');
1104: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1105: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> 660');
1098:
1099: IF l_debug_level > 0 THEN
1100: oe_debug_pub.add('Values passed to Update_trxn_extn');
1101: oe_debug_pub.add('payment channel -->'||l_pmt_channel_code);
1102: oe_debug_pub.add('Assignment id ---->'|| l_assign_id);
1103: oe_debug_pub.add('trxn attributes record type values');
1104: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1105: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> 660');
1106: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||p_header_id);
1099: IF l_debug_level > 0 THEN
1100: oe_debug_pub.add('Values passed to Update_trxn_extn');
1101: oe_debug_pub.add('payment channel -->'||l_pmt_channel_code);
1102: oe_debug_pub.add('Assignment id ---->'|| l_assign_id);
1103: oe_debug_pub.add('trxn attributes record type values');
1104: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1105: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> 660');
1106: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||p_header_id);
1107: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||p_line_id);
1100: oe_debug_pub.add('Values passed to Update_trxn_extn');
1101: oe_debug_pub.add('payment channel -->'||l_pmt_channel_code);
1102: oe_debug_pub.add('Assignment id ---->'|| l_assign_id);
1103: oe_debug_pub.add('trxn attributes record type values');
1104: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1105: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> 660');
1106: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||p_header_id);
1107: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||p_line_id);
1108: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 --->'||p_payment_number);
1101: oe_debug_pub.add('payment channel -->'||l_pmt_channel_code);
1102: oe_debug_pub.add('Assignment id ---->'|| l_assign_id);
1103: oe_debug_pub.add('trxn attributes record type values');
1104: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1105: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> 660');
1106: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||p_header_id);
1107: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||p_line_id);
1108: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 --->'||p_payment_number);
1109: --oe_debug_pub.add('l_trxn_attribs.VoiceAuth_date ---->'||p_credit_card_approval_date);
1102: oe_debug_pub.add('Assignment id ---->'|| l_assign_id);
1103: oe_debug_pub.add('trxn attributes record type values');
1104: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1105: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> 660');
1106: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||p_header_id);
1107: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||p_line_id);
1108: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 --->'||p_payment_number);
1109: --oe_debug_pub.add('l_trxn_attribs.VoiceAuth_date ---->'||p_credit_card_approval_date);
1110: --oe_debug_pub.add('l_trxn_attribs.VoiceAuth_code ---->'||p_credit_card_approval_code);
1103: oe_debug_pub.add('trxn attributes record type values');
1104: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1105: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> 660');
1106: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||p_header_id);
1107: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||p_line_id);
1108: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 --->'||p_payment_number);
1109: --oe_debug_pub.add('l_trxn_attribs.VoiceAuth_date ---->'||p_credit_card_approval_date);
1110: --oe_debug_pub.add('l_trxn_attribs.VoiceAuth_code ---->'||p_credit_card_approval_code);
1111: END IF;
1104: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1105: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> 660');
1106: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||p_header_id);
1107: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||p_line_id);
1108: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 --->'||p_payment_number);
1109: --oe_debug_pub.add('l_trxn_attribs.VoiceAuth_date ---->'||p_credit_card_approval_date);
1110: --oe_debug_pub.add('l_trxn_attribs.VoiceAuth_code ---->'||p_credit_card_approval_code);
1111: END IF;
1112:
1105: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> 660');
1106: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||p_header_id);
1107: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||p_line_id);
1108: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 --->'||p_payment_number);
1109: --oe_debug_pub.add('l_trxn_attribs.VoiceAuth_date ---->'||p_credit_card_approval_date);
1110: --oe_debug_pub.add('l_trxn_attribs.VoiceAuth_code ---->'||p_credit_card_approval_code);
1111: END IF;
1112:
1113: --bug 5028932
1106: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||p_header_id);
1107: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||p_line_id);
1108: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 --->'||p_payment_number);
1109: --oe_debug_pub.add('l_trxn_attribs.VoiceAuth_date ---->'||p_credit_card_approval_date);
1110: --oe_debug_pub.add('l_trxn_attribs.VoiceAuth_code ---->'||p_credit_card_approval_code);
1111: END IF;
1112:
1113: --bug 5028932
1114: BEGIN
1118: EXCEPTION
1119: WHEN OTHERS THEN
1120: l_approval_code := null;
1121: IF l_debug_level >0 THEN
1122: oe_debug_pub.add('Others part approval code value ---> '||l_approval_code);
1123: END IF;
1124: END;
1125:
1126: -- to check if the authorization has been settled
1135: l_old_card_number := NULL;
1136: END;
1137:
1138: IF l_debug_level > 0 THEN
1139: oe_debug_pub.add('Settled Flag value....'||l_settled_flag);
1140: END IF;
1141:
1142:
1143: --If approval code is not null then the transaction
1168:
1169: IF nvl(l_effective_auth_amount,0) = 0 THEN
1170: l_reauthorize_flag := 'Y';
1171: IF l_debug_level > 0 THEN
1172: oe_debug_pub.add( 'OEXUPTXB: authorization has either expired or not exists.');
1173: END IF;
1174: END IF;
1175:
1176: IF l_debug_level > 0 THEN
1173: END IF;
1174: END IF;
1175:
1176: IF l_debug_level > 0 THEN
1177: oe_debug_pub.add('Reauthorize flag value ----> '||l_reauthorize_flag);
1178: END IF;
1179: END IF;
1180:
1181: IF l_debug_level > 0 THEN
1178: END IF;
1179: END IF;
1180:
1181: IF l_debug_level > 0 THEN
1182: oe_debug_pub.add('Old instrument_id ---> '||l_old_instrument_id);
1183: oe_debug_pub.add('New instrument id..... '||l_instrument_id);
1184: oe_debug_pub.add('Old card number -----> '||l_old_card_number);
1185: oe_debug_pub.add('New card number -----> '||p_card_number);
1186: END IF;
1179: END IF;
1180:
1181: IF l_debug_level > 0 THEN
1182: oe_debug_pub.add('Old instrument_id ---> '||l_old_instrument_id);
1183: oe_debug_pub.add('New instrument id..... '||l_instrument_id);
1184: oe_debug_pub.add('Old card number -----> '||l_old_card_number);
1185: oe_debug_pub.add('New card number -----> '||p_card_number);
1186: END IF;
1187:
1180:
1181: IF l_debug_level > 0 THEN
1182: oe_debug_pub.add('Old instrument_id ---> '||l_old_instrument_id);
1183: oe_debug_pub.add('New instrument id..... '||l_instrument_id);
1184: oe_debug_pub.add('Old card number -----> '||l_old_card_number);
1185: oe_debug_pub.add('New card number -----> '||p_card_number);
1186: END IF;
1187:
1188: IF l_settled_flag = 'Y' OR l_reauthorize_flag = 'Y' THEN
1181: IF l_debug_level > 0 THEN
1182: oe_debug_pub.add('Old instrument_id ---> '||l_old_instrument_id);
1183: oe_debug_pub.add('New instrument id..... '||l_instrument_id);
1184: oe_debug_pub.add('Old card number -----> '||l_old_card_number);
1185: oe_debug_pub.add('New card number -----> '||p_card_number);
1186: END IF;
1187:
1188: IF l_settled_flag = 'Y' OR l_reauthorize_flag = 'Y' THEN
1189:
1187:
1188: IF l_settled_flag = 'Y' OR l_reauthorize_flag = 'Y' THEN
1189:
1190: IF l_debug_level > 0 THEN
1191: oe_debug_pub.add( 'OEXUPTXB.pls: authorization has been settled, need to re-authorize.');
1192: END IF;
1193:
1194: IF Oe_Payment_Trxn_Util.Get_CC_Security_Code_Use = 'REQUIRED'
1195: AND (l_trxn_attribs.Instrument_Security_Code IS NULL OR
1206: THEN
1207:
1208: -- need to create a new payment transaction extension as the old one has been settled.
1209: IF l_debug_level > 0 THEN
1210: oe_debug_pub.add( 'OEXUPTXB.pls: Before calling Create_New_Payment_Trxn');
1211: oe_debug_pub.add( 'p_trxn_extension --->'||p_trxn_extension_id);
1212: oe_debug_pub.add( 'p_org_id -----> '||l_org_id);
1213: oe_debug_pub.add( 'p_site_use_id ---> '||p_site_use_id);
1214: oe_debug_pub.add( 'l_trxn_extension_id --> '||l_trxn_extension_id);
1207:
1208: -- need to create a new payment transaction extension as the old one has been settled.
1209: IF l_debug_level > 0 THEN
1210: oe_debug_pub.add( 'OEXUPTXB.pls: Before calling Create_New_Payment_Trxn');
1211: oe_debug_pub.add( 'p_trxn_extension --->'||p_trxn_extension_id);
1212: oe_debug_pub.add( 'p_org_id -----> '||l_org_id);
1213: oe_debug_pub.add( 'p_site_use_id ---> '||p_site_use_id);
1214: oe_debug_pub.add( 'l_trxn_extension_id --> '||l_trxn_extension_id);
1215: END IF;
1208: -- need to create a new payment transaction extension as the old one has been settled.
1209: IF l_debug_level > 0 THEN
1210: oe_debug_pub.add( 'OEXUPTXB.pls: Before calling Create_New_Payment_Trxn');
1211: oe_debug_pub.add( 'p_trxn_extension --->'||p_trxn_extension_id);
1212: oe_debug_pub.add( 'p_org_id -----> '||l_org_id);
1213: oe_debug_pub.add( 'p_site_use_id ---> '||p_site_use_id);
1214: oe_debug_pub.add( 'l_trxn_extension_id --> '||l_trxn_extension_id);
1215: END IF;
1216:
1209: IF l_debug_level > 0 THEN
1210: oe_debug_pub.add( 'OEXUPTXB.pls: Before calling Create_New_Payment_Trxn');
1211: oe_debug_pub.add( 'p_trxn_extension --->'||p_trxn_extension_id);
1212: oe_debug_pub.add( 'p_org_id -----> '||l_org_id);
1213: oe_debug_pub.add( 'p_site_use_id ---> '||p_site_use_id);
1214: oe_debug_pub.add( 'l_trxn_extension_id --> '||l_trxn_extension_id);
1215: END IF;
1216:
1217: OE_Verify_Payment_PUB.Create_New_Payment_Trxn (p_trxn_extension_id => p_trxn_extension_id,
1210: oe_debug_pub.add( 'OEXUPTXB.pls: Before calling Create_New_Payment_Trxn');
1211: oe_debug_pub.add( 'p_trxn_extension --->'||p_trxn_extension_id);
1212: oe_debug_pub.add( 'p_org_id -----> '||l_org_id);
1213: oe_debug_pub.add( 'p_site_use_id ---> '||p_site_use_id);
1214: oe_debug_pub.add( 'l_trxn_extension_id --> '||l_trxn_extension_id);
1215: END IF;
1216:
1217: OE_Verify_Payment_PUB.Create_New_Payment_Trxn (p_trxn_extension_id => p_trxn_extension_id,
1218: p_org_id => l_org_id,
1224: x_return_status => x_return_status);
1225:
1226: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
1227: IF l_debug_level > 0 THEN
1228: oe_debug_pub.add( 'OEXUPTXB.pls: Exp. error in call to Create_New_Payment_Trxn');
1229: oe_debug_pub.add( 'SQL ERRM ----> '||sqlerrm);
1230: END IF;
1231: RAISE FND_API.G_EXC_ERROR;
1232: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1225:
1226: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
1227: IF l_debug_level > 0 THEN
1228: oe_debug_pub.add( 'OEXUPTXB.pls: Exp. error in call to Create_New_Payment_Trxn');
1229: oe_debug_pub.add( 'SQL ERRM ----> '||sqlerrm);
1230: END IF;
1231: RAISE FND_API.G_EXC_ERROR;
1232: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1233: IF l_debug_level > 0 THEN
1230: END IF;
1231: RAISE FND_API.G_EXC_ERROR;
1232: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1233: IF l_debug_level > 0 THEN
1234: oe_debug_pub.add( 'OEXUPTXB.pls: Unexp. error in call to Create_New_Payment_Trxn');
1235: oe_debug_pub.add( 'SQL ERRM ----> '||sqlerrm);
1236: END IF;
1237: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1238: END IF;
1231: RAISE FND_API.G_EXC_ERROR;
1232: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1233: IF l_debug_level > 0 THEN
1234: oe_debug_pub.add( 'OEXUPTXB.pls: Unexp. error in call to Create_New_Payment_Trxn');
1235: oe_debug_pub.add( 'SQL ERRM ----> '||sqlerrm);
1236: END IF;
1237: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1238: END IF;
1239:
1237: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1238: END IF;
1239:
1240: IF l_debug_level > 0 THEN
1241: oe_debug_pub.add( 'OEXUPTXB.pls: After successful call to Create_New_Payment_Trxn');
1242: oe_debug_pub.add( 'New trxn extension --->'||l_trxn_extension_id);
1243: END IF;
1244:
1245: -- update oe_payments table
1238: END IF;
1239:
1240: IF l_debug_level > 0 THEN
1241: oe_debug_pub.add( 'OEXUPTXB.pls: After successful call to Create_New_Payment_Trxn');
1242: oe_debug_pub.add( 'New trxn extension --->'||l_trxn_extension_id);
1243: END IF;
1244:
1245: -- update oe_payments table
1246: p_trxn_extension_id := l_trxn_extension_id;
1260: -- different trxn_extension_id for the same order, we will
1261: -- need to make sure the trxn ref2 is different, as the
1262: -- order id and trxn ref1 would be the same.
1263:
1264: oe_debug_pub.add('Linda -- p_trxn_extension_id is: '||p_trxn_extension_id);
1265:
1266: BEGIN
1267: select trxn_ref_number2
1268: into l_trxn_ref_number2
1285: END IF;
1286: -- end of bug 5575513
1287:
1288: IF l_debug_level > 0 THEN
1289: oe_debug_pub.add('Before calling create_transaction extension');
1290: oe_debug_pub.add('payment channel -->'||l_pmt_channel_code);
1291: oe_debug_pub.add('Assignment id ---->'|| l_assign_id);
1292: oe_debug_pub.add('trxn attributes record type values');
1293: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1286: -- end of bug 5575513
1287:
1288: IF l_debug_level > 0 THEN
1289: oe_debug_pub.add('Before calling create_transaction extension');
1290: oe_debug_pub.add('payment channel -->'||l_pmt_channel_code);
1291: oe_debug_pub.add('Assignment id ---->'|| l_assign_id);
1292: oe_debug_pub.add('trxn attributes record type values');
1293: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1294: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> '||l_trxn_attribs.Originating_application_id);
1287:
1288: IF l_debug_level > 0 THEN
1289: oe_debug_pub.add('Before calling create_transaction extension');
1290: oe_debug_pub.add('payment channel -->'||l_pmt_channel_code);
1291: oe_debug_pub.add('Assignment id ---->'|| l_assign_id);
1292: oe_debug_pub.add('trxn attributes record type values');
1293: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1294: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> '||l_trxn_attribs.Originating_application_id);
1295: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||l_trxn_attribs.order_id);
1288: IF l_debug_level > 0 THEN
1289: oe_debug_pub.add('Before calling create_transaction extension');
1290: oe_debug_pub.add('payment channel -->'||l_pmt_channel_code);
1291: oe_debug_pub.add('Assignment id ---->'|| l_assign_id);
1292: oe_debug_pub.add('trxn attributes record type values');
1293: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1294: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> '||l_trxn_attribs.Originating_application_id);
1295: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||l_trxn_attribs.order_id);
1296: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||l_trxn_attribs.trxn_ref_number1);
1289: oe_debug_pub.add('Before calling create_transaction extension');
1290: oe_debug_pub.add('payment channel -->'||l_pmt_channel_code);
1291: oe_debug_pub.add('Assignment id ---->'|| l_assign_id);
1292: oe_debug_pub.add('trxn attributes record type values');
1293: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1294: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> '||l_trxn_attribs.Originating_application_id);
1295: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||l_trxn_attribs.order_id);
1296: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||l_trxn_attribs.trxn_ref_number1);
1297: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 --->'||l_trxn_attribs.trxn_ref_number2);
1290: oe_debug_pub.add('payment channel -->'||l_pmt_channel_code);
1291: oe_debug_pub.add('Assignment id ---->'|| l_assign_id);
1292: oe_debug_pub.add('trxn attributes record type values');
1293: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1294: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> '||l_trxn_attribs.Originating_application_id);
1295: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||l_trxn_attribs.order_id);
1296: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||l_trxn_attribs.trxn_ref_number1);
1297: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 --->'||l_trxn_attribs.trxn_ref_number2);
1298: END IF;
1291: oe_debug_pub.add('Assignment id ---->'|| l_assign_id);
1292: oe_debug_pub.add('trxn attributes record type values');
1293: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1294: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> '||l_trxn_attribs.Originating_application_id);
1295: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||l_trxn_attribs.order_id);
1296: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||l_trxn_attribs.trxn_ref_number1);
1297: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 --->'||l_trxn_attribs.trxn_ref_number2);
1298: END IF;
1299:
1292: oe_debug_pub.add('trxn attributes record type values');
1293: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1294: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> '||l_trxn_attribs.Originating_application_id);
1295: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||l_trxn_attribs.order_id);
1296: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||l_trxn_attribs.trxn_ref_number1);
1297: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 --->'||l_trxn_attribs.trxn_ref_number2);
1298: END IF;
1299:
1300: IBY_Fndcpt_Trxn_Pub.Create_Transaction_Extension
1293: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1294: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> '||l_trxn_attribs.Originating_application_id);
1295: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||l_trxn_attribs.order_id);
1296: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||l_trxn_attribs.trxn_ref_number1);
1297: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 --->'||l_trxn_attribs.trxn_ref_number2);
1298: END IF;
1299:
1300: IBY_Fndcpt_Trxn_Pub.Create_Transaction_Extension
1301: (p_api_version => 1.0,
1314:
1315: --oe_msg_pub.add_text(p_message_text => l_response_code.result_message);
1316:
1317: IF l_debug_level > 0 THEN
1318: oe_debug_pub.add('After calling Create_Transaction_Extension'||l_trxn_extension_id);
1319: oe_debug_pub.add('Result code'||l_Response_code.result_code);
1320: oe_debug_pub.add('Return status'||l_Return_Status);
1321: END IF;
1322:
1315: --oe_msg_pub.add_text(p_message_text => l_response_code.result_message);
1316:
1317: IF l_debug_level > 0 THEN
1318: oe_debug_pub.add('After calling Create_Transaction_Extension'||l_trxn_extension_id);
1319: oe_debug_pub.add('Result code'||l_Response_code.result_code);
1320: oe_debug_pub.add('Return status'||l_Return_Status);
1321: END IF;
1322:
1323: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
1316:
1317: IF l_debug_level > 0 THEN
1318: oe_debug_pub.add('After calling Create_Transaction_Extension'||l_trxn_extension_id);
1319: oe_debug_pub.add('Result code'||l_Response_code.result_code);
1320: oe_debug_pub.add('Return status'||l_Return_Status);
1321: END IF;
1322:
1323: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
1324: IF l_debug_level > 0 THEN
1321: END IF;
1322:
1323: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
1324: IF l_debug_level > 0 THEN
1325: oe_debug_pub.add('Result error code in Create_Transaction_Extension'||l_response_code.result_code);
1326: END IF;
1327: RAISE FND_API.G_EXC_ERROR;
1328: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1329: IF l_debug_level > 0 THEN
1326: END IF;
1327: RAISE FND_API.G_EXC_ERROR;
1328: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1329: IF l_debug_level > 0 THEN
1330: oe_debug_pub.add('Result error code in Create_Transaction_Extension'||l_response_code.result_code);
1331: END IF;
1332: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1333: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
1334: --Setting the trxn extension id to the new value
1334: --Setting the trxn extension id to the new value
1335: --as the old trxn extension id was deleted
1336: p_trxn_extension_id := l_trxn_extension_id ;
1337: IF l_debug_level > 0 THEN
1338: oe_debug_pub.add('Create_Transaction_Extension assignment Successful....');
1339: oe_debug_pub.add('After call to Create_Transaction_Extension'||l_return_status);
1340: oe_debug_pub.add('After call to create Transaction Extension');
1341: oe_debug_pub.add('New trxn extension id'||l_trxn_extension_id);
1342: oe_debug_pub.add('Return status'||l_return_status);
1335: --as the old trxn extension id was deleted
1336: p_trxn_extension_id := l_trxn_extension_id ;
1337: IF l_debug_level > 0 THEN
1338: oe_debug_pub.add('Create_Transaction_Extension assignment Successful....');
1339: oe_debug_pub.add('After call to Create_Transaction_Extension'||l_return_status);
1340: oe_debug_pub.add('After call to create Transaction Extension');
1341: oe_debug_pub.add('New trxn extension id'||l_trxn_extension_id);
1342: oe_debug_pub.add('Return status'||l_return_status);
1343: END IF;
1336: p_trxn_extension_id := l_trxn_extension_id ;
1337: IF l_debug_level > 0 THEN
1338: oe_debug_pub.add('Create_Transaction_Extension assignment Successful....');
1339: oe_debug_pub.add('After call to Create_Transaction_Extension'||l_return_status);
1340: oe_debug_pub.add('After call to create Transaction Extension');
1341: oe_debug_pub.add('New trxn extension id'||l_trxn_extension_id);
1342: oe_debug_pub.add('Return status'||l_return_status);
1343: END IF;
1344: END IF;
1337: IF l_debug_level > 0 THEN
1338: oe_debug_pub.add('Create_Transaction_Extension assignment Successful....');
1339: oe_debug_pub.add('After call to Create_Transaction_Extension'||l_return_status);
1340: oe_debug_pub.add('After call to create Transaction Extension');
1341: oe_debug_pub.add('New trxn extension id'||l_trxn_extension_id);
1342: oe_debug_pub.add('Return status'||l_return_status);
1343: END IF;
1344: END IF;
1345: --bug 5299050
1338: oe_debug_pub.add('Create_Transaction_Extension assignment Successful....');
1339: oe_debug_pub.add('After call to Create_Transaction_Extension'||l_return_status);
1340: oe_debug_pub.add('After call to create Transaction Extension');
1341: oe_debug_pub.add('New trxn extension id'||l_trxn_extension_id);
1342: oe_debug_pub.add('Return status'||l_return_status);
1343: END IF;
1344: END IF;
1345: --bug 5299050
1346: END IF; -- Settled or Expired
1359: END IF;
1360: END IF;
1361:
1362: IF l_debug_level > 0 THEN
1363: oe_debug_pub.add('l_trxn_attribs.VoiceAuth_date ---->'||l_trxn_attribs.VoiceAuth_date);
1364: oe_debug_pub.add('l_trxn_attribs.VoiceAuth_code ---->'||l_trxn_attribs.VoiceAuth_code);
1365: END IF;
1366: --Bug 7460481 ends
1367:
1360: END IF;
1361:
1362: IF l_debug_level > 0 THEN
1363: oe_debug_pub.add('l_trxn_attribs.VoiceAuth_date ---->'||l_trxn_attribs.VoiceAuth_date);
1364: oe_debug_pub.add('l_trxn_attribs.VoiceAuth_code ---->'||l_trxn_attribs.VoiceAuth_code);
1365: END IF;
1366: --Bug 7460481 ends
1367:
1368: IBY_Fndcpt_Trxn_Pub.Update_Transaction_Extension
1381:
1382: --oe_msg_pub.add_text(p_message_text => l_response_code.result_message);
1383:
1384: IF l_debug_level > 0 THEN
1385: oe_debug_pub.add('After calling update transaction extension...');
1386: END IF;
1387:
1388: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
1389: IF l_debug_level > 0 THEN
1386: END IF;
1387:
1388: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
1389: IF l_debug_level > 0 THEN
1390: oe_debug_pub.add('Result error code in Update_Transaction_Extension'||l_response_code.result_code);
1391: END IF;
1392: RAISE FND_API.G_EXC_ERROR;
1393: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1394: IF l_debug_level > 0 THEN
1391: END IF;
1392: RAISE FND_API.G_EXC_ERROR;
1393: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1394: IF l_debug_level > 0 THEN
1395: oe_debug_pub.add('Result error code in Update_Transaction_Extension'||l_response_code.result_code);
1396: END IF;
1397: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1398: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
1399: IF l_debug_level > 0 THEN
1396: END IF;
1397: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1398: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
1399: IF l_debug_level > 0 THEN
1400: oe_debug_pub.add('Update_Transaction_Extension assignment Successful....');
1401: oe_debug_pub.add('After calling Update_Transaction_Extension');
1402: END IF;
1403: END IF;
1404: END IF; -- Approval code not null
1397: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1398: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
1399: IF l_debug_level > 0 THEN
1400: oe_debug_pub.add('Update_Transaction_Extension assignment Successful....');
1401: oe_debug_pub.add('After calling Update_Transaction_Extension');
1402: END IF;
1403: END IF;
1404: END IF; -- Approval code not null
1405: --bug 5028932
1405: --bug 5028932
1406: --bug 4885313
1407: ELSIF OE_Payment_Trxn_Util.g_old_bill_to_site IS NOT NULL THEN
1408: IF l_debug_level > 0 THEN
1409: oe_debug_pub.add('Bill to has changed....Need to delete this trxn id as context has changed!');
1410: oe_debug_pub.add('Before calling Delete Transaction Extension API...');
1411: oe_debug_pub.add('Trxn extension id --------> '||p_trxn_extension_id);
1412: oe_debug_pub.add('Payer equivalency --------> '||IBY_FNDCPT_COMMON_PUB.G_PAYER_EQUIV_IMMEDIATE);
1413: END IF;
1406: --bug 4885313
1407: ELSIF OE_Payment_Trxn_Util.g_old_bill_to_site IS NOT NULL THEN
1408: IF l_debug_level > 0 THEN
1409: oe_debug_pub.add('Bill to has changed....Need to delete this trxn id as context has changed!');
1410: oe_debug_pub.add('Before calling Delete Transaction Extension API...');
1411: oe_debug_pub.add('Trxn extension id --------> '||p_trxn_extension_id);
1412: oe_debug_pub.add('Payer equivalency --------> '||IBY_FNDCPT_COMMON_PUB.G_PAYER_EQUIV_IMMEDIATE);
1413: END IF;
1414: --Setting the context corresponding to the old bill to
1407: ELSIF OE_Payment_Trxn_Util.g_old_bill_to_site IS NOT NULL THEN
1408: IF l_debug_level > 0 THEN
1409: oe_debug_pub.add('Bill to has changed....Need to delete this trxn id as context has changed!');
1410: oe_debug_pub.add('Before calling Delete Transaction Extension API...');
1411: oe_debug_pub.add('Trxn extension id --------> '||p_trxn_extension_id);
1412: oe_debug_pub.add('Payer equivalency --------> '||IBY_FNDCPT_COMMON_PUB.G_PAYER_EQUIV_IMMEDIATE);
1413: END IF;
1414: --Setting the context corresponding to the old bill to
1415: --site as the trxn extension id was created for that site.
1408: IF l_debug_level > 0 THEN
1409: oe_debug_pub.add('Bill to has changed....Need to delete this trxn id as context has changed!');
1410: oe_debug_pub.add('Before calling Delete Transaction Extension API...');
1411: oe_debug_pub.add('Trxn extension id --------> '||p_trxn_extension_id);
1412: oe_debug_pub.add('Payer equivalency --------> '||IBY_FNDCPT_COMMON_PUB.G_PAYER_EQUIV_IMMEDIATE);
1413: END IF;
1414: --Setting the context corresponding to the old bill to
1415: --site as the trxn extension id was created for that site.
1416: l_payer.account_site_id := OE_Payment_Trxn_Util.g_old_bill_to_site;
1433: p_entity_id => p_trxn_extension_id);
1434:
1435: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
1436: IF l_debug_level > 0 THEN
1437: oe_debug_pub.add('Result error code in Delete_Transaction_Extension'||l_response_code.result_code);
1438: oe_debug_pub.add('sql error'||sqlerrm);
1439: oe_debug_pub.add('msg data'||l_msg_data);
1440: END IF;
1441: RAISE FND_API.G_EXC_ERROR;
1434:
1435: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
1436: IF l_debug_level > 0 THEN
1437: oe_debug_pub.add('Result error code in Delete_Transaction_Extension'||l_response_code.result_code);
1438: oe_debug_pub.add('sql error'||sqlerrm);
1439: oe_debug_pub.add('msg data'||l_msg_data);
1440: END IF;
1441: RAISE FND_API.G_EXC_ERROR;
1442: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1435: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
1436: IF l_debug_level > 0 THEN
1437: oe_debug_pub.add('Result error code in Delete_Transaction_Extension'||l_response_code.result_code);
1438: oe_debug_pub.add('sql error'||sqlerrm);
1439: oe_debug_pub.add('msg data'||l_msg_data);
1440: END IF;
1441: RAISE FND_API.G_EXC_ERROR;
1442: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1443: IF l_debug_level > 0 THEN
1440: END IF;
1441: RAISE FND_API.G_EXC_ERROR;
1442: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1443: IF l_debug_level > 0 THEN
1444: oe_debug_pub.add('Result error code in Delete_Transaction_Extension'||l_response_code.result_code);
1445: oe_debug_pub.add('sql error'||sqlerrm);
1446: oe_debug_pub.add('msg data'||l_msg_data);
1447: END IF;
1448: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1441: RAISE FND_API.G_EXC_ERROR;
1442: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1443: IF l_debug_level > 0 THEN
1444: oe_debug_pub.add('Result error code in Delete_Transaction_Extension'||l_response_code.result_code);
1445: oe_debug_pub.add('sql error'||sqlerrm);
1446: oe_debug_pub.add('msg data'||l_msg_data);
1447: END IF;
1448: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1449: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
1442: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1443: IF l_debug_level > 0 THEN
1444: oe_debug_pub.add('Result error code in Delete_Transaction_Extension'||l_response_code.result_code);
1445: oe_debug_pub.add('sql error'||sqlerrm);
1446: oe_debug_pub.add('msg data'||l_msg_data);
1447: END IF;
1448: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1449: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
1450: IF l_debug_level > 0 THEN
1447: END IF;
1448: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1449: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
1450: IF l_debug_level > 0 THEN
1451: oe_debug_pub.add('Delete_Transaction_Extension Successful....');
1452: oe_debug_pub.add('After calling Delete_Transaction_Extension');
1453: oe_debug_pub.add('sql error'||sqlerrm);
1454: oe_debug_pub.add('msg data'||l_msg_data);
1455: END IF;
1448: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1449: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
1450: IF l_debug_level > 0 THEN
1451: oe_debug_pub.add('Delete_Transaction_Extension Successful....');
1452: oe_debug_pub.add('After calling Delete_Transaction_Extension');
1453: oe_debug_pub.add('sql error'||sqlerrm);
1454: oe_debug_pub.add('msg data'||l_msg_data);
1455: END IF;
1456: END IF;
1449: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
1450: IF l_debug_level > 0 THEN
1451: oe_debug_pub.add('Delete_Transaction_Extension Successful....');
1452: oe_debug_pub.add('After calling Delete_Transaction_Extension');
1453: oe_debug_pub.add('sql error'||sqlerrm);
1454: oe_debug_pub.add('msg data'||l_msg_data);
1455: END IF;
1456: END IF;
1457:
1450: IF l_debug_level > 0 THEN
1451: oe_debug_pub.add('Delete_Transaction_Extension Successful....');
1452: oe_debug_pub.add('After calling Delete_Transaction_Extension');
1453: oe_debug_pub.add('sql error'||sqlerrm);
1454: oe_debug_pub.add('msg data'||l_msg_data);
1455: END IF;
1456: END IF;
1457:
1458: IF p_payment_type_code IN ('ACH', 'DIRECT_DEBIT') THEN
1473: --Now setting the account site id as the new bill to site
1474: --for creating this trxn extension id
1475: l_payer.account_site_id := p_site_use_id;
1476: IF l_debug_level > 0 THEN
1477: oe_debug_pub.add('Before calling create_transaction extension');
1478: oe_debug_pub.add('payment channel -->'||l_pmt_channel_code);
1479: oe_debug_pub.add('Assignment id ---->'|| l_assign_id);
1480: oe_debug_pub.add('trxn attributes record type values');
1481: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1474: --for creating this trxn extension id
1475: l_payer.account_site_id := p_site_use_id;
1476: IF l_debug_level > 0 THEN
1477: oe_debug_pub.add('Before calling create_transaction extension');
1478: oe_debug_pub.add('payment channel -->'||l_pmt_channel_code);
1479: oe_debug_pub.add('Assignment id ---->'|| l_assign_id);
1480: oe_debug_pub.add('trxn attributes record type values');
1481: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1482: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> '||l_trxn_attribs.Originating_application_id);
1475: l_payer.account_site_id := p_site_use_id;
1476: IF l_debug_level > 0 THEN
1477: oe_debug_pub.add('Before calling create_transaction extension');
1478: oe_debug_pub.add('payment channel -->'||l_pmt_channel_code);
1479: oe_debug_pub.add('Assignment id ---->'|| l_assign_id);
1480: oe_debug_pub.add('trxn attributes record type values');
1481: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1482: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> '||l_trxn_attribs.Originating_application_id);
1483: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||l_trxn_attribs.order_id);
1476: IF l_debug_level > 0 THEN
1477: oe_debug_pub.add('Before calling create_transaction extension');
1478: oe_debug_pub.add('payment channel -->'||l_pmt_channel_code);
1479: oe_debug_pub.add('Assignment id ---->'|| l_assign_id);
1480: oe_debug_pub.add('trxn attributes record type values');
1481: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1482: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> '||l_trxn_attribs.Originating_application_id);
1483: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||l_trxn_attribs.order_id);
1484: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||l_trxn_attribs.trxn_ref_number1);
1477: oe_debug_pub.add('Before calling create_transaction extension');
1478: oe_debug_pub.add('payment channel -->'||l_pmt_channel_code);
1479: oe_debug_pub.add('Assignment id ---->'|| l_assign_id);
1480: oe_debug_pub.add('trxn attributes record type values');
1481: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1482: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> '||l_trxn_attribs.Originating_application_id);
1483: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||l_trxn_attribs.order_id);
1484: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||l_trxn_attribs.trxn_ref_number1);
1485: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 --->'||l_trxn_attribs.trxn_ref_number2);
1478: oe_debug_pub.add('payment channel -->'||l_pmt_channel_code);
1479: oe_debug_pub.add('Assignment id ---->'|| l_assign_id);
1480: oe_debug_pub.add('trxn attributes record type values');
1481: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1482: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> '||l_trxn_attribs.Originating_application_id);
1483: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||l_trxn_attribs.order_id);
1484: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||l_trxn_attribs.trxn_ref_number1);
1485: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 --->'||l_trxn_attribs.trxn_ref_number2);
1486: END IF;
1479: oe_debug_pub.add('Assignment id ---->'|| l_assign_id);
1480: oe_debug_pub.add('trxn attributes record type values');
1481: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1482: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> '||l_trxn_attribs.Originating_application_id);
1483: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||l_trxn_attribs.order_id);
1484: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||l_trxn_attribs.trxn_ref_number1);
1485: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 --->'||l_trxn_attribs.trxn_ref_number2);
1486: END IF;
1487:
1480: oe_debug_pub.add('trxn attributes record type values');
1481: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1482: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> '||l_trxn_attribs.Originating_application_id);
1483: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||l_trxn_attribs.order_id);
1484: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||l_trxn_attribs.trxn_ref_number1);
1485: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 --->'||l_trxn_attribs.trxn_ref_number2);
1486: END IF;
1487:
1488: IBY_Fndcpt_Trxn_Pub.Create_Transaction_Extension
1481: oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1482: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> '||l_trxn_attribs.Originating_application_id);
1483: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||l_trxn_attribs.order_id);
1484: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||l_trxn_attribs.trxn_ref_number1);
1485: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 --->'||l_trxn_attribs.trxn_ref_number2);
1486: END IF;
1487:
1488: IBY_Fndcpt_Trxn_Pub.Create_Transaction_Extension
1489: (p_api_version => 1.0,
1502:
1503: --oe_msg_pub.add_text(p_message_text => l_response_code.result_message);
1504:
1505: IF l_debug_level > 0 THEN
1506: oe_debug_pub.add('After calling Create_Transaction_Extension'||l_trxn_extension_id);
1507: oe_debug_pub.add('Result code'||l_Response_code.result_code);
1508: oe_debug_pub.add('Return status'||l_Return_Status);
1509: END IF;
1510:
1503: --oe_msg_pub.add_text(p_message_text => l_response_code.result_message);
1504:
1505: IF l_debug_level > 0 THEN
1506: oe_debug_pub.add('After calling Create_Transaction_Extension'||l_trxn_extension_id);
1507: oe_debug_pub.add('Result code'||l_Response_code.result_code);
1508: oe_debug_pub.add('Return status'||l_Return_Status);
1509: END IF;
1510:
1511: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
1504:
1505: IF l_debug_level > 0 THEN
1506: oe_debug_pub.add('After calling Create_Transaction_Extension'||l_trxn_extension_id);
1507: oe_debug_pub.add('Result code'||l_Response_code.result_code);
1508: oe_debug_pub.add('Return status'||l_Return_Status);
1509: END IF;
1510:
1511: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
1512: IF l_debug_level > 0 THEN
1509: END IF;
1510:
1511: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
1512: IF l_debug_level > 0 THEN
1513: oe_debug_pub.add('Result error code in Create_Transaction_Extension'||l_response_code.result_code);
1514: END IF;
1515: RAISE FND_API.G_EXC_ERROR;
1516: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1517: IF l_debug_level > 0 THEN
1514: END IF;
1515: RAISE FND_API.G_EXC_ERROR;
1516: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1517: IF l_debug_level > 0 THEN
1518: oe_debug_pub.add('Result error code in Create_Transaction_Extension'||l_response_code.result_code);
1519: END IF;
1520: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1521: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
1522: --Setting the trxn extension id to the new value
1522: --Setting the trxn extension id to the new value
1523: --as the old trxn extension id was deleted
1524: p_trxn_extension_id := l_trxn_extension_id ;
1525: IF l_debug_level > 0 THEN
1526: oe_debug_pub.add('Create_Transaction_Extension assignment Successful....');
1527: oe_debug_pub.add('After call to Create_Transaction_Extension'||l_return_status);
1528: oe_debug_pub.add('After call to create Transaction Extension');
1529: oe_debug_pub.add('New trxn extension id'||l_trxn_extension_id);
1530: oe_debug_pub.add('Return status'||l_return_status);
1523: --as the old trxn extension id was deleted
1524: p_trxn_extension_id := l_trxn_extension_id ;
1525: IF l_debug_level > 0 THEN
1526: oe_debug_pub.add('Create_Transaction_Extension assignment Successful....');
1527: oe_debug_pub.add('After call to Create_Transaction_Extension'||l_return_status);
1528: oe_debug_pub.add('After call to create Transaction Extension');
1529: oe_debug_pub.add('New trxn extension id'||l_trxn_extension_id);
1530: oe_debug_pub.add('Return status'||l_return_status);
1531: END IF;
1524: p_trxn_extension_id := l_trxn_extension_id ;
1525: IF l_debug_level > 0 THEN
1526: oe_debug_pub.add('Create_Transaction_Extension assignment Successful....');
1527: oe_debug_pub.add('After call to Create_Transaction_Extension'||l_return_status);
1528: oe_debug_pub.add('After call to create Transaction Extension');
1529: oe_debug_pub.add('New trxn extension id'||l_trxn_extension_id);
1530: oe_debug_pub.add('Return status'||l_return_status);
1531: END IF;
1532: END IF;
1525: IF l_debug_level > 0 THEN
1526: oe_debug_pub.add('Create_Transaction_Extension assignment Successful....');
1527: oe_debug_pub.add('After call to Create_Transaction_Extension'||l_return_status);
1528: oe_debug_pub.add('After call to create Transaction Extension');
1529: oe_debug_pub.add('New trxn extension id'||l_trxn_extension_id);
1530: oe_debug_pub.add('Return status'||l_return_status);
1531: END IF;
1532: END IF;
1533:
1526: oe_debug_pub.add('Create_Transaction_Extension assignment Successful....');
1527: oe_debug_pub.add('After call to Create_Transaction_Extension'||l_return_status);
1528: oe_debug_pub.add('After call to create Transaction Extension');
1529: oe_debug_pub.add('New trxn extension id'||l_trxn_extension_id);
1530: oe_debug_pub.add('Return status'||l_return_status);
1531: END IF;
1532: END IF;
1533:
1534: END IF; -- old bill to site
1533:
1534: END IF; -- old bill to site
1535: --bug 4885313
1536: IF l_debug_level > 0 THEN
1537: oe_debug_pub.add('Exiting Update_Payment_Trxn.....');
1538: END IF;
1539:
1540: X_return_status := FND_API.G_RET_STS_SUCCESS;
1541:
1606: l_instrument IBY_FNDCPT_SETUP_PUB.PmtInstrument_rec_type;
1607: l_exists_assignment VARCHAR2(1) := 'N';
1608: l_assign_id IBY_FNDCPT_PAYER_ASSGN_INSTR_V.instr_assignment_id%TYPE;
1609:
1610: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
1611:
1612: BEGIN
1613: --Get party id for the bill to site;??
1614: IF p_line_id is not null then
1624: l_invoice_to_org_id := OE_Order_Cache.g_header_rec.invoice_to_org_id;
1625: l_org_id := OE_Order_Cache.g_header_rec.org_id;
1626: end if;
1627: IF l_debug_level > 0 THEN
1628: oe_debug_pub.add('INVOICE_TO_ORG_ID and ORG_ID'||l_invoice_to_org_id||' and '||l_org_id);
1629: END IF;
1630:
1631: Begin
1632: Select hca.party_id, acct_site.cust_account_id
1661: null;
1662: End;
1663:
1664: IF l_debug_level > 0 THEN
1665: oe_debug_pub.add('instrument_id is: '||l_instrument_id,1);
1666: END IF;
1667:
1668: -- Need to call the Set Payer Instr Assignment API always
1669: --to create a new assignment id at the account level as iStore
1681: l_exists_assignment := 'N';
1682: End;
1683:
1684: IF l_debug_level > 0 THEN
1685: oe_debug_pub.add('l_exists_assignment is: '||l_exists_assignment,1);
1686: END IF;
1687:
1688: IF l_exists_assignment = 'N' THEN*/
1689:
1694: l_instrument.instrument_id := l_instrument_id;
1695: l_assignment_attribs.instrument := l_instrument;
1696:
1697: IF l_debug_level > 0 THEN
1698: oe_debug_pub.add('Calling Oracle Payments API to create new assignment.',1);
1699: oe_debug_pub.add('Before call to Set payer instr assignment API...');
1700: oe_debug_pub.add('Assignment attributes passed ');
1701: oe_debug_pub.add('l_instrument.instrument_id ---> '||l_instrument_id);
1702: oe_debug_pub.add('l_instrument.instrument_type -> '||l_instrument_type);
1695: l_assignment_attribs.instrument := l_instrument;
1696:
1697: IF l_debug_level > 0 THEN
1698: oe_debug_pub.add('Calling Oracle Payments API to create new assignment.',1);
1699: oe_debug_pub.add('Before call to Set payer instr assignment API...');
1700: oe_debug_pub.add('Assignment attributes passed ');
1701: oe_debug_pub.add('l_instrument.instrument_id ---> '||l_instrument_id);
1702: oe_debug_pub.add('l_instrument.instrument_type -> '||l_instrument_type);
1703: END IF;
1696:
1697: IF l_debug_level > 0 THEN
1698: oe_debug_pub.add('Calling Oracle Payments API to create new assignment.',1);
1699: oe_debug_pub.add('Before call to Set payer instr assignment API...');
1700: oe_debug_pub.add('Assignment attributes passed ');
1701: oe_debug_pub.add('l_instrument.instrument_id ---> '||l_instrument_id);
1702: oe_debug_pub.add('l_instrument.instrument_type -> '||l_instrument_type);
1703: END IF;
1704:
1697: IF l_debug_level > 0 THEN
1698: oe_debug_pub.add('Calling Oracle Payments API to create new assignment.',1);
1699: oe_debug_pub.add('Before call to Set payer instr assignment API...');
1700: oe_debug_pub.add('Assignment attributes passed ');
1701: oe_debug_pub.add('l_instrument.instrument_id ---> '||l_instrument_id);
1702: oe_debug_pub.add('l_instrument.instrument_type -> '||l_instrument_type);
1703: END IF;
1704:
1705: IBY_FNDCPT_SETUP_PUB.Set_Payer_Instr_Assignment
1698: oe_debug_pub.add('Calling Oracle Payments API to create new assignment.',1);
1699: oe_debug_pub.add('Before call to Set payer instr assignment API...');
1700: oe_debug_pub.add('Assignment attributes passed ');
1701: oe_debug_pub.add('l_instrument.instrument_id ---> '||l_instrument_id);
1702: oe_debug_pub.add('l_instrument.instrument_type -> '||l_instrument_type);
1703: END IF;
1704:
1705: IBY_FNDCPT_SETUP_PUB.Set_Payer_Instr_Assignment
1706: (p_api_version => 1.0,
1715: X_response => l_response_code);
1716:
1717: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
1718: IF l_debug_level > 0 THEN
1719: oe_debug_pub.add('Result error code in Set_Payer_Instr_Assignment'||l_response_code.result_code);
1720: END IF;
1721: --IF l_response_code.result_code = '
1722: RAISE FND_API.G_EXC_ERROR;
1723: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1721: --IF l_response_code.result_code = '
1722: RAISE FND_API.G_EXC_ERROR;
1723: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1724: IF l_debug_level > 0 THEN
1725: oe_debug_pub.add('Result error code in Set_Payer_Instr_Assignment'||l_response_code.result_code);
1726: END IF;
1727: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1728: ELSIF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
1729: IF l_debug_level > 0 THEN
1726: END IF;
1727: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1728: ELSIF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
1729: IF l_debug_level > 0 THEN
1730: oe_debug_pub.add('Result code in Set_Payer_Instr_Assignment'||l_response_code.result_code);
1731: oe_debug_pub.add('new assignment id is: '||l_assign_id,1);
1732: END IF;
1733: END IF;
1734:
1727: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1728: ELSIF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
1729: IF l_debug_level > 0 THEN
1730: oe_debug_pub.add('Result code in Set_Payer_Instr_Assignment'||l_response_code.result_code);
1731: oe_debug_pub.add('new assignment id is: '||l_assign_id,1);
1732: END IF;
1733: END IF;
1734:
1735: --Populating the new assignment id to the copy instr
1739:
1740: p_entities(1) := p_trxn_extension_id;
1741:
1742: IF l_debug_level > 0 THEN
1743: oe_debug_pub.add('Payer context in copy...'||l_party_id||' and '||l_org_type ||'and'||l_cust_account_id||'and'||'and'||p_site_use_id||'and'||p_trxn_extension_id||'and'||p_header_id);
1744: END IF;
1745:
1746: --
1747: IF p_line_id IS NOT NULL THEN
1751: l_trxn_attribs.Originating_Application_Id := 660;
1752:
1753: --
1754: IF l_debug_level > 0 THEN
1755: oe_debug_pub.add('Values passed to Copy_transaction_extension');
1756: oe_debug_pub.add('original trxn extension id ---->'||p_entities(1));
1757: oe_debug_pub.add('trxn attributes record type values');
1758: --oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1759: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> 660');
1752:
1753: --
1754: IF l_debug_level > 0 THEN
1755: oe_debug_pub.add('Values passed to Copy_transaction_extension');
1756: oe_debug_pub.add('original trxn extension id ---->'||p_entities(1));
1757: oe_debug_pub.add('trxn attributes record type values');
1758: --oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1759: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> 660');
1760: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||p_header_id);
1753: --
1754: IF l_debug_level > 0 THEN
1755: oe_debug_pub.add('Values passed to Copy_transaction_extension');
1756: oe_debug_pub.add('original trxn extension id ---->'||p_entities(1));
1757: oe_debug_pub.add('trxn attributes record type values');
1758: --oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1759: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> 660');
1760: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||p_header_id);
1761: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||p_line_id);
1754: IF l_debug_level > 0 THEN
1755: oe_debug_pub.add('Values passed to Copy_transaction_extension');
1756: oe_debug_pub.add('original trxn extension id ---->'||p_entities(1));
1757: oe_debug_pub.add('trxn attributes record type values');
1758: --oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1759: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> 660');
1760: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||p_header_id);
1761: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||p_line_id);
1762: --oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 --->'||p_payment_number);
1755: oe_debug_pub.add('Values passed to Copy_transaction_extension');
1756: oe_debug_pub.add('original trxn extension id ---->'||p_entities(1));
1757: oe_debug_pub.add('trxn attributes record type values');
1758: --oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1759: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> 660');
1760: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||p_header_id);
1761: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||p_line_id);
1762: --oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 --->'||p_payment_number);
1763: oe_debug_pub.add('l_trxn_attribs.copy_instr_assign_id ---->'||l_assign_id);
1756: oe_debug_pub.add('original trxn extension id ---->'||p_entities(1));
1757: oe_debug_pub.add('trxn attributes record type values');
1758: --oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1759: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> 660');
1760: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||p_header_id);
1761: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||p_line_id);
1762: --oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 --->'||p_payment_number);
1763: oe_debug_pub.add('l_trxn_attribs.copy_instr_assign_id ---->'||l_assign_id);
1764: END IF;
1757: oe_debug_pub.add('trxn attributes record type values');
1758: --oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1759: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> 660');
1760: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||p_header_id);
1761: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||p_line_id);
1762: --oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 --->'||p_payment_number);
1763: oe_debug_pub.add('l_trxn_attribs.copy_instr_assign_id ---->'||l_assign_id);
1764: END IF;
1765: IBY_Fndcpt_Trxn_Pub.Copy_Transaction_Extension
1758: --oe_debug_pub.add('l_trxn_attribs.Instrument_Security_Code --->'||p_instrument_security_code);
1759: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> 660');
1760: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||p_header_id);
1761: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||p_line_id);
1762: --oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 --->'||p_payment_number);
1763: oe_debug_pub.add('l_trxn_attribs.copy_instr_assign_id ---->'||l_assign_id);
1764: END IF;
1765: IBY_Fndcpt_Trxn_Pub.Copy_Transaction_Extension
1766: (p_api_version => 1.0,
1759: oe_debug_pub.add('l_trxn_attribs.Originating application id ---> 660');
1760: oe_debug_pub.add('l_trxn_attribs.order_id ----> '||p_header_id);
1761: oe_debug_pub.add('l_trxn_attribs.trxn_ref_number1 --->'||p_line_id);
1762: --oe_debug_pub.add('l_trxn_attribs.trxn_ref_number2 --->'||p_payment_number);
1763: oe_debug_pub.add('l_trxn_attribs.copy_instr_assign_id ---->'||l_assign_id);
1764: END IF;
1765: IBY_Fndcpt_Trxn_Pub.Copy_Transaction_Extension
1766: (p_api_version => 1.0,
1767: p_init_msg_list => FND_API.G_TRUE,
1776: X_entity_id => x_trxn_extension_id,
1777: x_response => l_response_code);
1778:
1779: IF l_debug_level > 0 THEN
1780: oe_debug_pub.add('Return status from Copy_Transaction_Extension'||l_return_status);
1781: END IF;
1782:
1783: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
1784: IF l_debug_level > 0 THEN
1781: END IF;
1782:
1783: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
1784: IF l_debug_level > 0 THEN
1785: oe_debug_pub.add('Result error code in Copy_Transaction_Extension'||l_response_code.result_code);
1786: END IF;
1787: --IF l_response_code.result_code = '
1788: RAISE FND_API.G_EXC_ERROR;
1789: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1787: --IF l_response_code.result_code = '
1788: RAISE FND_API.G_EXC_ERROR;
1789: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1790: IF l_debug_level > 0 THEN
1791: oe_debug_pub.add('Result error code in Copy_Transaction_Extension'||l_response_code.result_code);
1792: END IF;
1793: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1794: ELSIF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
1795: IF l_debug_level > 0 THEN
1792: END IF;
1793: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1794: ELSIF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
1795: IF l_debug_level > 0 THEN
1796: oe_debug_pub.add('Result code in Copy_Transaction_Extension'||l_response_code.result_code);
1797: END IF;
1798: END IF;
1799:
1800: IF l_debug_level > 0 THEN
1797: END IF;
1798: END IF;
1799:
1800: IF l_debug_level > 0 THEN
1801: oe_debug_pub.add('Exiting OE_PAYMENT_TRXN_UTIL.Copy_Payment_Trxn.', 1);
1802: END IF;
1803:
1804: X_return_status := FND_API.G_RET_STS_SUCCESS;
1805:
1807:
1808: WHEN FND_API.G_EXC_ERROR THEN
1809: l_err_message := SQLERRM;
1810: IF l_debug_level > 0 THEN
1811: oe_debug_pub.add('Copy_Transaction_Extension error....exc');
1812: oe_debug_pub.add('After call to Copy_Transaction_Extension'||l_return_status);
1813: oe_debug_pub.add('Result code'||l_response_code.result_code);
1814: oe_debug_pub.add('Error'||l_err_message);
1815: END IF;
1808: WHEN FND_API.G_EXC_ERROR THEN
1809: l_err_message := SQLERRM;
1810: IF l_debug_level > 0 THEN
1811: oe_debug_pub.add('Copy_Transaction_Extension error....exc');
1812: oe_debug_pub.add('After call to Copy_Transaction_Extension'||l_return_status);
1813: oe_debug_pub.add('Result code'||l_response_code.result_code);
1814: oe_debug_pub.add('Error'||l_err_message);
1815: END IF;
1816:
1809: l_err_message := SQLERRM;
1810: IF l_debug_level > 0 THEN
1811: oe_debug_pub.add('Copy_Transaction_Extension error....exc');
1812: oe_debug_pub.add('After call to Copy_Transaction_Extension'||l_return_status);
1813: oe_debug_pub.add('Result code'||l_response_code.result_code);
1814: oe_debug_pub.add('Error'||l_err_message);
1815: END IF;
1816:
1817: X_return_status := FND_API.G_RET_STS_ERROR;
1810: IF l_debug_level > 0 THEN
1811: oe_debug_pub.add('Copy_Transaction_Extension error....exc');
1812: oe_debug_pub.add('After call to Copy_Transaction_Extension'||l_return_status);
1813: oe_debug_pub.add('Result code'||l_response_code.result_code);
1814: oe_debug_pub.add('Error'||l_err_message);
1815: END IF;
1816:
1817: X_return_status := FND_API.G_RET_STS_ERROR;
1818: OE_MSG_PUB.Count_And_Get
1822: RAISE FND_API.G_EXC_ERROR;
1823: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1824: l_err_message := SQLERRM;
1825: IF l_debug_level > 0 THEN
1826: oe_debug_pub.add('Copy_Transaction_Extension error....unxc');
1827: oe_debug_pub.add('After call to Copy_Transaction_Extension'||l_return_status);
1828: oe_debug_pub.add('Result code'||l_response_code.result_code);
1829: oe_debug_pub.add('f Error'||l_err_message);
1830: END IF;
1823: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1824: l_err_message := SQLERRM;
1825: IF l_debug_level > 0 THEN
1826: oe_debug_pub.add('Copy_Transaction_Extension error....unxc');
1827: oe_debug_pub.add('After call to Copy_Transaction_Extension'||l_return_status);
1828: oe_debug_pub.add('Result code'||l_response_code.result_code);
1829: oe_debug_pub.add('f Error'||l_err_message);
1830: END IF;
1831:
1824: l_err_message := SQLERRM;
1825: IF l_debug_level > 0 THEN
1826: oe_debug_pub.add('Copy_Transaction_Extension error....unxc');
1827: oe_debug_pub.add('After call to Copy_Transaction_Extension'||l_return_status);
1828: oe_debug_pub.add('Result code'||l_response_code.result_code);
1829: oe_debug_pub.add('f Error'||l_err_message);
1830: END IF;
1831:
1832: X_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1825: IF l_debug_level > 0 THEN
1826: oe_debug_pub.add('Copy_Transaction_Extension error....unxc');
1827: oe_debug_pub.add('After call to Copy_Transaction_Extension'||l_return_status);
1828: oe_debug_pub.add('Result code'||l_response_code.result_code);
1829: oe_debug_pub.add('f Error'||l_err_message);
1830: END IF;
1831:
1832: X_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1833: OE_MSG_PUB.Count_And_Get
1838:
1839: WHEN OTHERS THEN
1840: l_err_message := SQLERRM;
1841: IF l_debug_level > 0 THEN
1842: oe_debug_pub.add('Create_Transaction_Extension assignment error....others');
1843: oe_debug_pub.add('After call to Create_Transaction_Extension'||l_return_status);
1844: oe_debug_pub.add('Result code'||l_response_code.result_code);
1845: oe_debug_pub.add('trx Error'||l_err_message);
1846: END IF;
1839: WHEN OTHERS THEN
1840: l_err_message := SQLERRM;
1841: IF l_debug_level > 0 THEN
1842: oe_debug_pub.add('Create_Transaction_Extension assignment error....others');
1843: oe_debug_pub.add('After call to Create_Transaction_Extension'||l_return_status);
1844: oe_debug_pub.add('Result code'||l_response_code.result_code);
1845: oe_debug_pub.add('trx Error'||l_err_message);
1846: END IF;
1847:
1840: l_err_message := SQLERRM;
1841: IF l_debug_level > 0 THEN
1842: oe_debug_pub.add('Create_Transaction_Extension assignment error....others');
1843: oe_debug_pub.add('After call to Create_Transaction_Extension'||l_return_status);
1844: oe_debug_pub.add('Result code'||l_response_code.result_code);
1845: oe_debug_pub.add('trx Error'||l_err_message);
1846: END IF;
1847:
1848: X_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1841: IF l_debug_level > 0 THEN
1842: oe_debug_pub.add('Create_Transaction_Extension assignment error....others');
1843: oe_debug_pub.add('After call to Create_Transaction_Extension'||l_return_status);
1844: oe_debug_pub.add('Result code'||l_response_code.result_code);
1845: oe_debug_pub.add('trx Error'||l_err_message);
1846: END IF;
1847:
1848: X_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1849: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1896: l_payment_function VARCHAR2(80);
1897: l_org_id NUMBER;
1898: l_trxn_attribs IBY_FNDCPT_TRXN_PUB.TrxnExtension_rec_type;
1899: l_err_message VARCHAR2(2000);
1900: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
1901: L_authorized VARCHAR2(1);
1902: BEGIN
1903:
1904: IF l_debug_level > 0 THEN
1901: L_authorized VARCHAR2(1);
1902: BEGIN
1903:
1904: IF l_debug_level > 0 THEN
1905: oe_debug_pub.add('Entering Get_Payment_Trxn_Info...');
1906: x_return_status := FND_API.G_RET_STS_SUCCESS;
1907: END IF;
1908:
1909: --< if l_trxn_extension_id is null, this might be called from sales order header>
1912: INTO l_trxn_extension_id
1913: FROM oe_payments
1914: WHERE header_id = p_header_id;
1915: IF l_debug_level > 0 THEN
1916: oe_debug_pub.add('Trxn extension id from oe_payments'||l_trxn_extension_id);
1917: END IF;
1918:
1919: END IF;
1920:
1947: IBY_TRXN_EXTENSIONS_V ITEV
1948: WHERE ITEV.TRXN_EXTENSION_ID = l_trxn_extension_id;
1949:
1950: IF l_debug_level > 0 THEN
1951: oe_debug_pub.add('Values retrieved in Get_Payment_Trxn_Info...');
1952: oe_debug_pub.add('x_credit_card_number ----> '||x_credit_card_number);
1953: oe_debug_pub.add('x_credit_card_holder_name ----> '||x_credit_card_holder_name);
1954: oe_debug_pub.add('x_credit_card_expiration_date ---> '||x_credit_card_expiration_date);
1955: oe_debug_pub.add('x_credit_card_code ---> '||x_credit_card_code);
1948: WHERE ITEV.TRXN_EXTENSION_ID = l_trxn_extension_id;
1949:
1950: IF l_debug_level > 0 THEN
1951: oe_debug_pub.add('Values retrieved in Get_Payment_Trxn_Info...');
1952: oe_debug_pub.add('x_credit_card_number ----> '||x_credit_card_number);
1953: oe_debug_pub.add('x_credit_card_holder_name ----> '||x_credit_card_holder_name);
1954: oe_debug_pub.add('x_credit_card_expiration_date ---> '||x_credit_card_expiration_date);
1955: oe_debug_pub.add('x_credit_card_code ---> '||x_credit_card_code);
1956: oe_debug_pub.add('l_authorized ---> '||l_authorized);
1949:
1950: IF l_debug_level > 0 THEN
1951: oe_debug_pub.add('Values retrieved in Get_Payment_Trxn_Info...');
1952: oe_debug_pub.add('x_credit_card_number ----> '||x_credit_card_number);
1953: oe_debug_pub.add('x_credit_card_holder_name ----> '||x_credit_card_holder_name);
1954: oe_debug_pub.add('x_credit_card_expiration_date ---> '||x_credit_card_expiration_date);
1955: oe_debug_pub.add('x_credit_card_code ---> '||x_credit_card_code);
1956: oe_debug_pub.add('l_authorized ---> '||l_authorized);
1957: oe_debug_pub.add('x_instrument_security_code ----> '||x_instrument_security_code);
1950: IF l_debug_level > 0 THEN
1951: oe_debug_pub.add('Values retrieved in Get_Payment_Trxn_Info...');
1952: oe_debug_pub.add('x_credit_card_number ----> '||x_credit_card_number);
1953: oe_debug_pub.add('x_credit_card_holder_name ----> '||x_credit_card_holder_name);
1954: oe_debug_pub.add('x_credit_card_expiration_date ---> '||x_credit_card_expiration_date);
1955: oe_debug_pub.add('x_credit_card_code ---> '||x_credit_card_code);
1956: oe_debug_pub.add('l_authorized ---> '||l_authorized);
1957: oe_debug_pub.add('x_instrument_security_code ----> '||x_instrument_security_code);
1958: oe_debug_pub.add('x_instrument_id ---> '||x_instrument_id);
1951: oe_debug_pub.add('Values retrieved in Get_Payment_Trxn_Info...');
1952: oe_debug_pub.add('x_credit_card_number ----> '||x_credit_card_number);
1953: oe_debug_pub.add('x_credit_card_holder_name ----> '||x_credit_card_holder_name);
1954: oe_debug_pub.add('x_credit_card_expiration_date ---> '||x_credit_card_expiration_date);
1955: oe_debug_pub.add('x_credit_card_code ---> '||x_credit_card_code);
1956: oe_debug_pub.add('l_authorized ---> '||l_authorized);
1957: oe_debug_pub.add('x_instrument_security_code ----> '||x_instrument_security_code);
1958: oe_debug_pub.add('x_instrument_id ---> '||x_instrument_id);
1959: oe_debug_pub.add('x_instrument_assignment_id ----> '||x_instrument_assignment_id);
1952: oe_debug_pub.add('x_credit_card_number ----> '||x_credit_card_number);
1953: oe_debug_pub.add('x_credit_card_holder_name ----> '||x_credit_card_holder_name);
1954: oe_debug_pub.add('x_credit_card_expiration_date ---> '||x_credit_card_expiration_date);
1955: oe_debug_pub.add('x_credit_card_code ---> '||x_credit_card_code);
1956: oe_debug_pub.add('l_authorized ---> '||l_authorized);
1957: oe_debug_pub.add('x_instrument_security_code ----> '||x_instrument_security_code);
1958: oe_debug_pub.add('x_instrument_id ---> '||x_instrument_id);
1959: oe_debug_pub.add('x_instrument_assignment_id ----> '||x_instrument_assignment_id);
1960: END IF;
1953: oe_debug_pub.add('x_credit_card_holder_name ----> '||x_credit_card_holder_name);
1954: oe_debug_pub.add('x_credit_card_expiration_date ---> '||x_credit_card_expiration_date);
1955: oe_debug_pub.add('x_credit_card_code ---> '||x_credit_card_code);
1956: oe_debug_pub.add('l_authorized ---> '||l_authorized);
1957: oe_debug_pub.add('x_instrument_security_code ----> '||x_instrument_security_code);
1958: oe_debug_pub.add('x_instrument_id ---> '||x_instrument_id);
1959: oe_debug_pub.add('x_instrument_assignment_id ----> '||x_instrument_assignment_id);
1960: END IF;
1961:
1954: oe_debug_pub.add('x_credit_card_expiration_date ---> '||x_credit_card_expiration_date);
1955: oe_debug_pub.add('x_credit_card_code ---> '||x_credit_card_code);
1956: oe_debug_pub.add('l_authorized ---> '||l_authorized);
1957: oe_debug_pub.add('x_instrument_security_code ----> '||x_instrument_security_code);
1958: oe_debug_pub.add('x_instrument_id ---> '||x_instrument_id);
1959: oe_debug_pub.add('x_instrument_assignment_id ----> '||x_instrument_assignment_id);
1960: END IF;
1961:
1962: IF l_authorized = 'Y' THEN
1955: oe_debug_pub.add('x_credit_card_code ---> '||x_credit_card_code);
1956: oe_debug_pub.add('l_authorized ---> '||l_authorized);
1957: oe_debug_pub.add('x_instrument_security_code ----> '||x_instrument_security_code);
1958: oe_debug_pub.add('x_instrument_id ---> '||x_instrument_id);
1959: oe_debug_pub.add('x_instrument_assignment_id ----> '||x_instrument_assignment_id);
1960: END IF;
1961:
1962: IF l_authorized = 'Y' THEN
1963: IF l_debug_level > 0 THEN
1960: END IF;
1961:
1962: IF l_authorized = 'Y' THEN
1963: IF l_debug_level > 0 THEN
1964: oe_debug_pub.add('Before calling IBY Get_authorization API...');
1965: oe_debug_pub.add('trxn extn id passed to get auth'||l_trxn_extension_id);
1966: END IF;
1967: IBY_Fndcpt_Trxn_Pub.Get_Authorization
1968: (p_api_version => 1.0,
1961:
1962: IF l_authorized = 'Y' THEN
1963: IF l_debug_level > 0 THEN
1964: oe_debug_pub.add('Before calling IBY Get_authorization API...');
1965: oe_debug_pub.add('trxn extn id passed to get auth'||l_trxn_extension_id);
1966: END IF;
1967: IBY_Fndcpt_Trxn_Pub.Get_Authorization
1968: (p_api_version => 1.0,
1969: x_return_status => l_return_status,
1974: x_auth_result => l_auth_result,
1975: x_response => l_response);
1976:
1977: IF l_debug_level > 0 THEN
1978: oe_debug_pub.add('Return status from Get_Authorization'||l_return_status);
1979: END IF;
1980:
1981: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
1982: IF l_debug_level > 0 THEN
1979: END IF;
1980:
1981: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
1982: IF l_debug_level > 0 THEN
1983: oe_debug_pub.add('Result error code in Get_Authorization'||l_response.result_code);
1984: END IF;
1985: --IF l_response_code.result_code = '
1986: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1987: IF l_debug_level > 0 THEN
1984: END IF;
1985: --IF l_response_code.result_code = '
1986: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1987: IF l_debug_level > 0 THEN
1988: oe_debug_pub.add('Result error code in Get_Authorization'||l_response.result_code);
1989: END IF;
1990: ELSIF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
1991: IF l_debug_level > 0 THEN
1992: oe_debug_pub.add('Success in Get_Authorization'||l_response.result_code);
1988: oe_debug_pub.add('Result error code in Get_Authorization'||l_response.result_code);
1989: END IF;
1990: ELSIF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
1991: IF l_debug_level > 0 THEN
1992: oe_debug_pub.add('Success in Get_Authorization'||l_response.result_code);
1993: oe_debug_pub.add('approval code ----> '||l_auth_result.auth_code);
1994: oe_debug_pub.add('x_credit_card_approval_date ---> '||l_auth_result.auth_date);
1995: END IF;
1996: x_credit_card_approval_code := l_auth_result.auth_code;
1989: END IF;
1990: ELSIF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
1991: IF l_debug_level > 0 THEN
1992: oe_debug_pub.add('Success in Get_Authorization'||l_response.result_code);
1993: oe_debug_pub.add('approval code ----> '||l_auth_result.auth_code);
1994: oe_debug_pub.add('x_credit_card_approval_date ---> '||l_auth_result.auth_date);
1995: END IF;
1996: x_credit_card_approval_code := l_auth_result.auth_code;
1997: x_credit_card_approval_date := l_auth_result.auth_date;
1990: ELSIF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
1991: IF l_debug_level > 0 THEN
1992: oe_debug_pub.add('Success in Get_Authorization'||l_response.result_code);
1993: oe_debug_pub.add('approval code ----> '||l_auth_result.auth_code);
1994: oe_debug_pub.add('x_credit_card_approval_date ---> '||l_auth_result.auth_date);
1995: END IF;
1996: x_credit_card_approval_code := l_auth_result.auth_code;
1997: x_credit_card_approval_date := l_auth_result.auth_date;
1998: END IF;
2004:
2005: X_return_status := FND_API.G_RET_STS_SUCCESS;
2006:
2007: IF l_debug_level > 0 THEN
2008: oe_debug_pub.add('Exiting Get_Payment_Trxn_Info....');
2009: END IF;
2010:
2011: EXCEPTION
2012:
2012:
2013: WHEN FND_API.G_EXC_ERROR THEN
2014: l_err_message := SQLERRM;
2015: IF l_debug_level > 0 THEN
2016: oe_debug_pub.add('Get_Payment_Trxn_Info error....exc');
2017: oe_debug_pub.add('After call to Get_Payment_Trxn_Info'||l_return_status);
2018: oe_debug_pub.add('Result code'||l_response.result_code);
2019: oe_debug_pub.add('Error'||l_err_message);
2020: END IF;
2013: WHEN FND_API.G_EXC_ERROR THEN
2014: l_err_message := SQLERRM;
2015: IF l_debug_level > 0 THEN
2016: oe_debug_pub.add('Get_Payment_Trxn_Info error....exc');
2017: oe_debug_pub.add('After call to Get_Payment_Trxn_Info'||l_return_status);
2018: oe_debug_pub.add('Result code'||l_response.result_code);
2019: oe_debug_pub.add('Error'||l_err_message);
2020: END IF;
2021:
2014: l_err_message := SQLERRM;
2015: IF l_debug_level > 0 THEN
2016: oe_debug_pub.add('Get_Payment_Trxn_Info error....exc');
2017: oe_debug_pub.add('After call to Get_Payment_Trxn_Info'||l_return_status);
2018: oe_debug_pub.add('Result code'||l_response.result_code);
2019: oe_debug_pub.add('Error'||l_err_message);
2020: END IF;
2021:
2022:
2015: IF l_debug_level > 0 THEN
2016: oe_debug_pub.add('Get_Payment_Trxn_Info error....exc');
2017: oe_debug_pub.add('After call to Get_Payment_Trxn_Info'||l_return_status);
2018: oe_debug_pub.add('Result code'||l_response.result_code);
2019: oe_debug_pub.add('Error'||l_err_message);
2020: END IF;
2021:
2022:
2023: OE_MSG_PUB.Count_And_Get
2027:
2028: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2029: l_err_message := SQLERRM;
2030: IF l_debug_level > 0 THEN
2031: oe_debug_pub.add('Get_Payment_Trxn_Info error....unxc');
2032: oe_debug_pub.add('After call to Get_Payment_Trxn_Info'||l_return_status);
2033: oe_debug_pub.add('Result code'||l_response.result_code);
2034: oe_debug_pub.add('f Error'||l_err_message);
2035: END IF;
2028: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2029: l_err_message := SQLERRM;
2030: IF l_debug_level > 0 THEN
2031: oe_debug_pub.add('Get_Payment_Trxn_Info error....unxc');
2032: oe_debug_pub.add('After call to Get_Payment_Trxn_Info'||l_return_status);
2033: oe_debug_pub.add('Result code'||l_response.result_code);
2034: oe_debug_pub.add('f Error'||l_err_message);
2035: END IF;
2036:
2029: l_err_message := SQLERRM;
2030: IF l_debug_level > 0 THEN
2031: oe_debug_pub.add('Get_Payment_Trxn_Info error....unxc');
2032: oe_debug_pub.add('After call to Get_Payment_Trxn_Info'||l_return_status);
2033: oe_debug_pub.add('Result code'||l_response.result_code);
2034: oe_debug_pub.add('f Error'||l_err_message);
2035: END IF;
2036:
2037:
2030: IF l_debug_level > 0 THEN
2031: oe_debug_pub.add('Get_Payment_Trxn_Info error....unxc');
2032: oe_debug_pub.add('After call to Get_Payment_Trxn_Info'||l_return_status);
2033: oe_debug_pub.add('Result code'||l_response.result_code);
2034: oe_debug_pub.add('f Error'||l_err_message);
2035: END IF;
2036:
2037:
2038: OE_MSG_PUB.Count_And_Get
2042:
2043: WHEN OTHERS THEN
2044: l_err_message := SQLERRM;
2045: IF l_debug_level > 0 THEN
2046: oe_debug_pub.add('Get_Payment_Trxn_Info error....others');
2047: oe_debug_pub.add('After call to Get_Payment_Trxn_Info'||l_return_status);
2048: oe_debug_pub.add('Result code'||l_response.result_code);
2049: oe_debug_pub.add('trx Error'||l_err_message);
2050: END IF;
2043: WHEN OTHERS THEN
2044: l_err_message := SQLERRM;
2045: IF l_debug_level > 0 THEN
2046: oe_debug_pub.add('Get_Payment_Trxn_Info error....others');
2047: oe_debug_pub.add('After call to Get_Payment_Trxn_Info'||l_return_status);
2048: oe_debug_pub.add('Result code'||l_response.result_code);
2049: oe_debug_pub.add('trx Error'||l_err_message);
2050: END IF;
2051:
2044: l_err_message := SQLERRM;
2045: IF l_debug_level > 0 THEN
2046: oe_debug_pub.add('Get_Payment_Trxn_Info error....others');
2047: oe_debug_pub.add('After call to Get_Payment_Trxn_Info'||l_return_status);
2048: oe_debug_pub.add('Result code'||l_response.result_code);
2049: oe_debug_pub.add('trx Error'||l_err_message);
2050: END IF;
2051:
2052:
2045: IF l_debug_level > 0 THEN
2046: oe_debug_pub.add('Get_Payment_Trxn_Info error....others');
2047: oe_debug_pub.add('After call to Get_Payment_Trxn_Info'||l_return_status);
2048: oe_debug_pub.add('Result code'||l_response.result_code);
2049: oe_debug_pub.add('trx Error'||l_err_message);
2050: END IF;
2051:
2052:
2053: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
2088: L_party_id NUMBER;
2089: L_response_code IBY_FNDCPT_COMMON_PUB.Result_rec_type;
2090: l_cust_account_id NUMBER;
2091: l_err_message VARCHAR2(2000);
2092: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
2093: l_site_use_id NUMBER := p_site_use_id;
2094: l_payment_channel_code VARCHAR2(80);
2095: l_invoice_to_org_id NUMBER;
2096: -- bug 5194228
2099:
2100: BEGIN
2101:
2102: IF l_debug_level > 0 THEN
2103: oe_debug_pub.add('Entering Delete_Payment_Trxn...');
2104: END IF;
2105:
2106: IF p_line_id is not null then
2107: Select ORG_ID into l_org_id
2119: into l_payment_channel_code,l_settled_flag,l_authorized_flag -- bug 5194228
2120: from iby_trxn_extensions_v where trxn_Extension_id=p_trxn_extension_id;
2121: exception
2122: when others then
2123: oe_debug_pub.add('Trxn extn id not found....');
2124: end ;
2125:
2126: --Incase of deleting payments due to bill to site change
2127: --the invoice to org id is passed as null. So querying the
2127: --the invoice to org id is passed as null. So querying the
2128: --old invoice to org id from the payments tables in this case.
2129: IF l_site_use_id is null then
2130: IF l_debug_level > 0 THEN
2131: oe_debug_pub.add('Inside l_site_use_id is null....'||l_payment_channel_code);
2132: oe_debug_pub.add('Trxn extension id used to query ----> '||p_trxn_extension_id);
2133: END IF;
2134:
2135: BEGIN
2128: --old invoice to org id from the payments tables in this case.
2129: IF l_site_use_id is null then
2130: IF l_debug_level > 0 THEN
2131: oe_debug_pub.add('Inside l_site_use_id is null....'||l_payment_channel_code);
2132: oe_debug_pub.add('Trxn extension id used to query ----> '||p_trxn_extension_id);
2133: END IF;
2134:
2135: BEGIN
2136: IF l_payment_channel_code = 'CREDIT_CARD' THEN
2134:
2135: BEGIN
2136: IF l_payment_channel_code = 'CREDIT_CARD' THEN
2137: IF l_debug_level > 0 THEN
2138: oe_debug_pub.add('Inside the credit card query for site use id...'||p_trxn_extension_id);
2139: END IF;
2140: select ifpai.acct_site_use_id into l_site_use_id
2141: from iby_fndcpt_payer_assgn_instr_v ifpai,
2142: iby_trxn_extensions_v itev where
2143: ifpai.instr_assignment_id = itev.instr_assignment_id and
2144: itev.trxn_extension_id = p_trxn_extension_id;
2145: ELSE
2146: IF l_debug_level > 0 THEN
2147: oe_debug_pub.add('Inside the ACH and Direct debit query for site use id...'||p_trxn_extension_id);
2148: END IF;
2149: select iepa.acct_site_use_id into l_site_use_id from
2150: iby_external_payers_all iepa, iby_fndcpt_tx_extensions ifte
2151: where iepa.ext_payer_id = ifte.ext_payer_id and
2151: where iepa.ext_payer_id = ifte.ext_payer_id and
2152: ifte.trxn_extension_id = p_trxn_extension_id;
2153: END IF;
2154: IF l_debug_level > 0 THEN
2155: oe_debug_pub.add('site use id queried ---> '||l_site_use_id);
2156: END IF;
2157: EXCEPTION
2158: WHEN NO_DATA_FOUND THEN
2159: IF l_debug_level > 0 THEN
2156: END IF;
2157: EXCEPTION
2158: WHEN NO_DATA_FOUND THEN
2159: IF l_debug_level > 0 THEN
2160: oe_debug_pub.add('site use id not found..!!'||sqlerrm);
2161: END IF;
2162: END;
2163: END IF;
2164:
2182: --Setting the payer context appropriately
2183: l_payer.account_site_id := l_site_use_id;
2184:
2185: IF l_debug_level > 0 THEN
2186: oe_debug_pub.add('Payer context values...');
2187: oe_debug_pub.add('party id'||l_party_id);
2188: oe_debug_pub.add('org id'||l_org_id);
2189: oe_debug_pub.add('cust acct id'||l_cust_account_id);
2190: oe_debug_pub.add('site use id'||l_site_use_id);
2183: l_payer.account_site_id := l_site_use_id;
2184:
2185: IF l_debug_level > 0 THEN
2186: oe_debug_pub.add('Payer context values...');
2187: oe_debug_pub.add('party id'||l_party_id);
2188: oe_debug_pub.add('org id'||l_org_id);
2189: oe_debug_pub.add('cust acct id'||l_cust_account_id);
2190: oe_debug_pub.add('site use id'||l_site_use_id);
2191: END IF;
2184:
2185: IF l_debug_level > 0 THEN
2186: oe_debug_pub.add('Payer context values...');
2187: oe_debug_pub.add('party id'||l_party_id);
2188: oe_debug_pub.add('org id'||l_org_id);
2189: oe_debug_pub.add('cust acct id'||l_cust_account_id);
2190: oe_debug_pub.add('site use id'||l_site_use_id);
2191: END IF;
2192:
2185: IF l_debug_level > 0 THEN
2186: oe_debug_pub.add('Payer context values...');
2187: oe_debug_pub.add('party id'||l_party_id);
2188: oe_debug_pub.add('org id'||l_org_id);
2189: oe_debug_pub.add('cust acct id'||l_cust_account_id);
2190: oe_debug_pub.add('site use id'||l_site_use_id);
2191: END IF;
2192:
2193: BEGIN
2186: oe_debug_pub.add('Payer context values...');
2187: oe_debug_pub.add('party id'||l_party_id);
2188: oe_debug_pub.add('org id'||l_org_id);
2189: oe_debug_pub.add('cust acct id'||l_cust_account_id);
2190: oe_debug_pub.add('site use id'||l_site_use_id);
2191: END IF;
2192:
2193: BEGIN
2194: IF l_debug_level > 0 THEN
2191: END IF;
2192:
2193: BEGIN
2194: IF l_debug_level > 0 THEN
2195: oe_debug_pub.add('Before calling Delete Transaction Extension API...');
2196: oe_debug_pub.add('Trxn extension id --------> '||p_trxn_extension_id);
2197: oe_debug_pub.add('Payer equivalency --------> '||IBY_FNDCPT_COMMON_PUB.G_PAYER_EQUIV_IMMEDIATE);
2198: END IF;
2199: -- bug 5194228
2192:
2193: BEGIN
2194: IF l_debug_level > 0 THEN
2195: oe_debug_pub.add('Before calling Delete Transaction Extension API...');
2196: oe_debug_pub.add('Trxn extension id --------> '||p_trxn_extension_id);
2197: oe_debug_pub.add('Payer equivalency --------> '||IBY_FNDCPT_COMMON_PUB.G_PAYER_EQUIV_IMMEDIATE);
2198: END IF;
2199: -- bug 5194228
2200: IF nvl(l_authorized_flag,'N') = 'N' and nvl(l_Settled_flag,'N') = 'N' THEN
2193: BEGIN
2194: IF l_debug_level > 0 THEN
2195: oe_debug_pub.add('Before calling Delete Transaction Extension API...');
2196: oe_debug_pub.add('Trxn extension id --------> '||p_trxn_extension_id);
2197: oe_debug_pub.add('Payer equivalency --------> '||IBY_FNDCPT_COMMON_PUB.G_PAYER_EQUIV_IMMEDIATE);
2198: END IF;
2199: -- bug 5194228
2200: IF nvl(l_authorized_flag,'N') = 'N' and nvl(l_Settled_flag,'N') = 'N' THEN
2201: IBY_FNDCPT_TRXN_PUB.Delete_Transaction_Extension
2211: p_entity_id => p_trxn_extension_id);
2212:
2213: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
2214: IF l_debug_level > 0 THEN
2215: oe_debug_pub.add('Result error code in Delete_Transaction_Extension'||l_response_code.result_code);
2216: oe_debug_pub.add('sql error'||sqlerrm);
2217: oe_debug_pub.add('msg data'||l_msg_data);
2218: END IF;
2219: RAISE FND_API.G_EXC_ERROR;
2212:
2213: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
2214: IF l_debug_level > 0 THEN
2215: oe_debug_pub.add('Result error code in Delete_Transaction_Extension'||l_response_code.result_code);
2216: oe_debug_pub.add('sql error'||sqlerrm);
2217: oe_debug_pub.add('msg data'||l_msg_data);
2218: END IF;
2219: RAISE FND_API.G_EXC_ERROR;
2220: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2213: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
2214: IF l_debug_level > 0 THEN
2215: oe_debug_pub.add('Result error code in Delete_Transaction_Extension'||l_response_code.result_code);
2216: oe_debug_pub.add('sql error'||sqlerrm);
2217: oe_debug_pub.add('msg data'||l_msg_data);
2218: END IF;
2219: RAISE FND_API.G_EXC_ERROR;
2220: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2221: IF l_debug_level > 0 THEN
2218: END IF;
2219: RAISE FND_API.G_EXC_ERROR;
2220: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2221: IF l_debug_level > 0 THEN
2222: oe_debug_pub.add('Result error code in Delete_Transaction_Extension'||l_response_code.result_code);
2223: oe_debug_pub.add('sql error'||sqlerrm);
2224: oe_debug_pub.add('msg data'||l_msg_data);
2225: END IF;
2226: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2219: RAISE FND_API.G_EXC_ERROR;
2220: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2221: IF l_debug_level > 0 THEN
2222: oe_debug_pub.add('Result error code in Delete_Transaction_Extension'||l_response_code.result_code);
2223: oe_debug_pub.add('sql error'||sqlerrm);
2224: oe_debug_pub.add('msg data'||l_msg_data);
2225: END IF;
2226: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2227: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
2220: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2221: IF l_debug_level > 0 THEN
2222: oe_debug_pub.add('Result error code in Delete_Transaction_Extension'||l_response_code.result_code);
2223: oe_debug_pub.add('sql error'||sqlerrm);
2224: oe_debug_pub.add('msg data'||l_msg_data);
2225: END IF;
2226: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2227: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
2228: IF l_debug_level > 0 THEN
2225: END IF;
2226: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2227: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
2228: IF l_debug_level > 0 THEN
2229: oe_debug_pub.add('Delete_Transaction_Extension Successful....');
2230: oe_debug_pub.add('After calling Delete_Transaction_Extension');
2231: oe_debug_pub.add('sql error'||sqlerrm);
2232: oe_debug_pub.add('msg data'||l_msg_data);
2233: END IF;
2226: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2227: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
2228: IF l_debug_level > 0 THEN
2229: oe_debug_pub.add('Delete_Transaction_Extension Successful....');
2230: oe_debug_pub.add('After calling Delete_Transaction_Extension');
2231: oe_debug_pub.add('sql error'||sqlerrm);
2232: oe_debug_pub.add('msg data'||l_msg_data);
2233: END IF;
2234: x_return_status := FND_API.G_RET_STS_SUCCESS;
2227: ELSIF l_return_status =FND_API.G_RET_STS_SUCCESS THEN
2228: IF l_debug_level > 0 THEN
2229: oe_debug_pub.add('Delete_Transaction_Extension Successful....');
2230: oe_debug_pub.add('After calling Delete_Transaction_Extension');
2231: oe_debug_pub.add('sql error'||sqlerrm);
2232: oe_debug_pub.add('msg data'||l_msg_data);
2233: END IF;
2234: x_return_status := FND_API.G_RET_STS_SUCCESS;
2235: END IF;
2228: IF l_debug_level > 0 THEN
2229: oe_debug_pub.add('Delete_Transaction_Extension Successful....');
2230: oe_debug_pub.add('After calling Delete_Transaction_Extension');
2231: oe_debug_pub.add('sql error'||sqlerrm);
2232: oe_debug_pub.add('msg data'||l_msg_data);
2233: END IF;
2234: x_return_status := FND_API.G_RET_STS_SUCCESS;
2235: END IF;
2236: END IF;
2240:
2241: WHEN FND_API.G_EXC_ERROR THEN
2242: l_err_message := SQLERRM;
2243: IF l_debug_level > 0 THEN
2244: oe_debug_pub.add('Delete_Payment_Trxn error....exc');
2245: oe_debug_pub.add('After call to Delete_Payment_Trxn'||l_return_status);
2246: oe_debug_pub.add('Result code'||l_response_code.result_code);
2247: oe_debug_pub.add('Error'||l_err_message);
2248: END IF;
2241: WHEN FND_API.G_EXC_ERROR THEN
2242: l_err_message := SQLERRM;
2243: IF l_debug_level > 0 THEN
2244: oe_debug_pub.add('Delete_Payment_Trxn error....exc');
2245: oe_debug_pub.add('After call to Delete_Payment_Trxn'||l_return_status);
2246: oe_debug_pub.add('Result code'||l_response_code.result_code);
2247: oe_debug_pub.add('Error'||l_err_message);
2248: END IF;
2249:
2242: l_err_message := SQLERRM;
2243: IF l_debug_level > 0 THEN
2244: oe_debug_pub.add('Delete_Payment_Trxn error....exc');
2245: oe_debug_pub.add('After call to Delete_Payment_Trxn'||l_return_status);
2246: oe_debug_pub.add('Result code'||l_response_code.result_code);
2247: oe_debug_pub.add('Error'||l_err_message);
2248: END IF;
2249:
2250: X_return_status := FND_API.G_RET_STS_ERROR;
2243: IF l_debug_level > 0 THEN
2244: oe_debug_pub.add('Delete_Payment_Trxn error....exc');
2245: oe_debug_pub.add('After call to Delete_Payment_Trxn'||l_return_status);
2246: oe_debug_pub.add('Result code'||l_response_code.result_code);
2247: oe_debug_pub.add('Error'||l_err_message);
2248: END IF;
2249:
2250: X_return_status := FND_API.G_RET_STS_ERROR;
2251: OE_MSG_PUB.Count_And_Get
2256:
2257: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2258: l_err_message := SQLERRM;
2259: IF l_debug_level > 0 THEN
2260: oe_debug_pub.add('Delete_Payment_Trxn error....unxc');
2261: oe_debug_pub.add('After call to Delete_Payment_Trxn'||l_return_status);
2262: oe_debug_pub.add('Result code'||l_response_code.result_code);
2263: oe_debug_pub.add('f Error'||l_err_message);
2264: END IF;
2257: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2258: l_err_message := SQLERRM;
2259: IF l_debug_level > 0 THEN
2260: oe_debug_pub.add('Delete_Payment_Trxn error....unxc');
2261: oe_debug_pub.add('After call to Delete_Payment_Trxn'||l_return_status);
2262: oe_debug_pub.add('Result code'||l_response_code.result_code);
2263: oe_debug_pub.add('f Error'||l_err_message);
2264: END IF;
2265:
2258: l_err_message := SQLERRM;
2259: IF l_debug_level > 0 THEN
2260: oe_debug_pub.add('Delete_Payment_Trxn error....unxc');
2261: oe_debug_pub.add('After call to Delete_Payment_Trxn'||l_return_status);
2262: oe_debug_pub.add('Result code'||l_response_code.result_code);
2263: oe_debug_pub.add('f Error'||l_err_message);
2264: END IF;
2265:
2266: X_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2259: IF l_debug_level > 0 THEN
2260: oe_debug_pub.add('Delete_Payment_Trxn error....unxc');
2261: oe_debug_pub.add('After call to Delete_Payment_Trxn'||l_return_status);
2262: oe_debug_pub.add('Result code'||l_response_code.result_code);
2263: oe_debug_pub.add('f Error'||l_err_message);
2264: END IF;
2265:
2266: X_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2267: OE_MSG_PUB.Count_And_Get
2272:
2273: WHEN OTHERS THEN
2274: l_err_message := SQLERRM;
2275: IF l_debug_level > 0 THEN
2276: oe_debug_pub.add('Delete_Payment_Trxn error....others');
2277: oe_debug_pub.add('After call to Delete_Payment_Trxn'||l_return_status);
2278: oe_debug_pub.add('Result code'||l_response_code.result_code);
2279: oe_debug_pub.add('trx Error'||l_err_message);
2280: END IF;
2273: WHEN OTHERS THEN
2274: l_err_message := SQLERRM;
2275: IF l_debug_level > 0 THEN
2276: oe_debug_pub.add('Delete_Payment_Trxn error....others');
2277: oe_debug_pub.add('After call to Delete_Payment_Trxn'||l_return_status);
2278: oe_debug_pub.add('Result code'||l_response_code.result_code);
2279: oe_debug_pub.add('trx Error'||l_err_message);
2280: END IF;
2281:
2274: l_err_message := SQLERRM;
2275: IF l_debug_level > 0 THEN
2276: oe_debug_pub.add('Delete_Payment_Trxn error....others');
2277: oe_debug_pub.add('After call to Delete_Payment_Trxn'||l_return_status);
2278: oe_debug_pub.add('Result code'||l_response_code.result_code);
2279: oe_debug_pub.add('trx Error'||l_err_message);
2280: END IF;
2281:
2282: X_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2275: IF l_debug_level > 0 THEN
2276: oe_debug_pub.add('Delete_Payment_Trxn error....others');
2277: oe_debug_pub.add('After call to Delete_Payment_Trxn'||l_return_status);
2278: oe_debug_pub.add('Result code'||l_response_code.result_code);
2279: oe_debug_pub.add('trx Error'||l_err_message);
2280: END IF;
2281:
2282: X_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2283: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
2301: FUNCTION Get_Settled_Flag(p_Trxn_Extension_Id Number)
2302: RETURN VARCHAR2
2303: IS
2304: l_settled_flag VARCHAR2(1) := 'N';
2305: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
2306: BEGIN
2307: IF l_debug_level > 0 THEN
2308: oe_debug_pub.add('Entering Get_Settled_Flag Function....');
2309: oe_debug_pub.add('Trxn extension id ---> '||p_Trxn_Extension_id);
2304: l_settled_flag VARCHAR2(1) := 'N';
2305: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
2306: BEGIN
2307: IF l_debug_level > 0 THEN
2308: oe_debug_pub.add('Entering Get_Settled_Flag Function....');
2309: oe_debug_pub.add('Trxn extension id ---> '||p_Trxn_Extension_id);
2310: END IF;
2311:
2312: BEGIN
2305: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
2306: BEGIN
2307: IF l_debug_level > 0 THEN
2308: oe_debug_pub.add('Entering Get_Settled_Flag Function....');
2309: oe_debug_pub.add('Trxn extension id ---> '||p_Trxn_Extension_id);
2310: END IF;
2311:
2312: BEGIN
2313: IF p_trxn_extension_id IS NOT NULL AND
2317: from iby_trxn_extensions_v
2318: where trxn_Extension_id = p_trxn_extension_id;
2319: END IF;
2320: IF l_debug_level > 0 THEN
2321: oe_debug_pub.add('Settled flag retrieved successfully...');
2322: oe_debug_pub.add('Value of settled flag ----> '||l_settled_flag);
2323: END IF;
2324: EXCEPTION
2325: WHEN NO_DATA_FOUND THEN
2318: where trxn_Extension_id = p_trxn_extension_id;
2319: END IF;
2320: IF l_debug_level > 0 THEN
2321: oe_debug_pub.add('Settled flag retrieved successfully...');
2322: oe_debug_pub.add('Value of settled flag ----> '||l_settled_flag);
2323: END IF;
2324: EXCEPTION
2325: WHEN NO_DATA_FOUND THEN
2326: l_settled_flag := 'N';
2324: EXCEPTION
2325: WHEN NO_DATA_FOUND THEN
2326: l_settled_flag := 'N';
2327: IF l_debug_level > 0 THEN
2328: oe_debug_pub.add('The transaction extension not found in IBY Table...');
2329: END IF;
2330: WHEN OTHERS THEN
2331: NULL;
2332: END;
2352: l_msg_data VARCHAR2(2000) := NULL ;
2353: L_response_code IBY_FNDCPT_COMMON_PUB.Result_rec_type;
2354: l_channel_attrib_uses IBY_FNDCPT_SETUP_PUB.PmtChannel_AttribUses_rec_type;
2355:
2356: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
2357:
2358: BEGIN
2359: IF l_debug_level > 0 THEN
2360: oe_debug_pub.add('Before calling Get_Payment_Channel_Attribs API...');
2356: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
2357:
2358: BEGIN
2359: IF l_debug_level > 0 THEN
2360: oe_debug_pub.add('Before calling Get_Payment_Channel_Attribs API...');
2361: oe_debug_pub.add('Payment channel ---> CREDIT_CARD');
2362: END IF;
2363:
2364: IBY_FNDCPT_SETUP_PUB.Get_Payment_Channel_Attribs
2357:
2358: BEGIN
2359: IF l_debug_level > 0 THEN
2360: oe_debug_pub.add('Before calling Get_Payment_Channel_Attribs API...');
2361: oe_debug_pub.add('Payment channel ---> CREDIT_CARD');
2362: END IF;
2363:
2364: IBY_FNDCPT_SETUP_PUB.Get_Payment_Channel_Attribs
2365: (p_api_version => 1.0,
2373: G_CC_Security_Code_Use := l_channel_attrib_uses.Instr_SecCode_Use;
2374: --G_CC_Security_Code_Use := 'OPTIONAL';
2375:
2376: IF l_debug_level > 0 then
2377: oe_debug_pub.add('Return Status --> '||l_return_status);
2378: oe_debug_pub.add('Response code --> '||l_response_code.result_code);
2379: oe_debug_pub.add('Security code use ---> '||G_CC_Security_Code_Use);
2380: oe_debug_pub.add('Statement Billing Address Use ----> '|| l_channel_attrib_uses.Instr_Billing_Address);
2381: oe_debug_pub.add('Exiting OE_PAYMENT_TRXN_UTIL.Get_CC_Security_Code_Use: '||l_return_status, 1);
2374: --G_CC_Security_Code_Use := 'OPTIONAL';
2375:
2376: IF l_debug_level > 0 then
2377: oe_debug_pub.add('Return Status --> '||l_return_status);
2378: oe_debug_pub.add('Response code --> '||l_response_code.result_code);
2379: oe_debug_pub.add('Security code use ---> '||G_CC_Security_Code_Use);
2380: oe_debug_pub.add('Statement Billing Address Use ----> '|| l_channel_attrib_uses.Instr_Billing_Address);
2381: oe_debug_pub.add('Exiting OE_PAYMENT_TRXN_UTIL.Get_CC_Security_Code_Use: '||l_return_status, 1);
2382: END IF;
2375:
2376: IF l_debug_level > 0 then
2377: oe_debug_pub.add('Return Status --> '||l_return_status);
2378: oe_debug_pub.add('Response code --> '||l_response_code.result_code);
2379: oe_debug_pub.add('Security code use ---> '||G_CC_Security_Code_Use);
2380: oe_debug_pub.add('Statement Billing Address Use ----> '|| l_channel_attrib_uses.Instr_Billing_Address);
2381: oe_debug_pub.add('Exiting OE_PAYMENT_TRXN_UTIL.Get_CC_Security_Code_Use: '||l_return_status, 1);
2382: END IF;
2383:
2376: IF l_debug_level > 0 then
2377: oe_debug_pub.add('Return Status --> '||l_return_status);
2378: oe_debug_pub.add('Response code --> '||l_response_code.result_code);
2379: oe_debug_pub.add('Security code use ---> '||G_CC_Security_Code_Use);
2380: oe_debug_pub.add('Statement Billing Address Use ----> '|| l_channel_attrib_uses.Instr_Billing_Address);
2381: oe_debug_pub.add('Exiting OE_PAYMENT_TRXN_UTIL.Get_CC_Security_Code_Use: '||l_return_status, 1);
2382: END IF;
2383:
2384: RETURN G_CC_Security_Code_Use;
2377: oe_debug_pub.add('Return Status --> '||l_return_status);
2378: oe_debug_pub.add('Response code --> '||l_response_code.result_code);
2379: oe_debug_pub.add('Security code use ---> '||G_CC_Security_Code_Use);
2380: oe_debug_pub.add('Statement Billing Address Use ----> '|| l_channel_attrib_uses.Instr_Billing_Address);
2381: oe_debug_pub.add('Exiting OE_PAYMENT_TRXN_UTIL.Get_CC_Security_Code_Use: '||l_return_status, 1);
2382: END IF;
2383:
2384: RETURN G_CC_Security_Code_Use;
2385: