Class: GeeePay::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/geee_pay/result.rb

Constant Summary collapse

RESULT_SUCCESS_FLAG =
'1'
LV_BANK_CODE_MAP =

网关支付-银行编码

{
    '102' => '工商银行',
    '103' => '农业银行',
    '104'	=> '中国银行',
    '105'	=> '建设银行',
    '203' => '农业发展银行',
    '301'	=> '交通银行',
    '302' => '中信银行',
    '303' => '光大银行',
    '304'	=> '华夏银行',
    '305' => '民生银行',
    '306'	=> '广发银行',
    '307'	=> '平安银行',
    '308'	=> '招商银行',
    '309'	=> '兴业银行',
    '310'	=> '浦发银行',
    '313'	=> '北京银行',
    '315' => '恒丰银行',
    '316' => '浙商银行',
    '318' => '渤海银行',
    '325' => '上海银行',
    '403' => '邮储银行',
    '440' => '徽商银行'
}
LV_SCAN_PAY_MODE =

扫码支付方式

{
    '00021' => '支付宝扫码',
    '00022' => '微信扫码',
    '00032' => 'QQ扫码',
    '00027' => '京东扫码'
}
LV_PAY_MODE =
{
    '00020' => '银行卡',
    '00023' => '快捷',
    '00024' => '支付宝Wap'
}
LV_RECEIVABLE_TYPE =

到账类型

{ 'D00' => 'D+0', 'T01' => 'T+1', 'D01' => 'D+1'}
LV_WITHDRAW_TYPE =

业务类型

{ '0' => '对私', '1' => '对公' }
LV_ACCOUNT_TYPE =

账户类型

{ '0' => '借记卡', '1' => '贷记卡' }
LV_TRAN_ORDER_STATUS =

订单状态:交易订单

{
    '00' => '未支付',
    '01' => '支付成功',
    '02' => '银行处理中',
    '14' => '冻结',
    '19' => '待处理'
}
LV_OTH_ORDER_STATUS =

订单状态:代付订单

{
    '00' => '未支付',
    '01' => '已完成',
    '14' => '冻结',
    '02' => '银行处理中',
    '22' => '退还支付账户'
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(result) ⇒ Result

Returns a new instance of Result.



75
76
77
78
# File 'lib/geee_pay/result.rb', line 75

def initialize(result)
  self.raw = result.to_s
  self.msg = result
end

Instance Attribute Details

#msgObject

Returns the value of attribute msg.



3
4
5
# File 'lib/geee_pay/result.rb', line 3

def msg
  @msg
end

#rawObject

Returns the value of attribute raw.



3
4
5
# File 'lib/geee_pay/result.rb', line 3

def raw
  @raw
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


80
81
82
# File 'lib/geee_pay/result.rb', line 80

def success?
  @msg['returnCode'] == RESULT_SUCCESS_FLAG
end