Project

General

Profile

Actions

기능(Feature) #484

closed

기능(Feature) #287: Hana Coupon

[Coupon] Implement backend API to validate coupon

Added by Dan Hoang 9 months ago. Updated 9 months ago.

Status:
완료성공(Resolve)
Priority:
높음(High)
Assignee:
Target version:
-
Start date:
06/03/2025
Due date:
06/11/2025
% Done:

100%

Estimated time:
Part:
Build env.:
Prod

Description

Validate coupon and return coupon information
Consider applying cache to avoid multiple users using the same coupon at the same time

[Tech note]
- Create new api to validate and return coupon info
- Valid Coupon:
+ Check expired time
+ Min booking's amount
+ 1 time/day (except booking cancel)
[API info]
- Endpoint: /booking/hotel/hana/get-coupon
- Request:

{
    "condition": {
        "couponItemCode": "HANA_COUPON_ABCDEF",
        "affiliateUserNo": "1bb0df1854a1802687c5cbf2752dda7e-45asdasd",
        "bookingAmount": 2122144
    },
    "stationTypeCode": "STN01",
    "currency": "KRW",
    "country": "KR",
    "language": "KO" 
}

- Response:
{
    "result": {
        "couponAmount": null,
        "isValid": false,
        "invalidCode": "COUPON_I01" 
    },
    "serviceCode": "/booking/hotel/hana/get-coupon",
    "transactionSetId": "BC2B57D9894C460C830F8E9677FEC599",
    "succeedYn": true,
    "serviceName": "/booking/hotel/hana/get-coupon" 
}

- CUrl:
curl --location 'http://localhost:8080/booking/hotel/hana/get-coupon' \
--header 'accept: application/json, text/plain, */*' \
--header 'accept-language: en-US,en;q=0.9,vi;q=0.8' \
--header 'cache-control: no-cache' \
--header 'content-type: application/json' \
--header 'origin: https://www.ohmytrip.com' \
--header 'pragma: no-cache' \
--header 'priority: u=1, i' \
--header 'referer: https://www.ohmytrip.com/' \
--header 'sec-ch-ua: "Chromium";v="136", "Google Chrome";v="136", "Not.A/Brand";v="99"' \
--header 'sec-ch-ua-mobile: ?0' \
--header 'sec-ch-ua-platform: "Windows"' \
--header 'sec-fetch-dest: empty' \
--header 'sec-fetch-mode: cors' \
--header 'sec-fetch-site: same-site' \
--header 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36' \
--data '{
    "condition": {
        "couponItemCode": "HANA_COUPON_ABCDEF",
        "affiliateUserNo": "1bb0df1854a1802687c5cbf2752dda7e-45asdasd",
        "bookingAmount": 2122144
    },
    "stationTypeCode": "STN01",
    "currency": "KRW",
    "country": "KR",
    "language": "KO" 
}'


Related issues

Related to Hana card travel bucket - QA #549: Create manual test cases for API to validate coupon완료성공(Resolve)06/09/202506/09/2025

Actions
Actions #1

Updated by Joseph Vo 9 months ago

  • Assignee set to Dante Le
Actions #2

Updated by Joseph Vo 9 months ago

  • Priority changed from 보통(Normal) to 높음(High)
Actions #3

Updated by Dan Hoang 9 months ago

  • Subject changed from Implement backend API to validate coupon to [Coupon] Implement backend API to validate coupon
Actions #4

Updated by Dante Le 9 months ago

  • Description updated (diff)
  • Status changed from 신규(New) to 진행(Doing)
  • Start date set to 06/03/2025
Actions #5

Updated by Dante Le 9 months ago

[New API service]

INSERT INTO OMH_SUITE.BS_API_SERVICE_CODE (API_SERVICE_URL, METHOD_NAME, OWNER_COMP_CODE, API_SERVICE_NAME_EN,
                                           API_SERVICE_NAME_KO, SCHEMA_FILE_NAME_RQ, SCHEMA_FILE_NAME_RS,
                                           VENDOR_SERVICE_NAME, API_SERVICE_DESC, SAMPLE_REQUEST_MESSAGE,
                                           SAMPLE_RESPONSE_MESSAGE, OPEN_API_YN, OUTSIDE_INTERFACE_YN, LOG_SAVE_YN,
                                           IGNORE_SCHEMA_YN, CONTROL_REMARK, USE_YN, FIRST_INSERT_UNO,
                                           FIRST_INSERT_DATETIME, LAST_UPDATE_UNO, LAST_UPDATE_DATETIME)
VALUES ('/booking/hotel/hana/get-coupon', 'POST', 110000, 'get hana coupon', 'get hana coupon',
        '/booking/hotel/hana/get_coupon/get_coupon_schema_rq.json',
        '/booking/hotel/hana/get_coupon/get_coupon_schema_rs.json', '', '', '', '', 'N', 'N', 'N', 'N', '', 'Y', 10000,
        DEFAULT, 10000, DEFAULT)

Actions #6

Updated by ziniy Kang 9 months ago

  • Parent task set to #287
Actions #7

Updated by Dante Le 9 months ago

  • Status changed from 진행(Doing) to 완료(Done)
Actions #8

Updated by Dante Le 9 months ago

  • % Done changed from 0 to 100
  • Build env. set to Dev
Actions #9

Updated by Dante Le 9 months ago

  • Description updated (diff)
Actions #10

Updated by Dante Le 9 months ago

  • Description updated (diff)
Actions #11

Updated by Anonymous 9 months ago

  • Related to QA #549: Create manual test cases for API to validate coupon added
Actions #12

Updated by ziniy Kang 9 months ago

  • Due date set to 06/11/2025
Actions #13

Updated by Dante Le 9 months ago

  • Build env. changed from Dev to Staging
Actions #14

Updated by Dante Le 9 months ago

  • Build env. changed from Staging to Prod
Actions #15

Updated by ziniy Kang 9 months ago

  • Status changed from 완료(Done) to 완료성공(Resolve)
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 50 MB)