Documentation ¶
Overview ¶
Package bankcn 国内银行支行的联行号和地区信息, 银行图标, 校验银行卡
Index ¶
Constants ¶
View Source
const (
VALIDATE_GATEWAY = "https://ccdcapi.alipay.com/validateAndCacheCardInfo.json"
)
Variables ¶
This section is empty.
Functions ¶
func AreaMapBank ¶
func GetBankByCardBin ¶
GetBankByCardBin 根据卡号获取银行信息
func GetBankByCardOnline ¶
GetBankByCardOnline 使用阿里接口查询银行卡信息
Types ¶
type Bank ¶
type Bank struct { // 银行标识符 Bank string `json:"bank,omitempty"` // 银行名字 Name string `json:"name,omitempty"` // 银行联行号 BankUnionID string `json:"bank_union_id,omitempty"` // 联系地址 Address string `json:"address,omitempty"` // 联系电话 Phone string `json:"phone,omitempty"` // 所在区域代号 AreaID string `json:"area_id,omitempty"` // CardType 银行卡类型 CardType CardType `json:"card_type"` }
Bank 银行信息
func BankListByArea ¶
BankListByArea 根据 areaID 获取当前区域下所有支行
type CardBin ¶
type CardBin struct { Bin string `json:"bin,omitempty"` Bank string `json:"bank,omitempty"` Type CardType `json:"type,omitempty"` Len int `json:"len,omitempty"` }
func CardBinList ¶
func CardBinList() []CardBin
func SearchCardBin ¶
SearchCardBin 根据传入的数据源,搜索银行卡信息 存在部分不同银行的卡Bin相同,但卡号长度不同。如622303和622305,16位是南京银行,18位是中国工商银行。所以cardBin查询时,如果卡号输入不完整,只给第一个结果。 当前有以下卡Bin存在重复:690755,622442,622425,622302,622308,622309,622510,622162,622307,622303,622305,621260
Click to show internal directories.
Click to hide internal directories.