개선(improvement) #2645
closedVCC cancel while new VCC setting under different Bank issue.
100%
Description
Case: K25120711507H01
Old setting is VCC under Hana card. VCC issued under prepaid Hana.
New setting is VCC under Citi card. VCC issued under Citi card.
Account team cancelled old VCC which is belong Hana Card while the new setting has been setup.
Causing unable to cancel VCC due to different issue bank.
==> Please check and improve this case by allowing cancel old vcc eventhough the new setting (different bank issue) is active.
Files
Related issues
Updated by Tracy Tran 3 months ago
- Related to VOC support #2637: [Error] VCC status added
Updated by Tom Dong 3 months ago
Branch created: `develop-vn/tom/improvement-2645-vcc-cancel-while-new-vcc-setting-under-different-bank-issue`
Repository: oh-api
Workspace: ohmyhotel
Bitbucket URL: https://bitbucket.org/ohmyhotel/oh-api/branch/develop-vn/tom/improvement-2645-vcc-cancel-while-new-vcc-setting-under-different-bank-issue
Updated by Tom Dong 3 months ago
- Implementation Summary
Commit: `b760fb8236` - implement 2645 cancel vcc diff bank
- Problem
When VCC was created under Bank A (Hana) but booking setting was later changed to Bank B (Citi), account team could not cancel the old VCC because the system was using Bank B's configuration instead of Bank A's.
- Solution
Modified the VCC cancel flow to use the original VCC_TYPE_CODE from the payment record (when the VCC was created), not the current booking's VCC type setting.
- Files Changed (4 files, +287 lines)
1. VCCMapper.java (+5 lines)
- Added 4 new query method declarations:
- `getTemplateItemPaymentSeq()` - Get booking item with VCC type from payment record
- `getVendorPaymentConditionVccType()` - Get vendor payment condition by specific VCC type
- `getVendorPaymentVCCByVccType()` - Get VCC configuration ignoring date conditions (for historical VCC)
- `getCountryInfoByVccTypeCode()` - Get country info for specific VCC type
2. VCCService.java (+189 lines)
- Added `getVendorPaymentForCancel(bookingItemCode, paymentSeq)`:
- Retrieves VCC_TYPE_CODE from PM_PAYMENT_INFO (original VCC type when issued)
- Uses that VCC type to get correct bank configuration for cancel
- Handles fallback if payment VCC type is blank
- Added `diffVccTypeCodeYn()` helper method
3. PaymentVccService.java (+6/-2 lines)
- Modified to call `vccService.getVendorPaymentForCancel()` when paymentSeq is provided
- Falls back to original `getVendorPaymentCondition()` for other operations
4. VCCMapper.xml (+87 lines)
- Added 4 new SQL queries:
- `getTemplateItemPaymentSeq` - JOIN BK_BOOKING_HOTEL_ITEM with PM_PAYMENT_INFO to get VCC type from payment
- `getVendorPaymentConditionVccType` - Query with specific VCC type, ignores date condition for cancel
- `getVendorPaymentVCCByVccType` - Get VCC config by type without date restrictions
- `getCountryInfoByVccTypeCode` - Get country info from BS_DETAIL_CODE by VCC type
- Key Logic
```
Old flow: Cancel VCC → Use current booking's VCC_TYPE_CODE → Fail if different bank
New flow: Cancel VCC → Get VCC_TYPE_CODE from PM_PAYMENT_INFO → Use original bank config → Success
```
---
Branch: `develop-vn/tom/improvement-2645-vcc-cancel-while-new-vcc-setting-under-different-bank-issue`
Updated by Tracy Tran 3 months ago
- File Screenshot 2025-12-22 175053.png Screenshot 2025-12-22 175053.png added
- File Screenshot 2025-12-22 175333.png Screenshot 2025-12-22 175333.png added
- Status changed from QA test to 피드백(Feedback)
- Assignee changed from Tracy Tran to Tom Dong
Checked on staging, cancelled VCC under diferent bank or curent setting ==> ok
Checked in Payment In/Out field, there is an error message display. Please check if this VCC has been cancelled ok or not.
Updated by Tracy Tran 3 months ago
- Status changed from QA test to 완료(Done)
- Assignee changed from Tracy Tran to Tom Dong
If there is no prblem, please update this case on PROD as done testing on staging.
Updated by ziniy Kang 2 months ago
- Status changed from 완료(Done) to 확인(Confirmed)
Updated by ziniy Kang 2 months ago
- Status changed from 확인(Confirmed) to QA test
- Assignee changed from Tom Dong to Tracy Truong
- Build env. changed from Staging to Prod
Updated by Tracy Tran about 2 months ago
- File Screenshot 2026-01-10 171436.png Screenshot 2026-01-10 171436.png added
- Status changed from QA test to 완료성공(Resolve)
- Assignee changed from Tracy Truong to Tom Dong
Tested on PROD
Booking K25120411677H01
And booking K25121511238H01
