10:
11: l_true VARCHAR2(1) := FND_API.G_TRUE;
12: G_PKG_NAME CONSTANT VARCHAR2(30) := 'IBE_PAYMENT_INT_PVT';
13: G_FILE_NAME CONSTANT VARCHAR2(12) := 'IBEVPMTB.pls';
14: l_debugon VARCHAR2(1) := IBE_UTIL.G_DEBUGON;
15:
16: procedure save_credit_card
17: (p_api_version IN Number
18: ,p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE
75: rec_check_address_owner c_check_address_owner%rowtype;
76:
77:
78: BEGIN
79: --IBE_UTIL.enable_debug();
80: IF (l_debugon = l_true) THEN
81: IBE_UTIL.debug('enter IBE_PAYMENT_INT_PVT.save_credit_card');
82: END IF;
83: -- standard start of API savepoint
77:
78: BEGIN
79: --IBE_UTIL.enable_debug();
80: IF (l_debugon = l_true) THEN
81: IBE_UTIL.debug('enter IBE_PAYMENT_INT_PVT.save_credit_card');
82: END IF;
83: -- standard start of API savepoint
84: SAVEPOINT save_credit_card;
85:
97: -- Initialize API return status to success
98: x_return_status := FND_API.G_RET_STS_SUCCESS;
99:
100: IF (l_debugon = l_true) THEN
101: IBE_UTIL.debug('save_credit_card : Input parameters' );
102: IBE_UTIL.debug('save_credit_card : p_operation_code '||p_operation_code );
103: IBE_UTIL.debug('save_credit_card : p_credit_card_id '||p_credit_card_id );
104: IBE_UTIL.debug('save_credit_card : p_assignment_id '||p_assignment_id );
105: IBE_UTIL.debug('save_credit_card : p_currency_code '||p_currency_code );
98: x_return_status := FND_API.G_RET_STS_SUCCESS;
99:
100: IF (l_debugon = l_true) THEN
101: IBE_UTIL.debug('save_credit_card : Input parameters' );
102: IBE_UTIL.debug('save_credit_card : p_operation_code '||p_operation_code );
103: IBE_UTIL.debug('save_credit_card : p_credit_card_id '||p_credit_card_id );
104: IBE_UTIL.debug('save_credit_card : p_assignment_id '||p_assignment_id );
105: IBE_UTIL.debug('save_credit_card : p_currency_code '||p_currency_code );
106: IBE_UTIL.debug('save_credit_card : p_card_holder_name '||p_card_holder_name );
99:
100: IF (l_debugon = l_true) THEN
101: IBE_UTIL.debug('save_credit_card : Input parameters' );
102: IBE_UTIL.debug('save_credit_card : p_operation_code '||p_operation_code );
103: IBE_UTIL.debug('save_credit_card : p_credit_card_id '||p_credit_card_id );
104: IBE_UTIL.debug('save_credit_card : p_assignment_id '||p_assignment_id );
105: IBE_UTIL.debug('save_credit_card : p_currency_code '||p_currency_code );
106: IBE_UTIL.debug('save_credit_card : p_card_holder_name '||p_card_holder_name );
107: IBE_UTIL.debug('save_credit_card : p_exp_date '||p_exp_date );
100: IF (l_debugon = l_true) THEN
101: IBE_UTIL.debug('save_credit_card : Input parameters' );
102: IBE_UTIL.debug('save_credit_card : p_operation_code '||p_operation_code );
103: IBE_UTIL.debug('save_credit_card : p_credit_card_id '||p_credit_card_id );
104: IBE_UTIL.debug('save_credit_card : p_assignment_id '||p_assignment_id );
105: IBE_UTIL.debug('save_credit_card : p_currency_code '||p_currency_code );
106: IBE_UTIL.debug('save_credit_card : p_card_holder_name '||p_card_holder_name );
107: IBE_UTIL.debug('save_credit_card : p_exp_date '||p_exp_date );
108: IBE_UTIL.debug('save_credit_card : p_credit_card_type_code '||p_credit_card_type_code );
101: IBE_UTIL.debug('save_credit_card : Input parameters' );
102: IBE_UTIL.debug('save_credit_card : p_operation_code '||p_operation_code );
103: IBE_UTIL.debug('save_credit_card : p_credit_card_id '||p_credit_card_id );
104: IBE_UTIL.debug('save_credit_card : p_assignment_id '||p_assignment_id );
105: IBE_UTIL.debug('save_credit_card : p_currency_code '||p_currency_code );
106: IBE_UTIL.debug('save_credit_card : p_card_holder_name '||p_card_holder_name );
107: IBE_UTIL.debug('save_credit_card : p_exp_date '||p_exp_date );
108: IBE_UTIL.debug('save_credit_card : p_credit_card_type_code '||p_credit_card_type_code );
109: IBE_UTIL.debug('save_credit_card : p_party_id '||p_party_id );
102: IBE_UTIL.debug('save_credit_card : p_operation_code '||p_operation_code );
103: IBE_UTIL.debug('save_credit_card : p_credit_card_id '||p_credit_card_id );
104: IBE_UTIL.debug('save_credit_card : p_assignment_id '||p_assignment_id );
105: IBE_UTIL.debug('save_credit_card : p_currency_code '||p_currency_code );
106: IBE_UTIL.debug('save_credit_card : p_card_holder_name '||p_card_holder_name );
107: IBE_UTIL.debug('save_credit_card : p_exp_date '||p_exp_date );
108: IBE_UTIL.debug('save_credit_card : p_credit_card_type_code '||p_credit_card_type_code );
109: IBE_UTIL.debug('save_credit_card : p_party_id '||p_party_id );
110: IBE_UTIL.debug('save_credit_card : p_cust_id '||p_cust_id );
103: IBE_UTIL.debug('save_credit_card : p_credit_card_id '||p_credit_card_id );
104: IBE_UTIL.debug('save_credit_card : p_assignment_id '||p_assignment_id );
105: IBE_UTIL.debug('save_credit_card : p_currency_code '||p_currency_code );
106: IBE_UTIL.debug('save_credit_card : p_card_holder_name '||p_card_holder_name );
107: IBE_UTIL.debug('save_credit_card : p_exp_date '||p_exp_date );
108: IBE_UTIL.debug('save_credit_card : p_credit_card_type_code '||p_credit_card_type_code );
109: IBE_UTIL.debug('save_credit_card : p_party_id '||p_party_id );
110: IBE_UTIL.debug('save_credit_card : p_cust_id '||p_cust_id );
111: IBE_UTIL.debug('save_credit_card : p_statement_address_id '||p_statement_address_id );
104: IBE_UTIL.debug('save_credit_card : p_assignment_id '||p_assignment_id );
105: IBE_UTIL.debug('save_credit_card : p_currency_code '||p_currency_code );
106: IBE_UTIL.debug('save_credit_card : p_card_holder_name '||p_card_holder_name );
107: IBE_UTIL.debug('save_credit_card : p_exp_date '||p_exp_date );
108: IBE_UTIL.debug('save_credit_card : p_credit_card_type_code '||p_credit_card_type_code );
109: IBE_UTIL.debug('save_credit_card : p_party_id '||p_party_id );
110: IBE_UTIL.debug('save_credit_card : p_cust_id '||p_cust_id );
111: IBE_UTIL.debug('save_credit_card : p_statement_address_id '||p_statement_address_id );
112:
105: IBE_UTIL.debug('save_credit_card : p_currency_code '||p_currency_code );
106: IBE_UTIL.debug('save_credit_card : p_card_holder_name '||p_card_holder_name );
107: IBE_UTIL.debug('save_credit_card : p_exp_date '||p_exp_date );
108: IBE_UTIL.debug('save_credit_card : p_credit_card_type_code '||p_credit_card_type_code );
109: IBE_UTIL.debug('save_credit_card : p_party_id '||p_party_id );
110: IBE_UTIL.debug('save_credit_card : p_cust_id '||p_cust_id );
111: IBE_UTIL.debug('save_credit_card : p_statement_address_id '||p_statement_address_id );
112:
113: END IF;
106: IBE_UTIL.debug('save_credit_card : p_card_holder_name '||p_card_holder_name );
107: IBE_UTIL.debug('save_credit_card : p_exp_date '||p_exp_date );
108: IBE_UTIL.debug('save_credit_card : p_credit_card_type_code '||p_credit_card_type_code );
109: IBE_UTIL.debug('save_credit_card : p_party_id '||p_party_id );
110: IBE_UTIL.debug('save_credit_card : p_cust_id '||p_cust_id );
111: IBE_UTIL.debug('save_credit_card : p_statement_address_id '||p_statement_address_id );
112:
113: END IF;
114:
107: IBE_UTIL.debug('save_credit_card : p_exp_date '||p_exp_date );
108: IBE_UTIL.debug('save_credit_card : p_credit_card_type_code '||p_credit_card_type_code );
109: IBE_UTIL.debug('save_credit_card : p_party_id '||p_party_id );
110: IBE_UTIL.debug('save_credit_card : p_cust_id '||p_cust_id );
111: IBE_UTIL.debug('save_credit_card : p_statement_address_id '||p_statement_address_id );
112:
113: END IF;
114:
115: IF (l_debugon = l_true) THEN
112:
113: END IF;
114:
115: IF (l_debugon = l_true) THEN
116: IBE_UTIL.debug('call process_credit_card - setup recStructs');
117: END IF;
118:
119: ---------- calling IBY api: START ----------------------------------------------
120: -- *. Need to make sure that IBY takes in Gmiss values
157: EXIT when c_check_address_owner%NOTFOUND;
158: END LOOP;
159:
160: IF (l_debugon = l_true) THEN
161: IBE_UTIL.debug('Save_Credit_card: l_location_id from cursor '||l_location_id);
162: IBE_UTIL.debug('Save_Credit_card:l_location_party_id from cursor '||l_location_party_id);
163: END IF;
164:
165: IF (p_party_id <> l_location_party_id) THEN
158: END LOOP;
159:
160: IF (l_debugon = l_true) THEN
161: IBE_UTIL.debug('Save_Credit_card: l_location_id from cursor '||l_location_id);
162: IBE_UTIL.debug('Save_Credit_card:l_location_party_id from cursor '||l_location_party_id);
163: END IF;
164:
165: IF (p_party_id <> l_location_party_id) THEN
166:
164:
165: IF (p_party_id <> l_location_party_id) THEN
166:
167: IF (l_debugon = l_true) THEN
168: IBE_UTIL.debug('Save_Credit_card: Input party id and location party id do not match');
169: END IF;
170:
171: l_location.location_id := l_location_id;
172: l_location.address_effective_date := sysdate;
176: l_party_site.status := 'A';
177: l_party_site.created_by_module := 'USER PROFILE';
178:
179: IF (l_debugon = l_true) THEN
180: IBE_UTIL.debug('Save_Credit_card: Ready to call IBE_ADDRESS_V2PVT.create_address');
181: END IF;
182:
183:
184: /*IBE_ADDRESS_V2PVT.create_address(
202: ,x_msg_count => x_msg_count
203: ,x_msg_data => x_msg_data);
204:
205: IF (l_debugon = l_true) THEN
206: IBE_UTIL.debug('Save_Credit_card: Done calling IBE_ADDRESS_V2PVT.create_address: x_return_status '||x_return_status);
207: END IF;
208:
209: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
210: RAISE FND_API.G_EXC_ERROR;
213: END IF;
214:
215:
216: IF (l_debugon = l_true) THEN
217: IBE_UTIL.debug('Save_Credit_card: Done calling IBE_ADDRESS_V2PVT.create_address: No error');
218: IBE_UTIL.debug('Save_Credit_card: Done calling IBE_ADDRESS_V2PVT.create_address: new billing_address_id '||l_billing_address_id);
219: END IF;
220:
221: l_card_instrument.billing_address_id := l_billing_address_id;
214:
215:
216: IF (l_debugon = l_true) THEN
217: IBE_UTIL.debug('Save_Credit_card: Done calling IBE_ADDRESS_V2PVT.create_address: No error');
218: IBE_UTIL.debug('Save_Credit_card: Done calling IBE_ADDRESS_V2PVT.create_address: new billing_address_id '||l_billing_address_id);
219: END IF;
220:
221: l_card_instrument.billing_address_id := l_billing_address_id;
222:
223: ELSE
224:
225: l_card_instrument.billing_address_id := p_statement_address_id;
226: IF (l_debugon = l_true) THEN
227: IBE_UTIL.debug('Save_Credit_card: Party ids match');
228: END IF;
229:
230: END IF;
231:
318: l_assignment_attr.Priority := 1;
319: l_assignment_attr.assignment_id := p_assignment_id;
320:
321: IF (l_debugon = l_true) THEN
322: IBE_UTIL.debug('SaveCC: Set primary opration: l_assignment_attr.assignment_id '||l_assignment_attr.assignment_id);
323: IBE_UTIL.debug('call IBY_FNDCPT_SETUP_PUB.Set_Payer_Instr_Assignment - before calling api');
324: END IF;
325:
326:
319: l_assignment_attr.assignment_id := p_assignment_id;
320:
321: IF (l_debugon = l_true) THEN
322: IBE_UTIL.debug('SaveCC: Set primary opration: l_assignment_attr.assignment_id '||l_assignment_attr.assignment_id);
323: IBE_UTIL.debug('call IBY_FNDCPT_SETUP_PUB.Set_Payer_Instr_Assignment - before calling api');
324: END IF;
325:
326:
327: IBY_FNDCPT_SETUP_PUB.Set_Payer_Instr_Assignment (
342: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
343: END IF;
344:
345: IF (l_debugon = l_true) THEN
346: IBE_UTIL.debug('call IBY_FNDCPT_SETUP_PUB.Set_Payer_Instr_Assignment - after calling api');
347: END IF;
348:
349: end if;
350:
348:
349: end if;
350:
351: IF (l_debugon = l_true) THEN
352: IBE_UTIL.debug('call process_credit_card - before calling api');
353: END IF;
354:
355: if (p_operation_code = 'CREATE_AND_SET_PRIMARY' or p_operation_code = 'CREATE' ) then
356:
368: ,x_response => lx_response );
369:
370: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
371: IF (l_debugon = l_true) THEN
372: IBE_UTIL.debug('call process_credit_card - Expected error');
373: IBE_UTIL.debug('call process_credit_card - Expected error: '||lx_response.Result_Code);
374: END IF;
375:
376: RAISE FND_API.G_EXC_ERROR;
369:
370: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
371: IF (l_debugon = l_true) THEN
372: IBE_UTIL.debug('call process_credit_card - Expected error');
373: IBE_UTIL.debug('call process_credit_card - Expected error: '||lx_response.Result_Code);
374: END IF;
375:
376: RAISE FND_API.G_EXC_ERROR;
377: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
375:
376: RAISE FND_API.G_EXC_ERROR;
377: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
378: IF (l_debugon = l_true) THEN
379: IBE_UTIL.debug('call process_credit_card - UnExpected error');
380: END IF;
381: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
382: END IF;
383: x_assignment_id := lx_assign_id;
402: END IF;
403: -- We need to call the Experss Checkout api to check if the Express Chkout CC is the same
404: -- as the one deleted. If so, disable the Express Chkout
405:
406: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
407: ibe_util.debug('p_operation_code :'||p_operation_code);
408: ibe_util.debug('l_oneclick_enabled :'||l_oneclick_enabled);
409: ibe_util.debug('p_party_id :'||p_party_id);
410: ibe_util.debug('p_cust_id :'||p_cust_id);
403: -- We need to call the Experss Checkout api to check if the Express Chkout CC is the same
404: -- as the one deleted. If so, disable the Express Chkout
405:
406: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
407: ibe_util.debug('p_operation_code :'||p_operation_code);
408: ibe_util.debug('l_oneclick_enabled :'||l_oneclick_enabled);
409: ibe_util.debug('p_party_id :'||p_party_id);
410: ibe_util.debug('p_cust_id :'||p_cust_id);
411: END IF;
404: -- as the one deleted. If so, disable the Express Chkout
405:
406: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
407: ibe_util.debug('p_operation_code :'||p_operation_code);
408: ibe_util.debug('l_oneclick_enabled :'||l_oneclick_enabled);
409: ibe_util.debug('p_party_id :'||p_party_id);
410: ibe_util.debug('p_cust_id :'||p_cust_id);
411: END IF;
412:
405:
406: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
407: ibe_util.debug('p_operation_code :'||p_operation_code);
408: ibe_util.debug('l_oneclick_enabled :'||l_oneclick_enabled);
409: ibe_util.debug('p_party_id :'||p_party_id);
410: ibe_util.debug('p_cust_id :'||p_cust_id);
411: END IF;
412:
413: if l_oneclick_enabled = 'Y' and p_operation_code = 'DELETE' then
406: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
407: ibe_util.debug('p_operation_code :'||p_operation_code);
408: ibe_util.debug('l_oneclick_enabled :'||l_oneclick_enabled);
409: ibe_util.debug('p_party_id :'||p_party_id);
410: ibe_util.debug('p_cust_id :'||p_cust_id);
411: END IF;
412:
413: if l_oneclick_enabled = 'Y' and p_operation_code = 'DELETE' then
414:
411: END IF;
412:
413: if l_oneclick_enabled = 'Y' and p_operation_code = 'DELETE' then
414:
415: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
416: ibe_util.debug('Entering the loop :'||p_operation_code);
417: END IF;
418:
419: OPEN c_get_oneclick_settings(p_party_id, p_cust_id);
412:
413: if l_oneclick_enabled = 'Y' and p_operation_code = 'DELETE' then
414:
415: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
416: ibe_util.debug('Entering the loop :'||p_operation_code);
417: END IF;
418:
419: OPEN c_get_oneclick_settings(p_party_id, p_cust_id);
420: FETCH c_get_oneclick_settings
426: l_oneclick_id := FND_API.g_miss_num;
427: end if;
428: CLOSE c_get_oneclick_settings;
429:
430: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
431: ibe_util.debug('l_oneclick_id :'||l_oneclick_id);
432: ibe_util.debug('l_enabled_flag :'||l_enabled_flag);
433: END IF;
434:
427: end if;
428: CLOSE c_get_oneclick_settings;
429:
430: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
431: ibe_util.debug('l_oneclick_id :'||l_oneclick_id);
432: ibe_util.debug('l_enabled_flag :'||l_enabled_flag);
433: END IF;
434:
435: IF l_oneclick_id <> FND_API.g_miss_num and l_enabled_flag = 'Y' then
428: CLOSE c_get_oneclick_settings;
429:
430: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
431: ibe_util.debug('l_oneclick_id :'||l_oneclick_id);
432: ibe_util.debug('l_enabled_flag :'||l_enabled_flag);
433: END IF;
434:
435: IF l_oneclick_id <> FND_API.g_miss_num and l_enabled_flag = 'Y' then
436: IF (l_debugon = l_true) THEN
433: END IF;
434:
435: IF l_oneclick_id <> FND_API.g_miss_num and l_enabled_flag = 'Y' then
436: IF (l_debugon = l_true) THEN
437: IBE_UTIL.debug('call process_credit_card - Going to call ibe_ord_oneclick_pvt.Update_Settings()');
438: IBE_UTIL.debug('call process_credit_card - p_party_id ' ||p_party_id);
439: IBE_UTIL.debug('call process_credit_card - p_cust_id '||p_cust_id);
440: IBE_UTIL.debug('call process_credit_card - p_assignment_id'||l_assignment_attr.Assignment_Id);
441: END IF;
434:
435: IF l_oneclick_id <> FND_API.g_miss_num and l_enabled_flag = 'Y' then
436: IF (l_debugon = l_true) THEN
437: IBE_UTIL.debug('call process_credit_card - Going to call ibe_ord_oneclick_pvt.Update_Settings()');
438: IBE_UTIL.debug('call process_credit_card - p_party_id ' ||p_party_id);
439: IBE_UTIL.debug('call process_credit_card - p_cust_id '||p_cust_id);
440: IBE_UTIL.debug('call process_credit_card - p_assignment_id'||l_assignment_attr.Assignment_Id);
441: END IF;
442:
435: IF l_oneclick_id <> FND_API.g_miss_num and l_enabled_flag = 'Y' then
436: IF (l_debugon = l_true) THEN
437: IBE_UTIL.debug('call process_credit_card - Going to call ibe_ord_oneclick_pvt.Update_Settings()');
438: IBE_UTIL.debug('call process_credit_card - p_party_id ' ||p_party_id);
439: IBE_UTIL.debug('call process_credit_card - p_cust_id '||p_cust_id);
440: IBE_UTIL.debug('call process_credit_card - p_assignment_id'||l_assignment_attr.Assignment_Id);
441: END IF;
442:
443: ibe_ord_oneclick_pvt.Update_Settings(
436: IF (l_debugon = l_true) THEN
437: IBE_UTIL.debug('call process_credit_card - Going to call ibe_ord_oneclick_pvt.Update_Settings()');
438: IBE_UTIL.debug('call process_credit_card - p_party_id ' ||p_party_id);
439: IBE_UTIL.debug('call process_credit_card - p_cust_id '||p_cust_id);
440: IBE_UTIL.debug('call process_credit_card - p_assignment_id'||l_assignment_attr.Assignment_Id);
441: END IF;
442:
443: ibe_ord_oneclick_pvt.Update_Settings(
444: p_api_version => p_api_version
472:
473: EXCEPTION
474:
475: WHEN FND_API.G_EXC_ERROR THEN
476: -- IBE_UTIL.enable_debug();
477: ROLLBACK TO save_credit_card;
478: IF (l_debugon = l_true) THEN
479: IBE_UTIL.debug('G_EXC_ERROR exception');
480: END IF;
475: WHEN FND_API.G_EXC_ERROR THEN
476: -- IBE_UTIL.enable_debug();
477: ROLLBACK TO save_credit_card;
478: IF (l_debugon = l_true) THEN
479: IBE_UTIL.debug('G_EXC_ERROR exception');
480: END IF;
481:
482: x_return_status := FND_API.G_RET_STS_ERROR;
483: FND_MSG_PUB.Add;
488: for k in 1..x_msg_count loop
489: lx_msg_data := fnd_msg_pub.get( p_msg_index => k,
490: p_encoded => 'F');
491: IF (l_debugon = l_true) THEN
492: IBE_UTIL.debug('Error msg: '||substr(lx_msg_data,1,240));
493: END IF;
494: end loop;
495:
496: IF (l_debugon = l_true) THEN
493: END IF;
494: end loop;
495:
496: IF (l_debugon = l_true) THEN
497: IBE_UTIL.debug('G_EXC_ERROR exception');
498: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
499: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
500: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
501: IBE_UTIL.debug('error text : '|| SQLERRM);
494: end loop;
495:
496: IF (l_debugon = l_true) THEN
497: IBE_UTIL.debug('G_EXC_ERROR exception');
498: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
499: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
500: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
501: IBE_UTIL.debug('error text : '|| SQLERRM);
502: END IF;
495:
496: IF (l_debugon = l_true) THEN
497: IBE_UTIL.debug('G_EXC_ERROR exception');
498: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
499: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
500: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
501: IBE_UTIL.debug('error text : '|| SQLERRM);
502: END IF;
503: --IBE_UTIL.disable_debug();
496: IF (l_debugon = l_true) THEN
497: IBE_UTIL.debug('G_EXC_ERROR exception');
498: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
499: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
500: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
501: IBE_UTIL.debug('error text : '|| SQLERRM);
502: END IF;
503: --IBE_UTIL.disable_debug();
504: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
497: IBE_UTIL.debug('G_EXC_ERROR exception');
498: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
499: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
500: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
501: IBE_UTIL.debug('error text : '|| SQLERRM);
502: END IF;
503: --IBE_UTIL.disable_debug();
504: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
505: --IBE_UTIL.enable_debug();
499: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
500: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
501: IBE_UTIL.debug('error text : '|| SQLERRM);
502: END IF;
503: --IBE_UTIL.disable_debug();
504: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
505: --IBE_UTIL.enable_debug();
506: ROLLBACK TO save_credit_card;
507:
501: IBE_UTIL.debug('error text : '|| SQLERRM);
502: END IF;
503: --IBE_UTIL.disable_debug();
504: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
505: --IBE_UTIL.enable_debug();
506: ROLLBACK TO save_credit_card;
507:
508: IF (l_debugon = l_true) THEN
509: IBE_UTIL.debug('G_UNEXC_ERROR exception');
505: --IBE_UTIL.enable_debug();
506: ROLLBACK TO save_credit_card;
507:
508: IF (l_debugon = l_true) THEN
509: IBE_UTIL.debug('G_UNEXC_ERROR exception');
510: END IF;
511: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
512: FND_MSG_PUB.Add;
513: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count,
513: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count,
514: p_data => x_msg_data,
515: p_encoded => 'F');
516: IF (l_debugon = l_true) THEN
517: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
518: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
519: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
520: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
521: IBE_UTIL.debug('error text : '|| SQLERRM);
514: p_data => x_msg_data,
515: p_encoded => 'F');
516: IF (l_debugon = l_true) THEN
517: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
518: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
519: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
520: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
521: IBE_UTIL.debug('error text : '|| SQLERRM);
522: END IF;
515: p_encoded => 'F');
516: IF (l_debugon = l_true) THEN
517: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
518: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
519: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
520: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
521: IBE_UTIL.debug('error text : '|| SQLERRM);
522: END IF;
523: --IBE_UTIL.disable_debug();
516: IF (l_debugon = l_true) THEN
517: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
518: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
519: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
520: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
521: IBE_UTIL.debug('error text : '|| SQLERRM);
522: END IF;
523: --IBE_UTIL.disable_debug();
524: WHEN OTHERS THEN
517: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
518: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
519: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
520: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
521: IBE_UTIL.debug('error text : '|| SQLERRM);
522: END IF;
523: --IBE_UTIL.disable_debug();
524: WHEN OTHERS THEN
525: --IBE_UTIL.enable_debug();
519: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
520: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
521: IBE_UTIL.debug('error text : '|| SQLERRM);
522: END IF;
523: --IBE_UTIL.disable_debug();
524: WHEN OTHERS THEN
525: --IBE_UTIL.enable_debug();
526: ROLLBACK TO save_credit_card;
527: IF (l_debugon = l_true) THEN
521: IBE_UTIL.debug('error text : '|| SQLERRM);
522: END IF;
523: --IBE_UTIL.disable_debug();
524: WHEN OTHERS THEN
525: --IBE_UTIL.enable_debug();
526: ROLLBACK TO save_credit_card;
527: IF (l_debugon = l_true) THEN
528: IBE_UTIL.debug('Others exception');
529: END IF;
524: WHEN OTHERS THEN
525: --IBE_UTIL.enable_debug();
526: ROLLBACK TO save_credit_card;
527: IF (l_debugon = l_true) THEN
528: IBE_UTIL.debug('Others exception');
529: END IF;
530:
531: FND_MESSAGE.Set_Name('FND', 'SQL_PLSQL_ERROR');
532: FND_MESSAGE.Set_Token('ROUTINE', l_api_name);
540: --bug 2617273
541: --x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
542: x_return_status := FND_API.G_RET_STS_ERROR;
543: IF (l_debugon = l_true) THEN
544: IBE_UTIL.debug('outside -20001 error code : '|| to_char(SQLCODE));
545: IBE_UTIL.debug('outside -20001 error text : '|| SQLERRM);
546: END IF;
547: IF (l_debugon = l_true) THEN
548: IBE_UTIL.debug('OTHER exception');
541: --x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
542: x_return_status := FND_API.G_RET_STS_ERROR;
543: IF (l_debugon = l_true) THEN
544: IBE_UTIL.debug('outside -20001 error code : '|| to_char(SQLCODE));
545: IBE_UTIL.debug('outside -20001 error text : '|| SQLERRM);
546: END IF;
547: IF (l_debugon = l_true) THEN
548: IBE_UTIL.debug('OTHER exception');
549: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
544: IBE_UTIL.debug('outside -20001 error code : '|| to_char(SQLCODE));
545: IBE_UTIL.debug('outside -20001 error text : '|| SQLERRM);
546: END IF;
547: IF (l_debugon = l_true) THEN
548: IBE_UTIL.debug('OTHER exception');
549: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
550: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
551: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
552: IBE_UTIL.debug('error text : '|| SQLERRM);
545: IBE_UTIL.debug('outside -20001 error text : '|| SQLERRM);
546: END IF;
547: IF (l_debugon = l_true) THEN
548: IBE_UTIL.debug('OTHER exception');
549: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
550: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
551: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
552: IBE_UTIL.debug('error text : '|| SQLERRM);
553: END IF;
546: END IF;
547: IF (l_debugon = l_true) THEN
548: IBE_UTIL.debug('OTHER exception');
549: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
550: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
551: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
552: IBE_UTIL.debug('error text : '|| SQLERRM);
553: END IF;
554: --IBE_UTIL.disable_debug();
547: IF (l_debugon = l_true) THEN
548: IBE_UTIL.debug('OTHER exception');
549: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
550: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
551: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
552: IBE_UTIL.debug('error text : '|| SQLERRM);
553: END IF;
554: --IBE_UTIL.disable_debug();
555:
548: IBE_UTIL.debug('OTHER exception');
549: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
550: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
551: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
552: IBE_UTIL.debug('error text : '|| SQLERRM);
553: END IF;
554: --IBE_UTIL.disable_debug();
555:
556: END save_credit_card;
550: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
551: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
552: IBE_UTIL.debug('error text : '|| SQLERRM);
553: END IF;
554: --IBE_UTIL.disable_debug();
555:
556: END save_credit_card;
557:
558: PROCEDURE check_Payment_channel_setups(
574: l_msg_data VARCHAR2(2000);
575: l_result_rec_type IBY_FNDCPT_COMMON_PUB.Result_rec_type;
576: BEGIN
577: IF (l_debugon = l_true) THEN
578: IBE_UTIL.debug('check_Payment_channel_setups: Begin ');
579: END IF;
580:
581: IBY_FNDCPT_SETUP_PUB.Get_Payment_Channel_Attribs(
582: p_api_version => l_api_version,
594: IF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
595: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
596: END IF;
597: IF (l_debugon = l_true) THEN
598: IBE_UTIL.debug('check_Payment_channel_setups:lx_channel_attrib_uses.Instr_SecCode_Use '||lx_channel_attrib_uses.Instr_SecCode_Use);
599: END IF;
600:
601: IF (l_debugon = l_true) THEN
602: IBE_UTIL.debug('check_Payment_channel_setups:lx_channel_attrib_uses.Instr_Billing_Address '||lx_channel_attrib_uses.Instr_Billing_Address);
598: IBE_UTIL.debug('check_Payment_channel_setups:lx_channel_attrib_uses.Instr_SecCode_Use '||lx_channel_attrib_uses.Instr_SecCode_Use);
599: END IF;
600:
601: IF (l_debugon = l_true) THEN
602: IBE_UTIL.debug('check_Payment_channel_setups:lx_channel_attrib_uses.Instr_Billing_Address '||lx_channel_attrib_uses.Instr_Billing_Address);
603: END IF;
604:
605:
606: IF(lx_channel_attrib_uses.Instr_SecCode_Use = 'REQUIRED') then
610: x_cvv2_setup := FND_API.G_FALSE;
611: END IF;
612:
613: IF (l_debugon = l_true) THEN
614: IBE_UTIL.debug('check_Payment_channel_setups: lx_channel_attrib_uses.Instr_SecCode_Use '||lx_channel_attrib_uses.Instr_SecCode_Use);
615: IBE_UTIL.debug('check_Payment_channel_setups: x_cvv2_status '||x_cvv2_setup);
616: END IF;
617:
618: IF(lx_channel_attrib_uses.Instr_Billing_Address = 'REQUIRED') then
611: END IF;
612:
613: IF (l_debugon = l_true) THEN
614: IBE_UTIL.debug('check_Payment_channel_setups: lx_channel_attrib_uses.Instr_SecCode_Use '||lx_channel_attrib_uses.Instr_SecCode_Use);
615: IBE_UTIL.debug('check_Payment_channel_setups: x_cvv2_status '||x_cvv2_setup);
616: END IF;
617:
618: IF(lx_channel_attrib_uses.Instr_Billing_Address = 'REQUIRED') then
619: x_statement_address_setup := FND_API.G_TRUE;
621: x_statement_address_setup := FND_API.G_FALSE;
622: END IF;
623:
624: IF (l_debugon = l_true) THEN
625: IBE_UTIL.debug('check_Payment_channel_setups: lx_channel_attrib_uses.Instr_Billing_Address '||lx_channel_attrib_uses.Instr_Billing_Address);
626: IBE_UTIL.debug('check_Payment_channel_setups: x_statement_address_setup '||x_statement_address_setup);
627: END IF;
628:
629: EXCEPTION
622: END IF;
623:
624: IF (l_debugon = l_true) THEN
625: IBE_UTIL.debug('check_Payment_channel_setups: lx_channel_attrib_uses.Instr_Billing_Address '||lx_channel_attrib_uses.Instr_Billing_Address);
626: IBE_UTIL.debug('check_Payment_channel_setups: x_statement_address_setup '||x_statement_address_setup);
627: END IF;
628:
629: EXCEPTION
630: WHEN FND_API.G_EXC_ERROR THEN
628:
629: EXCEPTION
630: WHEN FND_API.G_EXC_ERROR THEN
631: IF (l_debugon = l_true) THEN
632: IBE_UTIL.debug('G_EXC_ERROR exception');
633: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
634: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
635: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
636: IBE_UTIL.debug('error text : '|| SQLERRM);
629: EXCEPTION
630: WHEN FND_API.G_EXC_ERROR THEN
631: IF (l_debugon = l_true) THEN
632: IBE_UTIL.debug('G_EXC_ERROR exception');
633: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
634: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
635: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
636: IBE_UTIL.debug('error text : '|| SQLERRM);
637: END IF;
630: WHEN FND_API.G_EXC_ERROR THEN
631: IF (l_debugon = l_true) THEN
632: IBE_UTIL.debug('G_EXC_ERROR exception');
633: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
634: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
635: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
636: IBE_UTIL.debug('error text : '|| SQLERRM);
637: END IF;
638: --IBE_UTIL.disable_debug();
631: IF (l_debugon = l_true) THEN
632: IBE_UTIL.debug('G_EXC_ERROR exception');
633: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
634: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
635: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
636: IBE_UTIL.debug('error text : '|| SQLERRM);
637: END IF;
638: --IBE_UTIL.disable_debug();
639: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
632: IBE_UTIL.debug('G_EXC_ERROR exception');
633: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
634: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
635: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
636: IBE_UTIL.debug('error text : '|| SQLERRM);
637: END IF;
638: --IBE_UTIL.disable_debug();
639: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
640: IF (l_debugon = l_true) THEN
634: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
635: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
636: IBE_UTIL.debug('error text : '|| SQLERRM);
637: END IF;
638: --IBE_UTIL.disable_debug();
639: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
640: IF (l_debugon = l_true) THEN
641: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
642: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
637: END IF;
638: --IBE_UTIL.disable_debug();
639: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
640: IF (l_debugon = l_true) THEN
641: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
642: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
643: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
644: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
645: IBE_UTIL.debug('error text : '|| SQLERRM);
638: --IBE_UTIL.disable_debug();
639: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
640: IF (l_debugon = l_true) THEN
641: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
642: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
643: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
644: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
645: IBE_UTIL.debug('error text : '|| SQLERRM);
646: END IF;
639: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
640: IF (l_debugon = l_true) THEN
641: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
642: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
643: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
644: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
645: IBE_UTIL.debug('error text : '|| SQLERRM);
646: END IF;
647: --IBE_UTIL.disable_debug();
640: IF (l_debugon = l_true) THEN
641: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
642: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
643: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
644: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
645: IBE_UTIL.debug('error text : '|| SQLERRM);
646: END IF;
647: --IBE_UTIL.disable_debug();
648: WHEN OTHERS THEN
641: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
642: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
643: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
644: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
645: IBE_UTIL.debug('error text : '|| SQLERRM);
646: END IF;
647: --IBE_UTIL.disable_debug();
648: WHEN OTHERS THEN
649: IF (l_debugon = l_true) THEN
643: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
644: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
645: IBE_UTIL.debug('error text : '|| SQLERRM);
646: END IF;
647: --IBE_UTIL.disable_debug();
648: WHEN OTHERS THEN
649: IF (l_debugon = l_true) THEN
650: IBE_UTIL.debug('outside -20001 error code : '|| to_char(SQLCODE));
651: IBE_UTIL.debug('outside -20001 error text : '|| SQLERRM);
646: END IF;
647: --IBE_UTIL.disable_debug();
648: WHEN OTHERS THEN
649: IF (l_debugon = l_true) THEN
650: IBE_UTIL.debug('outside -20001 error code : '|| to_char(SQLCODE));
651: IBE_UTIL.debug('outside -20001 error text : '|| SQLERRM);
652: END IF;
653: IF (l_debugon = l_true) THEN
654: IBE_UTIL.debug('OTHER exception');
647: --IBE_UTIL.disable_debug();
648: WHEN OTHERS THEN
649: IF (l_debugon = l_true) THEN
650: IBE_UTIL.debug('outside -20001 error code : '|| to_char(SQLCODE));
651: IBE_UTIL.debug('outside -20001 error text : '|| SQLERRM);
652: END IF;
653: IF (l_debugon = l_true) THEN
654: IBE_UTIL.debug('OTHER exception');
655: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
650: IBE_UTIL.debug('outside -20001 error code : '|| to_char(SQLCODE));
651: IBE_UTIL.debug('outside -20001 error text : '|| SQLERRM);
652: END IF;
653: IF (l_debugon = l_true) THEN
654: IBE_UTIL.debug('OTHER exception');
655: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
656: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
657: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
658: IBE_UTIL.debug('error text : '|| SQLERRM);
651: IBE_UTIL.debug('outside -20001 error text : '|| SQLERRM);
652: END IF;
653: IF (l_debugon = l_true) THEN
654: IBE_UTIL.debug('OTHER exception');
655: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
656: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
657: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
658: IBE_UTIL.debug('error text : '|| SQLERRM);
659: END IF;
652: END IF;
653: IF (l_debugon = l_true) THEN
654: IBE_UTIL.debug('OTHER exception');
655: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
656: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
657: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
658: IBE_UTIL.debug('error text : '|| SQLERRM);
659: END IF;
660: END check_Payment_channel_setups;
653: IF (l_debugon = l_true) THEN
654: IBE_UTIL.debug('OTHER exception');
655: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
656: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
657: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
658: IBE_UTIL.debug('error text : '|| SQLERRM);
659: END IF;
660: END check_Payment_channel_setups;
661:
654: IBE_UTIL.debug('OTHER exception');
655: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
656: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
657: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
658: IBE_UTIL.debug('error text : '|| SQLERRM);
659: END IF;
660: END check_Payment_channel_setups;
661:
662: PROCEDURE print_debug_log(p_debug_str IN VARCHAR2) IS
663:
664: BEGIN
665:
666: FND_FILE.PUT_LINE(FND_FILE.LOG,p_debug_str);
667: IBE_UTIL.debug(p_debug_str);
668:
669: END print_Debug_Log;
670:
671: PROCEDURE print_output(p_message IN VARCHAR2) IS