325: l_api_name,
326: G_PKG_NAME )
327: THEN
328: FND_MESSAGE.SET_NAME('IBY', 'IBY_204400_API_VER_MISMATCH');
329: FND_MSG_PUB.Add;
330: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
331: END IF;
332:
333: -- Initialize message list if p_init_msg_list is set to TRUE.
331: END IF;
332:
333: -- Initialize message list if p_init_msg_list is set to TRUE.
334: IF FND_API.to_Boolean( p_init_msg_list ) THEN
335: FND_MSG_PUB.initialize;
336: END IF;
337:
338: -- Verifying if validation level is FULL, which is expected for PUBLIC APIs.
339: IF (p_validation_level <> g_validation_level) THEN
337:
338: -- Verifying if validation level is FULL, which is expected for PUBLIC APIs.
339: IF (p_validation_level <> g_validation_level) THEN
340: FND_MESSAGE.SET_NAME('IBY', 'IBY_204401_VAL_LEVEL_ERROR');
341: FND_MSG_PUB.Add;
342: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
343: END IF;
344:
345: -- Initialize API return status to success
352: IF( ( l_instrument_type <> C_INSTRTYPE_CREDITCARD ) AND
353: ( l_instrument_type <> C_INSTRTYPE_PURCHASECARD ) AND
354: ( l_instrument_type <> C_INSTRTYPE_BANKACCT ) ) THEN
355: FND_MESSAGE.SET_NAME('IBY', 'IBY_20487');
356: FND_MSG_PUB.Add;
357: RAISE FND_API.G_EXC_ERROR;
358: -- Returns message 'Invalid instrument type passed'.
359: END IF;
360:
362: IF( ( p_pmtInstrRec.CreditCardInstr.Instr_Id is not NULL ) OR
363: ( p_pmtInstrRec.PurchaseCardInstr.Instr_Id is not NULL ) OR
364: ( p_pmtInstrRec.BankAcctInstr.Instr_Id is not NULL ) ) THEN
365: FND_MESSAGE.SET_NAME('IBY', 'IBY_20488');
366: FND_MSG_PUB.Add;
367: RAISE FND_API.G_EXC_ERROR;
368: --Returns message 'INSTR_ID should not be passed'
369: END IF;
370:
371: IF( l_instrument_type = C_INSTRTYPE_PURCHASECARD ) THEN
372: -- Purchase Subtype is mandatory.
373: IF( p_pmtInstrRec.PurchaseCardInstr.PC_SubType is NULL ) THEN
374: FND_MESSAGE.SET_NAME('IBY', 'IBY_20483');
375: FND_MSG_PUB.Add;
376: RAISE FND_API.G_EXC_ERROR;
377: -- Returns message 'Mandatory field(s) missing'
378: END IF;
379:
568: FND_LOG.LEVEL_UNEXPECTED,
569: G_DEBUG_MODULE || l_api_name);
570:
571: FND_MESSAGE.SET_NAME('IBY', 'IBY_204403_HTML_UNPACK_ERROR');
572: FND_MSG_PUB.Add;
573: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
574: END IF;
575:
576: --Raising Exception to handle Servlet related errors.
578: iby_debug_pub.add('Names count=0',
579: iby_debug_pub.G_LEVEL_INFO,l_dbg_mod);
580:
581: FND_MESSAGE.SET_NAME('IBY', 'IBY_204402_JSERVLET_ERROR');
582: FND_MSG_PUB.Add;
583: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
584: END IF;
585: iby_debug_pub.add('l_names count = ' ||l_names.COUNT,
586: iby_debug_pub.G_LEVEL_INFO,l_dbg_mod);
607: -- as msg tokens will not otherwise be filled
608: --
609: FND_MESSAGE.SET_NAME('IBY', 'IBY_9999');
610: FND_MESSAGE.SET_TOKEN('MESSAGE_TEXT', l_values(i));
611: FND_MSG_PUB.ADD;
612: END IF;
613:
614: END LOOP;
615:
615:
616: IF (x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
617: -- op completed successfully
618: FND_MESSAGE.SET_NAME('IBY','IBY_204170');
619: FND_MSG_PUB.ADD;
620: END IF;
621:
622: FND_MSG_PUB.Count_And_Get
623: (
618: FND_MESSAGE.SET_NAME('IBY','IBY_204170');
619: FND_MSG_PUB.ADD;
620: END IF;
621:
622: FND_MSG_PUB.Count_And_Get
623: (
624: p_count => x_msg_count,
625: p_data => x_msg_data
626: );
634:
635:
636: x_return_status := FND_API.G_RET_STS_ERROR;
637: x_msg_count := 1;
638: x_msg_data := FND_MSG_PUB.GET(
639: p_encoded => FND_API.g_false,
640: P_MSG_INDEX => FND_MSG_PUB.Count_msg
641: );
642:
636: x_return_status := FND_API.G_RET_STS_ERROR;
637: x_msg_count := 1;
638: x_msg_data := FND_MSG_PUB.GET(
639: p_encoded => FND_API.g_false,
640: P_MSG_INDEX => FND_MSG_PUB.Count_msg
641: );
642:
643: -- Catch for all the known errors
644: -- thrown from this procedure only.
645: WHEN FND_API.G_EXC_ERROR THEN
646:
647: x_return_status := FND_API.G_RET_STS_ERROR;
648: x_msg_count := 1;
649: x_msg_data := FND_MSG_PUB.GET(
650: p_encoded => FND_API.g_false,
651: P_MSG_INDEX => FND_MSG_PUB.Count_msg
652: );
653:
647: x_return_status := FND_API.G_RET_STS_ERROR;
648: x_msg_count := 1;
649: x_msg_data := FND_MSG_PUB.GET(
650: p_encoded => FND_API.g_false,
651: P_MSG_INDEX => FND_MSG_PUB.Count_msg
652: );
653:
654: -- Catch for all the known errors
655: -- thrown from the procedures that are called by this procedure.
661: --dbms_output.put_line('ERROR: ERROR_FROM_SUBPROC during call to API ');
662: --dbms_output.put_line('SQLerr is :'||substr(SQLERRM,1,150));
663: x_return_status := FND_API.G_RET_STS_ERROR;
664: iby_utility_pvt.handleException(SQLERRM,SQLCODE);
665: FND_MSG_PUB.Count_And_Get
666: ( p_count => x_msg_count,
667: p_data => x_msg_data
668: );
669:
672: iby_debug_pub.G_LEVEL_INFO,l_dbg_mod);
673: --dbms_output.put_line('ERROR: Exception occured during call to API ' );
674: --dbms_output.put_line('SQLerr is :'||substr(SQLERRM,1,150));
675: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
676: FND_MSG_PUB.Count_And_Get
677: ( p_count => x_msg_count,
678: p_data => x_msg_data
679: );
680:
740: l_api_name,
741: G_PKG_NAME )
742: THEN
743: FND_MESSAGE.SET_NAME('IBY', 'IBY_204400_API_VER_MISMATCH');
744: FND_MSG_PUB.Add;
745: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
746: END IF;
747:
748: -- Initialize message list if p_init_msg_list is set to TRUE.
746: END IF;
747:
748: -- Initialize message list if p_init_msg_list is set to TRUE.
749: IF FND_API.to_Boolean( p_init_msg_list ) THEN
750: FND_MSG_PUB.initialize;
751: END IF;
752:
753: -- Verifying if validation level is FULL, which is expected for PUBLIC APIs.
754: IF (p_validation_level <> g_validation_level) THEN
752:
753: -- Verifying if validation level is FULL, which is expected for PUBLIC APIs.
754: IF (p_validation_level <> g_validation_level) THEN
755: FND_MESSAGE.SET_NAME('IBY', 'IBY_204401_VAL_LEVEL_ERROR');
756: FND_MSG_PUB.Add;
757: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
758: END IF;
759:
760: -- Initialize API return status to success
764:
765: -- check whether the payer_id is missing.
766: IF( TRIM( p_payer_id ) is NULL ) THEN
767: FND_MESSAGE.SET_NAME('IBY', 'IBY_20486');
768: FND_MSG_PUB.Add;
769: RAISE FND_API.G_EXC_ERROR;
770: -- Returns message 'PAYER_ID is mandatory'
771: END IF;
772:
775: IF( ( l_instrument_type <> C_INSTRTYPE_CREDITCARD ) AND
776: ( l_instrument_type <> C_INSTRTYPE_PURCHASECARD ) AND
777: ( l_instrument_type <> C_INSTRTYPE_BANKACCT ) ) THEN
778: FND_MESSAGE.SET_NAME('IBY', 'IBY_20487');
779: FND_MSG_PUB.Add;
780: RAISE FND_API.G_EXC_ERROR;
781: -- Returns message 'Invalid instrument type passed'.
782: END IF;
783:
787: -- Card number should NOT be passed as it is an existing instrument.
788: IF( (p_pmtInstrRec.CreditCardInstr.CC_Num is not NULL) OR
789: (p_pmtInstrRec.CreditCardInstr.CC_Type is not NULL) ) THEN
790: FND_MESSAGE.SET_NAME('IBY', 'IBY_20489');
791: FND_MSG_PUB.Add;
792: RAISE FND_API.G_EXC_ERROR;
793: -- Returns message 'Neither Card number nor Card Type should be passed'
794: END IF;
795:
799: -- Card number should NOT be passed as it is an existing instrument.
800: IF( (p_pmtInstrRec.PurchaseCardInstr.PC_Num is not NULL) OR
801: (p_pmtInstrRec.PurchaseCardInstr.PC_Type is not NULL) ) THEN
802: FND_MESSAGE.SET_NAME('IBY', 'IBY_20489');
803: FND_MSG_PUB.Add;
804: RAISE FND_API.G_EXC_ERROR;
805: -- Returns message 'Neither Card number nor Card Type should be passed'
806: END IF;
807:
807:
808: -- Subtype is mandatory.
809: IF( p_pmtInstrRec.PurchaseCardInstr.PC_SubType is NULL ) THEN
810: FND_MESSAGE.SET_NAME('IBY', 'IBY_20483');
811: FND_MSG_PUB.Add;
812: RAISE FND_API.G_EXC_ERROR;
813: -- Returns message 'Mandatory field(s) missing'
814: END IF;
815:
819: -- Bank Id and BankAcct_Num should NOT be passed as it is an existing instrument.
820: IF( ( p_pmtInstrRec.BankAcctInstr.Bank_Id is not NULL ) OR
821: ( p_pmtInstrRec.BankAcctInstr.BankAcct_Num is not NULL ) ) THEN
822: FND_MESSAGE.SET_NAME('IBY', 'IBY_20490');
823: FND_MSG_PUB.Add;
824: RAISE FND_API.G_EXC_ERROR;
825: -- Returns message 'Neither Bank Id nor Bank Account Number should be passed'
826: END IF;
827:
964: x_msg_count := 1;
965:
966: -- Returns message 'operation completed successfully.'
967: FND_MESSAGE.SET_NAME('IBY', 'IBY_204170' );
968: FND_MSG_PUB.Add;
969: x_msg_data := FND_MSG_PUB.GET(
970: p_encoded => FND_API.g_false,
971: P_MSG_INDEX => FND_MSG_PUB.Count_msg
972: );
965:
966: -- Returns message 'operation completed successfully.'
967: FND_MESSAGE.SET_NAME('IBY', 'IBY_204170' );
968: FND_MSG_PUB.Add;
969: x_msg_data := FND_MSG_PUB.GET(
970: p_encoded => FND_API.g_false,
971: P_MSG_INDEX => FND_MSG_PUB.Count_msg
972: );
973:
967: FND_MESSAGE.SET_NAME('IBY', 'IBY_204170' );
968: FND_MSG_PUB.Add;
969: x_msg_data := FND_MSG_PUB.GET(
970: p_encoded => FND_API.g_false,
971: P_MSG_INDEX => FND_MSG_PUB.Count_msg
972: );
973:
974: EXCEPTION
975:
978: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
979:
980: x_return_status := FND_API.G_RET_STS_ERROR;
981: x_msg_count := 1;
982: x_msg_data := FND_MSG_PUB.GET(
983: p_encoded => FND_API.g_false,
984: P_MSG_INDEX => FND_MSG_PUB.Count_msg
985: );
986:
980: x_return_status := FND_API.G_RET_STS_ERROR;
981: x_msg_count := 1;
982: x_msg_data := FND_MSG_PUB.GET(
983: p_encoded => FND_API.g_false,
984: P_MSG_INDEX => FND_MSG_PUB.Count_msg
985: );
986:
987: -- Catch for all the known errors
988: -- thrown from this procedure only.
989: WHEN FND_API.G_EXC_ERROR THEN
990:
991: x_return_status := FND_API.G_RET_STS_ERROR;
992: x_msg_count := 1;
993: x_msg_data := FND_MSG_PUB.GET(
994: p_encoded => FND_API.g_false,
995: P_MSG_INDEX => FND_MSG_PUB.Count_msg
996: );
997:
991: x_return_status := FND_API.G_RET_STS_ERROR;
992: x_msg_count := 1;
993: x_msg_data := FND_MSG_PUB.GET(
994: p_encoded => FND_API.g_false,
995: P_MSG_INDEX => FND_MSG_PUB.Count_msg
996: );
997:
998: -- Catch for all the known errors
999: -- thrown from the procedures that are called by this procedure.
1002: WHEN ERROR_FROM_SUBPROC THEN
1003:
1004: x_return_status := FND_API.G_RET_STS_ERROR;
1005: iby_utility_pvt.handleException(SQLERRM,SQLCODE);
1006: FND_MSG_PUB.Count_And_Get
1007: ( p_count => x_msg_count,
1008: p_data => x_msg_data
1009: );
1010:
1010:
1011: WHEN OTHERS THEN
1012:
1013: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1014: FND_MSG_PUB.Count_And_Get
1015: ( p_count => x_msg_count,
1016: p_data => x_msg_data
1017: );
1018:
1075: l_api_name,
1076: G_PKG_NAME )
1077: THEN
1078: FND_MESSAGE.SET_NAME('IBY', 'IBY_204400_API_VER_MISMATCH');
1079: FND_MSG_PUB.Add;
1080: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1081: END IF;
1082:
1083: -- Initialize message list if p_init_msg_list is set to TRUE.
1081: END IF;
1082:
1083: -- Initialize message list if p_init_msg_list is set to TRUE.
1084: IF FND_API.to_Boolean( p_init_msg_list ) THEN
1085: FND_MSG_PUB.initialize;
1086: END IF;
1087:
1088: -- Verifying if validation level is FULL, which is expected for PUBLIC APIs.
1089: IF (p_validation_level <> g_validation_level) THEN
1087:
1088: -- Verifying if validation level is FULL, which is expected for PUBLIC APIs.
1089: IF (p_validation_level <> g_validation_level) THEN
1090: FND_MESSAGE.SET_NAME('IBY', 'IBY_204401_VAL_LEVEL_ERROR');
1091: FND_MSG_PUB.Add;
1092: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1093: END IF;
1094:
1095: -- Initialize API return status to success
1099:
1100: -- check whether the payer_id is missing.
1101: IF( TRIM( p_payer_id ) is NULL ) THEN
1102: FND_MESSAGE.SET_NAME('IBY', 'IBY_20486');
1103: FND_MSG_PUB.Add;
1104: RAISE FND_API.G_EXC_ERROR;
1105: -- Returns message 'PAYER_ID is mandatory'
1106: END IF;
1107:
1107:
1108: -- check whether the instr_id is missing.
1109: IF( p_instr_id is NULL ) THEN
1110: FND_MESSAGE.SET_NAME('IBY', 'IBY_20483');
1111: FND_MSG_PUB.Add;
1112: RAISE FND_API.G_EXC_ERROR;
1113: -- Returns message 'Mandatory field(s) missing'
1114: END IF;
1115:
1125: x_msg_count := 1;
1126:
1127: -- Returns message 'operation completed successfully.'
1128: FND_MESSAGE.SET_NAME('IBY', 'IBY_204170' );
1129: FND_MSG_PUB.Add;
1130: x_msg_data := FND_MSG_PUB.GET(
1131: p_encoded => FND_API.g_false,
1132: P_MSG_INDEX => FND_MSG_PUB.Count_msg
1133: );
1126:
1127: -- Returns message 'operation completed successfully.'
1128: FND_MESSAGE.SET_NAME('IBY', 'IBY_204170' );
1129: FND_MSG_PUB.Add;
1130: x_msg_data := FND_MSG_PUB.GET(
1131: p_encoded => FND_API.g_false,
1132: P_MSG_INDEX => FND_MSG_PUB.Count_msg
1133: );
1134:
1128: FND_MESSAGE.SET_NAME('IBY', 'IBY_204170' );
1129: FND_MSG_PUB.Add;
1130: x_msg_data := FND_MSG_PUB.GET(
1131: p_encoded => FND_API.g_false,
1132: P_MSG_INDEX => FND_MSG_PUB.Count_msg
1133: );
1134:
1135: EXCEPTION
1136:
1139: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1140:
1141: x_return_status := FND_API.G_RET_STS_ERROR;
1142: x_msg_count := 1;
1143: x_msg_data := FND_MSG_PUB.GET(
1144: p_encoded => FND_API.g_false,
1145: P_MSG_INDEX => FND_MSG_PUB.Count_msg
1146: );
1147:
1141: x_return_status := FND_API.G_RET_STS_ERROR;
1142: x_msg_count := 1;
1143: x_msg_data := FND_MSG_PUB.GET(
1144: p_encoded => FND_API.g_false,
1145: P_MSG_INDEX => FND_MSG_PUB.Count_msg
1146: );
1147:
1148: -- Catch for all the known errors
1149: -- thrown from this procedure only.
1150: WHEN FND_API.G_EXC_ERROR THEN
1151:
1152: x_return_status := FND_API.G_RET_STS_ERROR;
1153: x_msg_count := 1;
1154: x_msg_data := FND_MSG_PUB.GET(
1155: p_encoded => FND_API.g_false,
1156: P_MSG_INDEX => FND_MSG_PUB.Count_msg
1157: );
1158:
1152: x_return_status := FND_API.G_RET_STS_ERROR;
1153: x_msg_count := 1;
1154: x_msg_data := FND_MSG_PUB.GET(
1155: p_encoded => FND_API.g_false,
1156: P_MSG_INDEX => FND_MSG_PUB.Count_msg
1157: );
1158:
1159: -- Catch for all the known errors
1160: -- thrown from the procedures that are called by this procedure.
1163: WHEN ERROR_FROM_SUBPROC THEN
1164:
1165: x_return_status := FND_API.G_RET_STS_ERROR;
1166: iby_utility_pvt.handleException(SQLERRM,SQLCODE);
1167: FND_MSG_PUB.Count_And_Get
1168: ( p_count => x_msg_count,
1169: p_data => x_msg_data
1170: );
1171:
1171:
1172: WHEN OTHERS THEN
1173:
1174: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1175: FND_MSG_PUB.Count_And_Get
1176: ( p_count => x_msg_count,
1177: p_data => x_msg_data
1178: );
1179:
1255: l_api_name,
1256: G_PKG_NAME )
1257: THEN
1258: FND_MESSAGE.SET_NAME('IBY', 'IBY_204400_API_VER_MISMATCH');
1259: FND_MSG_PUB.Add;
1260: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1261: END IF;
1262:
1263: -- Initialize message list if p_init_msg_list is set to TRUE.
1261: END IF;
1262:
1263: -- Initialize message list if p_init_msg_list is set to TRUE.
1264: IF FND_API.to_Boolean( p_init_msg_list ) THEN
1265: FND_MSG_PUB.initialize;
1266: END IF;
1267:
1268: -- Verifying if validation level is FULL, which is expected for PUBLIC APIs.
1269: IF (p_validation_level <> g_validation_level) THEN
1267:
1268: -- Verifying if validation level is FULL, which is expected for PUBLIC APIs.
1269: IF (p_validation_level <> g_validation_level) THEN
1270: FND_MESSAGE.SET_NAME('IBY', 'IBY_204401_VAL_LEVEL_ERROR');
1271: FND_MSG_PUB.Add;
1272: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1273: END IF;
1274:
1275: -- Initialize API return status to success
1279:
1280: -- check whether the payer_id is missing.
1281: IF( TRIM( p_payer_id ) is NULL ) THEN
1282: FND_MESSAGE.SET_NAME('IBY', 'IBY_20486');
1283: FND_MSG_PUB.Add;
1284: RAISE FND_API.G_EXC_ERROR;
1285: -- Returns message 'PAYER_ID is mandatory'
1286: END IF;
1287:
1294:
1295: -- If nothing is found throw an error.
1296: IF( l_count = 0 ) THEN
1297: FND_MESSAGE.SET_NAME('IBY', 'IBY_20491');
1298: FND_MSG_PUB.Add;
1299: RAISE FND_API.G_EXC_ERROR;
1300: -- Returns message 'PAYER_ID does not exist'
1301: END IF;
1302:
1323: -- Returns message 'operation completed successfully.'
1324: FND_MESSAGE.SET_NAME('IBY', 'IBY_204170' );
1325: END IF;
1326:
1327: FND_MSG_PUB.Add;
1328: x_msg_data := FND_MSG_PUB.GET(
1329: p_encoded => FND_API.g_false,
1330: P_MSG_INDEX => FND_MSG_PUB.Count_msg
1331: );
1324: FND_MESSAGE.SET_NAME('IBY', 'IBY_204170' );
1325: END IF;
1326:
1327: FND_MSG_PUB.Add;
1328: x_msg_data := FND_MSG_PUB.GET(
1329: p_encoded => FND_API.g_false,
1330: P_MSG_INDEX => FND_MSG_PUB.Count_msg
1331: );
1332:
1326:
1327: FND_MSG_PUB.Add;
1328: x_msg_data := FND_MSG_PUB.GET(
1329: p_encoded => FND_API.g_false,
1330: P_MSG_INDEX => FND_MSG_PUB.Count_msg
1331: );
1332:
1333: EXCEPTION
1334:
1337: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1338:
1339: x_return_status := FND_API.G_RET_STS_ERROR;
1340: x_msg_count := 1;
1341: x_msg_data := FND_MSG_PUB.GET(
1342: p_encoded => FND_API.g_false,
1343: P_MSG_INDEX => FND_MSG_PUB.Count_msg
1344: );
1345:
1339: x_return_status := FND_API.G_RET_STS_ERROR;
1340: x_msg_count := 1;
1341: x_msg_data := FND_MSG_PUB.GET(
1342: p_encoded => FND_API.g_false,
1343: P_MSG_INDEX => FND_MSG_PUB.Count_msg
1344: );
1345:
1346: -- Catch for all the known errors
1347: -- thrown from this procedure only.
1348: WHEN FND_API.G_EXC_ERROR THEN
1349:
1350: x_return_status := FND_API.G_RET_STS_ERROR;
1351: x_msg_count := 1;
1352: x_msg_data := FND_MSG_PUB.GET(
1353: p_encoded => FND_API.g_false,
1354: P_MSG_INDEX => FND_MSG_PUB.Count_msg
1355: );
1356:
1350: x_return_status := FND_API.G_RET_STS_ERROR;
1351: x_msg_count := 1;
1352: x_msg_data := FND_MSG_PUB.GET(
1353: p_encoded => FND_API.g_false,
1354: P_MSG_INDEX => FND_MSG_PUB.Count_msg
1355: );
1356:
1357: WHEN OTHERS THEN
1358:
1357: WHEN OTHERS THEN
1358:
1359: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1360: iby_utility_pvt.handleException(SQLERRM,SQLCODE);
1361: FND_MSG_PUB.Count_And_Get
1362: ( p_count => x_msg_count,
1363: p_data => x_msg_data
1364: );
1365:
1440: l_api_name,
1441: G_PKG_NAME )
1442: THEN
1443: FND_MESSAGE.SET_NAME('IBY', 'IBY_204400_API_VER_MISMATCH');
1444: FND_MSG_PUB.Add;
1445: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1446: END IF;
1447:
1448: -- Initialize message list if p_init_msg_list is set to TRUE.
1446: END IF;
1447:
1448: -- Initialize message list if p_init_msg_list is set to TRUE.
1449: IF FND_API.to_Boolean( p_init_msg_list ) THEN
1450: FND_MSG_PUB.initialize;
1451: END IF;
1452:
1453: -- Verifying if validation level is FULL, which is expected for PUBLIC APIs.
1454: IF (p_validation_level <> g_validation_level) THEN
1452:
1453: -- Verifying if validation level is FULL, which is expected for PUBLIC APIs.
1454: IF (p_validation_level <> g_validation_level) THEN
1455: FND_MESSAGE.SET_NAME('IBY', 'IBY_204401_VAL_LEVEL_ERROR');
1456: FND_MSG_PUB.Add;
1457: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1458: END IF;
1459:
1460: -- Initialize API return status to success
1467:
1468: -- check whether the payer_id is missing.
1469: IF( TRIM( p_payer_id ) is NULL ) THEN
1470: FND_MESSAGE.SET_NAME('IBY', 'IBY_20486');
1471: FND_MSG_PUB.Add;
1472: RAISE FND_API.G_EXC_ERROR;
1473: -- Returns message 'PAYER_ID is mandatory'
1474: END IF;
1475:
1475:
1476: -- check whether the instr_id is missing.
1477: IF( p_instr_id is NULL ) THEN
1478: FND_MESSAGE.SET_NAME('IBY', 'IBY_20483');
1479: FND_MSG_PUB.Add;
1480: RAISE FND_API.G_EXC_ERROR;
1481: -- Returns message 'Mandatory field(s) missing'
1482: END IF;
1483:
1490:
1491: -- Throw an exception when payer not found.
1492: IF( l_count = 0 ) THEN
1493: FND_MESSAGE.SET_NAME('IBY', 'IBY_20491');
1494: FND_MSG_PUB.Add;
1495: RAISE FND_API.G_EXC_ERROR;
1496: -- Returns message 'PAYER_ID does not exist'
1497: END IF;
1498:
1505:
1506: -- Throw an exception.
1507: IF( l_count = 0 ) THEN
1508: FND_MESSAGE.SET_NAME('IBY', 'IBY_20492');
1509: FND_MSG_PUB.Add;
1510: RAISE FND_API.G_EXC_ERROR;
1511: -- Returns message 'Instrument does not exist'
1512: END IF;
1513:
1521:
1522: -- Throw an exception when nothing is found.
1523: IF( l_count = 0 ) THEN
1524: FND_MESSAGE.SET_NAME('IBY', 'IBY_20511');
1525: FND_MSG_PUB.Add;
1526: RAISE FND_API.G_EXC_ERROR;
1527: -- Returns message 'User does not hold instr'
1528: END IF;
1529:
1552: x_msg_count := 1;
1553:
1554: -- Returns message 'operation completed successfully.'
1555: FND_MESSAGE.SET_NAME('IBY', 'IBY_204170' );
1556: FND_MSG_PUB.Add;
1557: x_msg_data := FND_MSG_PUB.GET(
1558: p_encoded => FND_API.g_false,
1559: P_MSG_INDEX => FND_MSG_PUB.Count_msg
1560: );
1553:
1554: -- Returns message 'operation completed successfully.'
1555: FND_MESSAGE.SET_NAME('IBY', 'IBY_204170' );
1556: FND_MSG_PUB.Add;
1557: x_msg_data := FND_MSG_PUB.GET(
1558: p_encoded => FND_API.g_false,
1559: P_MSG_INDEX => FND_MSG_PUB.Count_msg
1560: );
1561:
1555: FND_MESSAGE.SET_NAME('IBY', 'IBY_204170' );
1556: FND_MSG_PUB.Add;
1557: x_msg_data := FND_MSG_PUB.GET(
1558: p_encoded => FND_API.g_false,
1559: P_MSG_INDEX => FND_MSG_PUB.Count_msg
1560: );
1561:
1562: EXCEPTION
1563:
1566: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1567:
1568: x_return_status := FND_API.G_RET_STS_ERROR;
1569: x_msg_count := 1;
1570: x_msg_data := FND_MSG_PUB.GET(
1571: p_encoded => FND_API.g_false,
1572: P_MSG_INDEX => FND_MSG_PUB.Count_msg
1573: );
1574:
1568: x_return_status := FND_API.G_RET_STS_ERROR;
1569: x_msg_count := 1;
1570: x_msg_data := FND_MSG_PUB.GET(
1571: p_encoded => FND_API.g_false,
1572: P_MSG_INDEX => FND_MSG_PUB.Count_msg
1573: );
1574:
1575: -- Catch for all the known errors
1576: -- thrown from this procedure only.
1577: WHEN FND_API.G_EXC_ERROR THEN
1578:
1579: x_return_status := FND_API.G_RET_STS_ERROR;
1580: x_msg_count := 1;
1581: x_msg_data := FND_MSG_PUB.GET(
1582: p_encoded => FND_API.g_false,
1583: P_MSG_INDEX => FND_MSG_PUB.Count_msg
1584: );
1585:
1579: x_return_status := FND_API.G_RET_STS_ERROR;
1580: x_msg_count := 1;
1581: x_msg_data := FND_MSG_PUB.GET(
1582: p_encoded => FND_API.g_false,
1583: P_MSG_INDEX => FND_MSG_PUB.Count_msg
1584: );
1585:
1586: WHEN OTHERS THEN
1587:
1586: WHEN OTHERS THEN
1587:
1588: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1589: iby_utility_pvt.handleException(SQLERRM,SQLCODE);
1590: FND_MSG_PUB.Count_And_Get
1591: ( p_count => x_msg_count,
1592: p_data => x_msg_data
1593: );
1594:
1718: iby_debug_pub.add(debug_msg => 'Unpack status error; HTML resp. invalid!',
1719: debug_level => FND_LOG.LEVEL_UNEXPECTED,
1720: module => G_DEBUG_MODULE || '.SecureCardInfo');
1721: FND_MESSAGE.SET_NAME('IBY', 'IBY_204403_HTML_UNPACK_ERROR');
1722: FND_MSG_PUB.Add;
1723: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1724: END IF;
1725:
1726: --Raising Exception to handle Servlet related errors.
1729: iby_debug_pub.add(debug_msg => 'HTML response names count=0',
1730: debug_level => FND_LOG.LEVEL_UNEXPECTED,
1731: module => G_DEBUG_MODULE || '.SecureCardInfo');
1732: FND_MESSAGE.SET_NAME('IBY', 'IBY_204402_JSERVLET_ERROR');
1733: FND_MSG_PUB.Add;
1734: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1735: END IF;
1736:
1737: /* Retrieve name-value pairs stored in l_names and l_values, and assign
1793: END IF;
1794: */
1795:
1796: -- Standard call to get message count and if count is 1, get message info.
1797: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
1798: p_data => x_msg_data
1799: );
1800:
1801: iby_debug_pub.add(debug_msg => 'x_return_status=' || x_return_status,
1818: debug_level => FND_LOG.LEVEL_ERROR,
1819: module => G_DEBUG_MODULE || '.SecureCardInfo');
1820: --ROLLBACK TO OraPmtReq_PUB;
1821: x_return_status := FND_API.G_RET_STS_ERROR ;
1822: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
1823: p_data => x_msg_data
1824: );
1825: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1826:
1828: debug_level => FND_LOG.LEVEL_UNEXPECTED,
1829: module => G_DEBUG_MODULE || '.SecureCardInfo');
1830: --ROLLBACK TO OraPmtReq_PUB;
1831: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1832: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
1833: p_data => x_msg_data
1834: );
1835: WHEN OTHERS THEN
1836:
1837: iby_debug_pub.add(debug_msg => 'In OTHERS Exception',
1838: debug_level => FND_LOG.LEVEL_UNEXPECTED,
1839: module => G_DEBUG_MODULE || '.SecureCardInfo');
1840: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1841: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
1842: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME, l_api_name);
1843: END IF;
1844:
1845: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
1838: debug_level => FND_LOG.LEVEL_UNEXPECTED,
1839: module => G_DEBUG_MODULE || '.SecureCardInfo');
1840: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1841: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
1842: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME, l_api_name);
1843: END IF;
1844:
1845: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
1846: p_data => x_msg_data
1841: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
1842: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME, l_api_name);
1843: END IF;
1844:
1845: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
1846: p_data => x_msg_data
1847: );
1848:
1849: iby_debug_pub.add(debug_msg => 'x_return_status=' || x_return_status,
1954: iby_debug_pub.add(debug_msg => 'Unpack status error; HTML resp. invalid!',
1955: debug_level => FND_LOG.LEVEL_UNEXPECTED,
1956: module => G_DEBUG_MODULE || '.Get_Expiration_Status');
1957: FND_MESSAGE.SET_NAME('IBY', 'IBY_204403_HTML_UNPACK_ERROR');
1958: FND_MSG_PUB.Add;
1959: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1960: END IF;
1961:
1962: --Raising Exception to handle Servlet related errors.
1965: iby_debug_pub.add(debug_msg => 'HTML response names count=0',
1966: debug_level => FND_LOG.LEVEL_UNEXPECTED,
1967: module => G_DEBUG_MODULE || '.Get_Expiration_Status');
1968: FND_MESSAGE.SET_NAME('IBY', 'IBY_204402_JSERVLET_ERROR');
1969: FND_MSG_PUB.Add;
1970: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1971: END IF;
1972:
1973: /* Retrieve name-value pairs stored in l_names and l_values, and assign
2020: END IF;
2021: */
2022:
2023: -- Standard call to get message count and if count is 1, get message info.
2024: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
2025: p_data => x_msg_data
2026: );
2027:
2028: iby_debug_pub.add(debug_msg => 'x_return_status=' || x_return_status,
2045: debug_level => FND_LOG.LEVEL_ERROR,
2046: module => G_DEBUG_MODULE || '.Get_Expiration_Status');
2047: --ROLLBACK TO OraPmtReq_PUB;
2048: x_return_status := FND_API.G_RET_STS_ERROR ;
2049: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
2050: p_data => x_msg_data
2051: );
2052: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2053:
2055: debug_level => FND_LOG.LEVEL_UNEXPECTED,
2056: module => G_DEBUG_MODULE || '.Get_Expiration_Status');
2057: --ROLLBACK TO OraPmtReq_PUB;
2058: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2059: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
2060: p_data => x_msg_data
2061: );
2062: WHEN OTHERS THEN
2063:
2064: iby_debug_pub.add(debug_msg => 'In OTHERS Exception',
2065: debug_level => FND_LOG.LEVEL_UNEXPECTED,
2066: module => G_DEBUG_MODULE || '.Get_Expiration_Status');
2067: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2068: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
2069: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME, l_api_name);
2070: END IF;
2071:
2072: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
2065: debug_level => FND_LOG.LEVEL_UNEXPECTED,
2066: module => G_DEBUG_MODULE || '.Get_Expiration_Status');
2067: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2068: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
2069: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME, l_api_name);
2070: END IF;
2071:
2072: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
2073: p_data => x_msg_data
2068: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
2069: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME, l_api_name);
2070: END IF;
2071:
2072: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
2073: p_data => x_msg_data
2074: );
2075:
2076: iby_debug_pub.add(debug_msg => 'x_return_status=' || x_return_status,