Module: ChanPay::Http::OriginalRetCode

Defined in:
lib/chan_pay/http/ret_code.rb

Constant Summary collapse

Codes =
{
  "000000" => "成功",
  "111111" => "失败",
  "000001" => "未知",
  "000002" => "已发送",
  "000004" => "已受理",
  "000005" => "错误",
  "000006" => "未受理",
  "000010" => "超时",
  "000050" => "重复",
  "900001" => "无对应批次信息",
  "900002" => "批次下无明细信息",
  "900003" => "无对应明细",
}

Class Method Summary collapse

Class Method Details

.query_quick_order_fail?(code) ⇒ Boolean

订单错误代码TODO(tony): 还需和用友畅捷支付的人沟通确认

Returns:

  • (Boolean)


46
47
48
# File 'lib/chan_pay/http/ret_code.rb', line 46

def self.query_quick_order_fail?(code)
  ['111111'].include?(code.to_s)
end

.quick_draw_fail?(code) ⇒ Boolean

同步代付错误代码

Returns:

  • (Boolean)


40
41
42
# File 'lib/chan_pay/http/ret_code.rb', line 40

def self.quick_draw_fail?(code)
  ['111111', '000005', '000006', '000010', '000050'].include?(code.to_s)
end

.success?(code) ⇒ Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/chan_pay/http/ret_code.rb', line 35

def self.success?(code)
  ['000000'].include?(code.to_s)
end