Skip to content

信用卡請退款

Cellvin Chung edited this page Feb 26, 2020 · 4 revisions

版本:1.1

請款執行條件

  • 交易須為授權完成狀態
  • 有效期限為授權成功日起算 21 個日曆日晚上九點前
  • 一次付清交易的每筆請款金額必須小於或等於授權金額
  • 分期付款交易、紅利折抵交易的每筆請款金額必須等於授權金額
  • 取消請款需為發動請款當日的晚上九點前

退款執行條件

  • 交易為已請款狀態
  • 有效期限為請款日起算 90 個日曆日晚上九點前。(款項認列時間以收單機構為準。)
  • 一次付清交易的每筆退款金額必須小於或等於請款金額。退款次數以每日一次為限
  • 分期付款交易、紅利折抵交易的每筆退款金額必須等於請款金額,不可部份退款。
  • 取消退款需為發動退款當日的晚上九點前

請款

Newebpay::CloseFund::Request.new(price: "請退款金額", order_number: "訂單編號/交易序號").response

退款

Newebpay::CloseFund::Refund.new(price: "請退款金額", order_number: "訂單編號/交易序號").response
參數 說明 必填 預設
number_type 單號類別

1 使用訂單編號
2 金流交易序號
1
order_number 訂單編號/交易序號

number_type1,請輸入商店訂單編號
number_type2,請輸入藍新金流交易序號。
V
price 請退款金額 V
cancel 取消請款或退款

true:取消請款或退款
merchant_id 商店代號 config/initializers/newebpay.rb 中的 merchant_id
  • 詳細說明參見原文件,部分參數名稱與預設值與原文件不同。
  • 原文件其他的必填欄位會自動產生,不需處理。

使用範例

@response = Newebpay::CloseFund::Request.new(price: "請退款金額", order_number: "訂單編號/交易序號").response
@response.success? #請退款是否成功
@response.message
@response.result.merchant_order_no
  • 參見原文件第五點,可直接使用Result參數,原參數名稱underscore後為method 例:@response.merchant_id, @response.trade_no