預訂測試要求

為了協助您測試整合可能處理的購物錯誤狀態,我們為「Rapid 預訂 API」的所有方法都提供了測試要求。

若要傳送 Rapid 預訂 API 方法的測試要求,請在您的預訂要求中加入名為測試的額外 HTTP 標頭,並使用下表提供的適用值。

在嘗試任何測試前,請先詳閱測試備註的所有內容,測試標頭值及其回應清單列於下方。

重要測試預訂備註

測試標頭傳送失敗或該標頭無效,系統將即時處理預訂。

  • 請務必查看傳回的取消規定,確保不會產生任何罰款。
  • 若取消暫停的測試預訂 (hold = true) 但未確認,會導致預訂系統重覆使用初始回應傳回的行程 ID,這是因為原始行程從未完成所導致。針對此測試案例,請留意可能的錯誤重覆情形。
  • 預訂支援服務專員平台上不會顯示測試預訂。若有測試預訂相關問題,請聯絡您的 Rapid 客服專員或合作夥伴支援。
  • 請注意,在測試環境中,有些測試回應會變成虛設常式。因此,回應不會總是與回應的預期內容相符。
  • 在正式啟用前的測試期間,請將欲查詢的問題傳送到 **test.ean.com** 。此端點不會進行即時預訂,而是在測試環境中建立模擬預訂。正式啟用後仍可用此方式測試登入資訊。
  • 測試標頭會使得一個固定的「罐頭簡訊」被當成輸出資料回傳。因此傳回的房價、內容等可能和所測試的旅宿不相關。

即時測試預訂重要事項

即時測試就是利用真實信用卡進行單純的標準即時預訂,不使用測試標頭,並且在確認後即取消。您有責任選擇可接受的候選旅宿,亦有責任自行取消您的測試。建議您只在啟用前開發的最終階段再進行即時測試。因為即時測試所產生的政策規定取消費用或不得退款的費用,Rapid 概不負責。

建立即時測試預訂

  • 請搜尋至少 60 – 90 天後的住宿。
  • 請選擇在旅宿政策規定期間內取消,不需負擔任何取消費用的客房 (部分旅宿會收取內部,和外部政策規定的取消費用)。
  • 確認該客房的 refundable 旗標無誤。
  • 在預訂要求的rooms物件中,請以「測試預訂」為旅客姓名值。
  • billing_contact 物件中使用與您信用卡有關的實際名稱、地址及電話號碼。

取消即時測試預訂

  • 您必須在預訂後 48 小時內取消預訂。
  • 處理取消費的退款事宜需要 5 個工作天。
  • 款項提撥至信用卡帳戶需要 30 個工作天。

註冊付款工作階段

測試標頭值HTTP 代碼與回應即時測試
standard201 - Standard Response
init_skip201 - Standard Response w/oencodedInitConfig
init_fail201 - Standard Response & Init Fail
init_timeout201 - Standard Response & Init Timeout
internal_server_error500 - Internal Server Error
service_unavailable503 - Service Unavailable

建立預訂

測試標頭值HTTP 代碼與回應即時測試
complete_payment_session201 - Standard PSD2 Response & Success Challenge
standard201 - Standard Response
complete_payment_session_show201 - Standard PSD2 Response & Show Challenge
complete_payment_session_fail201 - Standard PSD2 Response & Fail Challenge
complete_payment_session_error201 - Standard PSD2 Response & Error Challenge
complete_payment_session_timeout201 - Standard PSD2 Response & Timeout Challenge
cc_declined400 - Credit Card Declined Error
rooms_unavailable410 - Rooms Unavailable Error
price_mismatch409 - Price Mismatch Error
internal_server_error500 - Internal Server Error
service_unavailable503 - Service Unavailable

完成付款工作階段

測試標頭值HTTP 代碼與回應即時測試
standard200 - Response
payment_declined400 - Payment Declined Error
price_mismatch409 - Price Mismatch Error
rooms_unavailable410 - Rooms Unavailable Error
service_unavailable503 - Service Unavailable
internal_server_error500 - Internal Error

擷取預訂

測試標頭值HTTP 代碼與回應
standard200 - Standard response
internal_server_error500 - Internal Error
service_unavailable503 - Service Unavailable

取消預訂

測試標頭值HTTP 代碼與回應
standard204 - No Content - standard response
post_stay_cancel400 - Invalid response from upstream server error
internal_server_error500 - Internal Error
service_unavailable503 - Service Unavailable
這個頁面有幫助嗎?
我們能如何改善內容?
感謝您協助改善 Developer Hub!