# 準備事項 / 介接注意事項 ## 呼叫綠界API ![❗](https://developers.ecpay.com.tw/wp-content/uploads/2022/02/warning-icon.png) **注意事項:** 接收傳送綠界科技API通知時,請特店系統開發人員確認下面事項,以利正常收到綠界科技發送的各項通知: 1. 請確認通知回傳網址\[ServerReplyURL\]是否接受回傳資訊,且已開通防火牆對外連線。 2. 呼叫綠界科技API連接port只提供https (443 port)連線方式,並請使用合法的DNS(Domain Name System)進行介接。 3. 請確認各項交易參數傳送時是使用Http POST方式傳送至綠界科技API。 4. 請確認特店系統的Server URL連接port為http 80 port與https 443 port。 5. 傳送參數值的內容不允許使用html tag 標示,例如

…等。 6. 請勿將金鑰資訊存放或顯示於前端網頁內,如Javascript、html、CSS…等,避免金鑰被盜取使用造成損失及交易資料外洩。 7. 串接API時有傳平台商編號PlatformID參數時,產生檢查碼及資料加密的金鑰,請使用平台商的HashKey及HashIV。 8. 回傳網址不支援中文網址,網址參數請使用punycode編碼後的網址,例如中文.tw 改成xn--fiq228c.tw。 9. 為保障消費者權益與網路交易安全,綠界串接服務只支援TLS 1.2之加密通訊協定。 10. 假如程式呼叫 API 的速度太快,會收到 HTTP Status Code 403 的狀態碼,此時請降低呼叫 API 的速度,並等候 30 分鐘後再重新呼叫,如果有高速存取 API 的需求,請先確認您具備「特約賣家」身分,並聯繫所屬業務人員。 ## 特店防火牆設定說明 - 特店防火牆如需連到綠界主機,因為綠界主機 IP 不固定,請以 FQDN 方式設定以下 domain: logistics.ecpay.com.tw TCP 443 (正式環境) logistics-stage.ecpay.com.tw TCP 443 (測試環境) 如貴司防火牆需固定IP,請至線上回報 申請,問題類別及子類別請選擇:申請主機IP鎖定。 - 特店防火牆如需允許綠界主機連入,請設定以下 domain 放行: postgate.ecpay.com.tw TCP 443 (正式環境) postgate-stage.ecpay.com.tw TCP 443 (測試環境) 如貴司防火牆需固定IP,postgate IP 不須另外申請,請自行使用ping指令查詢IP的位址。 ## 綠界CDN(Content Delivery Network)會導致阻擋特殊字元或規則 - 檢測用於執行系統指令/工具的字詞: - ‘net localgroup’ (Windows command to modify local groups) - ‘net.exe’ (Windows Net command) - ‘nmap.exe’ (NMap executable for Windows) - ‘nc.exe’ (NetCat executable for Windows) - ‘traceroute’ and ‘tracert’ (Traceroute utility) - ‘telnet.exe’ (Windows Telnet client) - ‘tclsh’ and ‘tclsh8’ (Simple shell / TCL interpreter) - ‘tftp’ (Trivial FTP client) - ‘wguest.exe’ (Webcom Guestbook CGI – contains a known command injection vulnerability) - ‘wsh.exe’ (Windows Script Host) - ‘rcmd.exe’ (Windows NT remote command utility) - ‘ftp.exe’ (Windows FTP client) - ‘echo’ (Shell echo command) - ‘cmd32.exe’ or ‘cmd.exe’ (Windows command shell) - ‘cmd’ with the ‘/c’ switch (Windows command shell) - ‘cd’ and a trailing slash (/) or backslash (), or a trailing double-dot (..) - ‘chmod’ with the ‘+x’ switch (Unix change file mode) - 檢測使用 Shell 相關的字符來附加於原始輸入的指令,字符包括分號 ( ; ), pipe ( | ), 反引號( ` ): - ‘chgrp’ - ‘chmod’ - ‘chown’ - ‘csh’ - ‘cmd’ - ‘cpp’ - ‘passwd’ - ‘python’ - ‘perl’ - ‘ping’ - ‘ps’ - ‘nasm’ - ‘nmap’ - ‘nc’ - ‘finger’ - ‘ftp’ - ‘kill’ - ‘mail’ - ‘xterm’ - ‘rm’ - ‘ls’ - ‘lsof’ - ‘telnet’ - ‘uname’ - ‘echo’ - ‘id’ - ‘g++’ - ‘gcc’