alipy

package
v0.0.0-...-32237eb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2013 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

提供查询商家支付宝财务流水功能 auto sdk from taobao ApiMetadata.xml version 20130808 auther: dz7changkong@qq.com

Index

Constants

View Source
const VersionNo = "20130808"

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountFreeze

type AccountFreeze struct {
	FreezeAmount float64 `json:"freeze_amount"`
	FreezeName   string  `json:"freeze_name"`
	FreezeType   string  `json:"freeze_type"`
}

支付宝用户冻结明细信息

type AlipayAccount

type AlipayAccount struct {
	AlipayUserId    string  `json:"alipay_user_id"`
	AvailableAmount float64 `json:"available_amount"`
	FreezeAmount    float64 `json:"freeze_amount"`
	TotalAmount     float64 `json:"total_amount"`
}

支付宝用户账户信息

type AlipayContract

type AlipayContract struct {
	AlipayUserId    string `json:"alipay_user_id"`
	ContractContent string `json:"contract_content"`
	EndTime         string `json:"end_time"`
	PageUrl         string `json:"page_url"`
	StartTime       string `json:"start_time"`
	Subscribe       bool   `json:"subscribe"`
}

用户订购信息

type AlipayEbppBillAddRequest

type AlipayEbppBillAddRequest struct {
	open_taobao.TaobaoMethodRequest
}

创建生活账单

func (*AlipayEbppBillAddRequest) GetResponse

func (r *AlipayEbppBillAddRequest) GetResponse(accessToken string) (*AlipayEbppBillAddResponse, []byte, error)

func (*AlipayEbppBillAddRequest) SetAuthToken

func (r *AlipayEbppBillAddRequest) SetAuthToken(value string)

如果传入调用api有淘宝授权的session可以不传这个字段

func (*AlipayEbppBillAddRequest) SetBillDate

func (r *AlipayEbppBillAddRequest) SetBillDate(value string)

账单的账期,例如201203表示2012年3月的账单。

func (*AlipayEbppBillAddRequest) SetBillKey

func (r *AlipayEbppBillAddRequest) SetBillKey(value string)

账单单据号,例如水费单号,手机号,电费号,信用卡卡号。没有唯一性要求。

func (*AlipayEbppBillAddRequest) SetChargeInst

func (r *AlipayEbppBillAddRequest) SetChargeInst(value string)

支付宝给每个出账机构指定了一个对应的英文短名称来唯一表示该收费单位。

func (*AlipayEbppBillAddRequest) SetMerchantOrderNo

func (r *AlipayEbppBillAddRequest) SetMerchantOrderNo(value string)

输出机构的业务流水号,需要保证唯一性。

func (*AlipayEbppBillAddRequest) SetMobile

func (r *AlipayEbppBillAddRequest) SetMobile(value string)

用户的手机号

func (*AlipayEbppBillAddRequest) SetOrderType

func (r *AlipayEbppBillAddRequest) SetOrderType(value string)

支付宝订单类型。公共事业缴纳JF,信用卡还款HK

func (*AlipayEbppBillAddRequest) SetOwnerName

func (r *AlipayEbppBillAddRequest) SetOwnerName(value string)

拥有该账单的用户姓名

func (*AlipayEbppBillAddRequest) SetPayAmount

func (r *AlipayEbppBillAddRequest) SetPayAmount(value string)

缴费金额。用户支付的总金额。单位为:RMB Yuan。取值范围为[0.01,100000000.00],精确到小数点后两位。

func (*AlipayEbppBillAddRequest) SetServiceAmount

func (r *AlipayEbppBillAddRequest) SetServiceAmount(value string)

账单的服务费。

func (*AlipayEbppBillAddRequest) SetSubOrderType

func (r *AlipayEbppBillAddRequest) SetSubOrderType(value string)

子业务类型是业务类型的下一级概念,例如:WATER表示JF下面的水费,ELECTRIC表示JF下面的电费,GAS表示JF下面的燃气费。

func (*AlipayEbppBillAddRequest) SetTrafficLocation

func (r *AlipayEbppBillAddRequest) SetTrafficLocation(value string)

交通违章地点,sub_order_type=TRAFFIC时填写。

func (*AlipayEbppBillAddRequest) SetTrafficRegulations

func (r *AlipayEbppBillAddRequest) SetTrafficRegulations(value string)

违章行为,sub_order_type=TRAFFIC时填写。

type AlipayEbppBillAddResponse

type AlipayEbppBillAddResponse struct {
	AlipayOrderNo   string `json:"alipay_order_no"`
	BillDate        string `json:"bill_date"`
	BillKey         string `json:"bill_key"`
	ChargeInst      string `json:"charge_inst"`
	ChargeInstName  string `json:"charge_inst_name"`
	MerchantOrderNo string `json:"merchant_order_no"`
	OrderType       string `json:"order_type"`
	OwnerName       string `json:"owner_name"`
	PayAmount       string `json:"pay_amount"`
	ServiceAmount   string `json:"service_amount"`
	SubOrderType    string `json:"sub_order_type"`
}

type AlipayEbppBillAddResponseResult

type AlipayEbppBillAddResponseResult struct {
	Response *AlipayEbppBillAddResponse `json:"alipay_ebpp_bill_add_response"`
}

type AlipayEbppBillGetRequest

type AlipayEbppBillGetRequest struct {
	open_taobao.TaobaoMethodRequest
}

查询生活账单信息

func (*AlipayEbppBillGetRequest) GetResponse

func (r *AlipayEbppBillGetRequest) GetResponse(accessToken string) (*AlipayEbppBillGetResponse, []byte, error)

func (*AlipayEbppBillGetRequest) SetAuthToken

func (r *AlipayEbppBillGetRequest) SetAuthToken(value string)

支付宝授权凭证,如果有淘宝的session可以不传

func (*AlipayEbppBillGetRequest) SetMerchantOrderNo

func (r *AlipayEbppBillGetRequest) SetMerchantOrderNo(value string)

输出机构的业务流水号,需要保证唯一性。

func (*AlipayEbppBillGetRequest) SetOrderType

func (r *AlipayEbppBillGetRequest) SetOrderType(value string)

支付宝订单类型。公共事业缴纳JF,信用卡还款HK

type AlipayEbppBillGetResponse

type AlipayEbppBillGetResponse struct {
	AlipayOrderNo      string  `json:"alipay_order_no"`
	BillDate           string  `json:"bill_date"`
	BillKey            string  `json:"bill_key"`
	ChargeInst         string  `json:"charge_inst"`
	ChargeInstName     string  `json:"charge_inst_name"`
	MerchantOrderNo    string  `json:"merchant_order_no"`
	OrderStatus        string  `json:"order_status"`
	OrderType          string  `json:"order_type"`
	OwnerName          string  `json:"owner_name"`
	PayAmount          float64 `json:"pay_amount"`
	ServiceAmount      float64 `json:"service_amount"`
	SubOrderType       string  `json:"sub_order_type"`
	TrafficLocation    string  `json:"traffic_location"`
	TrafficRegulations string  `json:"traffic_regulations"`
}

type AlipayEbppBillGetResponseResult

type AlipayEbppBillGetResponseResult struct {
	Response *AlipayEbppBillGetResponse `json:"alipay_ebpp_bill_get_response"`
}

type AlipayEbppBillPayRequest

type AlipayEbppBillPayRequest struct {
	open_taobao.TaobaoMethodRequest
}

对生活账单进行支付接口

func (*AlipayEbppBillPayRequest) GetResponse

func (r *AlipayEbppBillPayRequest) GetResponse(accessToken string) (*AlipayEbppBillPayResponse, []byte, error)

func (*AlipayEbppBillPayRequest) SetAlipayOrderNo

func (r *AlipayEbppBillPayRequest) SetAlipayOrderNo(value string)

支付宝的业务订单号,具有唯一性。

func (*AlipayEbppBillPayRequest) SetAuthToken

func (r *AlipayEbppBillPayRequest) SetAuthToken(value string)

如有有淘宝授权的session可以不传这个字段

func (*AlipayEbppBillPayRequest) SetMerchantOrderNo

func (r *AlipayEbppBillPayRequest) SetMerchantOrderNo(value string)

输出机构的业务流水号,需要保证唯一性。

func (*AlipayEbppBillPayRequest) SetOrderType

func (r *AlipayEbppBillPayRequest) SetOrderType(value string)

支付宝订单类型。公共事业缴纳JF,信用卡还款HK

type AlipayEbppBillPayResponse

type AlipayEbppBillPayResponse struct {
	AlipayOrderNo   string `json:"alipay_order_no"`
	MerchantOrderNo string `json:"merchant_order_no"`
	OrderType       string `json:"order_type"`
}

type AlipayEbppBillPayResponseResult

type AlipayEbppBillPayResponseResult struct {
	Response *AlipayEbppBillPayResponse `json:"alipay_ebpp_bill_pay_response"`
}

type AlipayEbppBillPayurlGetRequest

type AlipayEbppBillPayurlGetRequest struct {
	open_taobao.TaobaoMethodRequest
}

创建账单之后,调用此API返回一个用户自己去收银台付款的URL,用户去收银台页面完成付款操作。

func (*AlipayEbppBillPayurlGetRequest) GetResponse

func (*AlipayEbppBillPayurlGetRequest) SetAlipayOrderNo

func (r *AlipayEbppBillPayurlGetRequest) SetAlipayOrderNo(value string)

支付宝的业务订单号,具有唯一性。

func (*AlipayEbppBillPayurlGetRequest) SetAuthToken

func (r *AlipayEbppBillPayurlGetRequest) SetAuthToken(value string)

如有有淘宝授权的session可以不传这个字段

func (*AlipayEbppBillPayurlGetRequest) SetMerchantOrderNo

func (r *AlipayEbppBillPayurlGetRequest) SetMerchantOrderNo(value string)

输出机构的业务流水号,需要保证唯一性。

func (*AlipayEbppBillPayurlGetRequest) SetOrderType

func (r *AlipayEbppBillPayurlGetRequest) SetOrderType(value string)

支付宝订单类型。公共事业缴纳JF,信用卡还款HK。

type AlipayEbppBillPayurlGetResponse

type AlipayEbppBillPayurlGetResponse struct {
	PayUrl string `json:"pay_url"`
}

type AlipayEbppBillPayurlGetResponseResult

type AlipayEbppBillPayurlGetResponseResult struct {
	Response *AlipayEbppBillPayurlGetResponse `json:"alipay_ebpp_bill_payurl_get_response"`
}

type AlipayMicropayOrderConfirmpayurlGetRequest

type AlipayMicropayOrderConfirmpayurlGetRequest struct {
	open_taobao.TaobaoMethodRequest
}
创建并支付冻结单之后,使用此接口获取有密支付的url

这个接口调用的前提是创建冻结金的参数信息pay_confirm=PAY_PASSWORD

func (*AlipayMicropayOrderConfirmpayurlGetRequest) GetResponse

func (*AlipayMicropayOrderConfirmpayurlGetRequest) SetAlipayOrderNo

func (r *AlipayMicropayOrderConfirmpayurlGetRequest) SetAlipayOrderNo(value string)

支付宝订单号,冻结流水号.这个是创建冻结订单支付宝返回的

func (*AlipayMicropayOrderConfirmpayurlGetRequest) SetAmount

支付金额,区间必须在[0.01,30],只能保留小数点后两位

func (*AlipayMicropayOrderConfirmpayurlGetRequest) SetAuthToken

func (r *AlipayMicropayOrderConfirmpayurlGetRequest) SetAuthToken(value string)

支付宝用户给应用的授权.

func (*AlipayMicropayOrderConfirmpayurlGetRequest) SetMemo

支付备注

func (*AlipayMicropayOrderConfirmpayurlGetRequest) SetReceiveUserId

func (r *AlipayMicropayOrderConfirmpayurlGetRequest) SetReceiveUserId(value string)

收款方的支付宝ID

func (*AlipayMicropayOrderConfirmpayurlGetRequest) SetTransferOutOrderNo

func (r *AlipayMicropayOrderConfirmpayurlGetRequest) SetTransferOutOrderNo(value string)

本次转账的外部单据号(只能由字母和数字组成,maxlength=32)

type AlipayMicropayOrderConfirmpayurlGetResponse

type AlipayMicropayOrderConfirmpayurlGetResponse struct {
	SinglePayDetail *SinglePayDetail `json:"single_pay_detail"`
}

type AlipayMicropayOrderConfirmpayurlGetResponseResult

type AlipayMicropayOrderConfirmpayurlGetResponseResult struct {
	Response *AlipayMicropayOrderConfirmpayurlGetResponse `json:"alipay_micropay_order_confirmpayurl_get_response"`
}

type AlipayMicropayOrderDirectPayRequest

type AlipayMicropayOrderDirectPayRequest struct {
	open_taobao.TaobaoMethodRequest
}
  1. 创建并支付一笔冻结金后,调用此接口

2. 这个接口调用的前提是创建冻结金的参数信息pay_confirm=NO_CONFIRM

func (*AlipayMicropayOrderDirectPayRequest) GetResponse

func (*AlipayMicropayOrderDirectPayRequest) SetAlipayOrderNo

func (r *AlipayMicropayOrderDirectPayRequest) SetAlipayOrderNo(value string)

支付宝订单号,冻结流水号.这个是创建冻结订单支付宝返回的

func (*AlipayMicropayOrderDirectPayRequest) SetAmount

func (r *AlipayMicropayOrderDirectPayRequest) SetAmount(value string)

支付金额,区间必须在[0.01,30],只能保留小数点后两位

func (*AlipayMicropayOrderDirectPayRequest) SetAuthToken

func (r *AlipayMicropayOrderDirectPayRequest) SetAuthToken(value string)

支付宝给应用的授权

func (*AlipayMicropayOrderDirectPayRequest) SetMemo

func (r *AlipayMicropayOrderDirectPayRequest) SetMemo(value string)

支付备注

func (*AlipayMicropayOrderDirectPayRequest) SetReceiveUserId

func (r *AlipayMicropayOrderDirectPayRequest) SetReceiveUserId(value string)

收款方的支付宝ID

func (*AlipayMicropayOrderDirectPayRequest) SetTransferOutOrderNo

func (r *AlipayMicropayOrderDirectPayRequest) SetTransferOutOrderNo(value string)

本次转账的外部单据号(只能由字母和数字组成,maxlength=32

type AlipayMicropayOrderDirectPayResponse

type AlipayMicropayOrderDirectPayResponse struct {
	SinglePayDetail *SinglePayDetail `json:"single_pay_detail"`
}

type AlipayMicropayOrderDirectPayResponseResult

type AlipayMicropayOrderDirectPayResponseResult struct {
	Response *AlipayMicropayOrderDirectPayResponse `json:"alipay_micropay_order_direct_pay_response"`
}

type AlipayMicropayOrderFreezeRequest

type AlipayMicropayOrderFreezeRequest struct {
	open_taobao.TaobaoMethodRequest
}

该接口是支付宝提成冻结支付宝资金的操作

func (*AlipayMicropayOrderFreezeRequest) GetResponse

func (*AlipayMicropayOrderFreezeRequest) SetAmount

func (r *AlipayMicropayOrderFreezeRequest) SetAmount(value string)

需要冻结金额,[0.01,2000],必须是正数,最多只能保留小数点两位,单位是元

func (*AlipayMicropayOrderFreezeRequest) SetAuthToken

func (r *AlipayMicropayOrderFreezeRequest) SetAuthToken(value string)

支付宝用户给应用的授权.

func (*AlipayMicropayOrderFreezeRequest) SetExpireTime

func (r *AlipayMicropayOrderFreezeRequest) SetExpireTime(value string)

冻结资金的到期时间,超过此日期,冻结金会自动解冻,时间要求是:[当前时间+24h,订购时间-8h] .

func (*AlipayMicropayOrderFreezeRequest) SetMemo

func (r *AlipayMicropayOrderFreezeRequest) SetMemo(value string)

冻结备注,maxLength=40

func (*AlipayMicropayOrderFreezeRequest) SetMerchantOrderNo

func (r *AlipayMicropayOrderFreezeRequest) SetMerchantOrderNo(value string)

商户订单号,只能由字母和数字组成,最大长度32.此外部订单号与支付宝的冻结订单号对应,注意 应用id和订购者id和外部订单号必须保证唯一性。

func (*AlipayMicropayOrderFreezeRequest) SetPayConfirm

func (r *AlipayMicropayOrderFreezeRequest) SetPayConfirm(value string)
在解冻转账的时候的支付方式:

NO_CONFIRM:不需要付款确认,调用接口直接扣款 PAY_PASSWORD: 在转账需要付款方用支付密码确认,才可以转账成功

type AlipayMicropayOrderFreezeResponse

type AlipayMicropayOrderFreezeResponse struct {
	MicroPayOrderDetail *MicroPayOrderDetail `json:"micro_pay_order_detail"`
}

type AlipayMicropayOrderFreezeResponseResult

type AlipayMicropayOrderFreezeResponseResult struct {
	Response *AlipayMicropayOrderFreezeResponse `json:"alipay_micropay_order_freeze_response"`
}

type AlipayMicropayOrderFreezepayurlGetRequest

type AlipayMicropayOrderFreezepayurlGetRequest struct {
	open_taobao.TaobaoMethodRequest
}

用户创建一笔支付订单之后,使用此接口获取支付冻结金的url来支付冻结金

func (*AlipayMicropayOrderFreezepayurlGetRequest) GetResponse

func (*AlipayMicropayOrderFreezepayurlGetRequest) SetAlipayOrderNo

func (r *AlipayMicropayOrderFreezepayurlGetRequest) SetAlipayOrderNo(value string)

冻结订单号,创建冻结订单时支付宝返回的

func (*AlipayMicropayOrderFreezepayurlGetRequest) SetAuthToken

func (r *AlipayMicropayOrderFreezepayurlGetRequest) SetAuthToken(value string)

支付宝用户给应用的授权。

type AlipayMicropayOrderFreezepayurlGetResponse

type AlipayMicropayOrderFreezepayurlGetResponse struct {
	PayFreezeUrl string `json:"pay_freeze_url"`
}

type AlipayMicropayOrderFreezepayurlGetResponseResult

type AlipayMicropayOrderFreezepayurlGetResponseResult struct {
	Response *AlipayMicropayOrderFreezepayurlGetResponse `json:"alipay_micropay_order_freezepayurl_get_response"`
}

type AlipayMicropayOrderGetRequest

type AlipayMicropayOrderGetRequest struct {
	open_taobao.TaobaoMethodRequest
}

用户对已经冻结的订单可以调用此接口查询明细

func (*AlipayMicropayOrderGetRequest) GetResponse

func (*AlipayMicropayOrderGetRequest) SetAlipayOrderNo

func (r *AlipayMicropayOrderGetRequest) SetAlipayOrderNo(value string)

支付宝订单号,冻结流水号(创建冻结订单返回)

func (*AlipayMicropayOrderGetRequest) SetAuthToken

func (r *AlipayMicropayOrderGetRequest) SetAuthToken(value string)

支付宝用户给应用的授权.

type AlipayMicropayOrderGetResponse

type AlipayMicropayOrderGetResponse struct {
	MicroPayOrderDetail *MicroPayOrderDetail `json:"micro_pay_order_detail"`
}

type AlipayMicropayOrderGetResponseResult

type AlipayMicropayOrderGetResponseResult struct {
	Response *AlipayMicropayOrderGetResponse `json:"alipay_micropay_order_get_response"`
}

type AlipayMicropayOrderUnfreezeRequest

type AlipayMicropayOrderUnfreezeRequest struct {
	open_taobao.TaobaoMethodRequest
}

解冻冻结单API

func (*AlipayMicropayOrderUnfreezeRequest) GetResponse

func (*AlipayMicropayOrderUnfreezeRequest) SetAlipayOrderNo

func (r *AlipayMicropayOrderUnfreezeRequest) SetAlipayOrderNo(value string)

冻结资金流水号,在创建资金订单时支付宝返回的流水号

func (*AlipayMicropayOrderUnfreezeRequest) SetAuthToken

func (r *AlipayMicropayOrderUnfreezeRequest) SetAuthToken(value string)

支付宝用户给应用的授权.

func (*AlipayMicropayOrderUnfreezeRequest) SetMemo

func (r *AlipayMicropayOrderUnfreezeRequest) SetMemo(value string)

冻结备注

type AlipayMicropayOrderUnfreezeResponse

type AlipayMicropayOrderUnfreezeResponse struct {
	UnfreezeOrderDetail *UnfreezeOrderDetail `json:"unfreeze_order_detail"`
}

type AlipayMicropayOrderUnfreezeResponseResult

type AlipayMicropayOrderUnfreezeResponseResult struct {
	Response *AlipayMicropayOrderUnfreezeResponse `json:"alipay_micropay_order_unfreeze_response"`
}

type AlipayPointBudgetGetRequest

type AlipayPointBudgetGetRequest struct {
	open_taobao.TaobaoMethodRequest
}
查询已采购的集分宝余额,操作流程如下:

1、申请支付宝增值包。 2、申请支付宝应用上线时选择集分宝API。 3、引导商家签约支付宝集分宝服务,地址为https://openapi.alipay.com/subscribe.htm?id=应用ID。 4、引导商家对授予支付宝集分宝发放权限,地址为https://openauth.alipay.com/oauth2/authorize.htm?scope=p&client_id=应用ID 5、引导授权的商家采购集分宝,地址为https://jf.alipay.com/aop/purchase.htm,进行集分宝采购。 6、商家采购之后可以通过集分宝余额API(alipay.point.budget.get)查询商家的集分宝数量。

func (*AlipayPointBudgetGetRequest) GetResponse

func (r *AlipayPointBudgetGetRequest) GetResponse(accessToken string) (*AlipayPointBudgetGetResponse, []byte, error)

func (*AlipayPointBudgetGetRequest) SetAuthToken

func (r *AlipayPointBudgetGetRequest) SetAuthToken(value string)

支付宝给用户的授权。如果没有top的授权,这个字段是必填项

type AlipayPointBudgetGetResponse

type AlipayPointBudgetGetResponse struct {
	BudgetAmount int `json:"budget_amount"`
}

type AlipayPointBudgetGetResponseResult

type AlipayPointBudgetGetResponseResult struct {
	Response *AlipayPointBudgetGetResponse `json:"alipay_point_budget_get_response"`
}

type AlipayPointOrderAddRequest

type AlipayPointOrderAddRequest struct {
	open_taobao.TaobaoMethodRequest
}
向用户发送集分宝,发放集分宝之前,操作流程如下:

1、申请支付宝增值包。 2、申请支付宝应用上线时选择集分宝API。 3、引导商家签约支付宝集分宝服务,地址为https://openapi.alipay.com/subscribe.htm?id=应用ID。 4、引导商家对授予支付宝集分宝发放权限,地址为https://openauth.alipay.com/oauth2/authorize.htm?scope=p&client_id=应用ID 5、引导授权的商家采购集分宝,地址为https://jf.alipay.com/aop/purchase.htm,进行集分宝采购。 6、商家采购之后可以通过集分宝余额API(alipay.point.budget.get)查询商家的集分宝数量。 7、调用发放API(alipay.point.order.add)发放集分宝。

func (*AlipayPointOrderAddRequest) GetResponse

func (r *AlipayPointOrderAddRequest) GetResponse(accessToken string) (*AlipayPointOrderAddResponse, []byte, error)

func (*AlipayPointOrderAddRequest) SetAuthToken

func (r *AlipayPointOrderAddRequest) SetAuthToken(value string)

支付宝用户给应用发放集分宝的授权。

func (*AlipayPointOrderAddRequest) SetMemo

func (r *AlipayPointOrderAddRequest) SetMemo(value string)

向用户展示集分宝发放备注

func (*AlipayPointOrderAddRequest) SetMerchantOrderNo

func (r *AlipayPointOrderAddRequest) SetMerchantOrderNo(value string)

isv提供的发放号订单号,由数字和组成,最大长度为32为,需要保证每笔发放的唯一性,支付宝会对该参数做唯一性控制。如果使用同样的订单号,支付宝将返回订单号已经存在的错误

func (*AlipayPointOrderAddRequest) SetOrderTime

func (r *AlipayPointOrderAddRequest) SetOrderTime(value string)

发放集分宝时间

func (*AlipayPointOrderAddRequest) SetPointCount

func (r *AlipayPointOrderAddRequest) SetPointCount(value string)

发放集分宝的数量

func (*AlipayPointOrderAddRequest) SetUserSymbol

func (r *AlipayPointOrderAddRequest) SetUserSymbol(value string)

用户标识符,用于指定集分宝发放的用户,和user_symbol_type一起使用,确定一个唯一的支付宝用户

func (*AlipayPointOrderAddRequest) SetUserSymbolType

func (r *AlipayPointOrderAddRequest) SetUserSymbolType(value string)

用户标识符类型,现在支持ALIPAY_USER_ID:表示支付宝用户ID,ALIPAY_LOGON_ID:表示支付宝登陆号

type AlipayPointOrderAddResponse

type AlipayPointOrderAddResponse struct {
	AlipayOrderNo string `json:"alipay_order_no"`
	ResultCode    bool   `json:"result_code"`
}

type AlipayPointOrderAddResponseResult

type AlipayPointOrderAddResponseResult struct {
	Response *AlipayPointOrderAddResponse `json:"alipay_point_order_add_response"`
}

type AlipayPointOrderGetRequest

type AlipayPointOrderGetRequest struct {
	open_taobao.TaobaoMethodRequest
}

查询集分宝发放详情,发放API是alipay.point.order.add。请先熟悉发放API的流程。

func (*AlipayPointOrderGetRequest) GetResponse

func (r *AlipayPointOrderGetRequest) GetResponse(accessToken string) (*AlipayPointOrderGetResponse, []byte, error)

func (*AlipayPointOrderGetRequest) SetAuthToken

func (r *AlipayPointOrderGetRequest) SetAuthToken(value string)

支付宝用户给应用的授权。

func (*AlipayPointOrderGetRequest) SetMerchantOrderNo

func (r *AlipayPointOrderGetRequest) SetMerchantOrderNo(value string)

isv提供的发放号订单号,由数字和组成,最大长度为32为,需要保证每笔发放的唯一性,支付宝会对该参数做唯一性控制。如果使用同样的订单号,支付宝将返回订单号已经存在的错误

func (*AlipayPointOrderGetRequest) SetUserSymbol

func (r *AlipayPointOrderGetRequest) SetUserSymbol(value string)

用户标识符,用于指定集分宝发放的用户,和user_symbol_type一起使用,确定一个唯一的支付宝用户

func (*AlipayPointOrderGetRequest) SetUserSymbolType

func (r *AlipayPointOrderGetRequest) SetUserSymbolType(value string)

用户标识符类型,现在支持ALIPAY_USER_ID:表示支付宝用户ID,ALIPAY_LOGON_ID:表示支付宝登陆号

type AlipayPointOrderGetResponse

type AlipayPointOrderGetResponse struct {
	AlipayOrderNo   string `json:"alipay_order_no"`
	CreateTime      string `json:"create_time"`
	DispatchUserId  string `json:"dispatch_user_id"`
	Memo            string `json:"memo"`
	MerchantOrderNo string `json:"merchant_order_no"`
	OrderStatus     string `json:"order_status"`
	PointCount      int    `json:"point_count"`
	ReceiveUserId   string `json:"receive_user_id"`
}

type AlipayPointOrderGetResponseResult

type AlipayPointOrderGetResponseResult struct {
	Response *AlipayPointOrderGetResponse `json:"alipay_point_order_get_response"`
}

type AlipaySystemOauthTokenRequest

type AlipaySystemOauthTokenRequest struct {
	open_taobao.TaobaoMethodRequest
}

OAuth2.0 授权的第二步,换取访问令牌。

func (*AlipaySystemOauthTokenRequest) GetResponse

func (*AlipaySystemOauthTokenRequest) SetCode

func (r *AlipaySystemOauthTokenRequest) SetCode(value string)

授权码,用户对应用授权后得到。

func (*AlipaySystemOauthTokenRequest) SetGrantType

func (r *AlipaySystemOauthTokenRequest) SetGrantType(value string)

获取访问令牌的类型,authorization_code表示用授权码换,refresh_token表示用刷新令牌来换。

func (*AlipaySystemOauthTokenRequest) SetRefreshToken

func (r *AlipaySystemOauthTokenRequest) SetRefreshToken(value string)

刷新令牌,上次换取访问令牌是得到。

type AlipaySystemOauthTokenResponse

type AlipaySystemOauthTokenResponse struct {
	AccessToken  string `json:"access_token"`
	AlipayUserId string `json:"alipay_user_id"`
	ExpiresIn    string `json:"expires_in"`
	ReExpiresIn  string `json:"re_expires_in"`
	RefreshToken string `json:"refresh_token"`
}

type AlipaySystemOauthTokenResponseResult

type AlipaySystemOauthTokenResponseResult struct {
	Response *AlipaySystemOauthTokenResponse `json:"alipay_system_oauth_token_response"`
}

type AlipayTopatsUserAccountreportGetRequest

type AlipayTopatsUserAccountreportGetRequest struct {
	open_taobao.TaobaoMethodRequest
}
查询用户支付宝账务明细接口。<br/>

异步API使用方法,请查看:<a href="http://open.taobao.com/doc/detail.htm?id=30">异步API使用说明</a><br/> 1. 使用之前必须首先申请支付宝API,参考http://open.taobao.com//doc/detail.htm?id=101181#s2<br/> 2. 只对通过商家认证的、先行赔付卖家以及B2C商家开放<br/> 3. 提交任务后,通过taobao.topats.result.get来查看任务执行状态,如果任务已完成,则返回下载URL<br/> 4. 如果订阅了主动通知服务,任务完成后TOP会通过HTTP长连接推送消息,通知的消息格式请参考异步API使用文档<br/> 5. 下载到的结果是CSV格式的文本文件,默认采用UTF-8编码<br/>

func (*AlipayTopatsUserAccountreportGetRequest) GetResponse

func (*AlipayTopatsUserAccountreportGetRequest) SetCharset

func (r *AlipayTopatsUserAccountreportGetRequest) SetCharset(value string)

返回下载结果文件的数据格式,只支持utf-8和gbk编码,默认是utf-8

func (*AlipayTopatsUserAccountreportGetRequest) SetEndTime

func (r *AlipayTopatsUserAccountreportGetRequest) SetEndTime(value string)

对账单结束时间。end_time - start_time <= 1个自然月

func (*AlipayTopatsUserAccountreportGetRequest) SetFields

func (r *AlipayTopatsUserAccountreportGetRequest) SetFields(value string)

需要返回的字段列表。create_time:创建时间,type:账务类型,business_type:子业务类型,balance:当时支付宝账户余额,in_amount:收入金额,out_amount:支出金额,alipay_order_no:支付宝订单号,merchant_order_no:商户订单号,self_user_id:自己的支付宝ID,opt_user_id:对方的支付宝ID,memo:账号备注

func (*AlipayTopatsUserAccountreportGetRequest) SetStartTime

func (r *AlipayTopatsUserAccountreportGetRequest) SetStartTime(value string)

对账单开始时间。最近一个月内的日期。

func (*AlipayTopatsUserAccountreportGetRequest) SetType

账务类型。多个类型是,用逗号分隔,不传则查询所有类型的。PAYMENT:在线支付,TRANSFER:转账,DEPOSIT:充值,WITHDRAW:提现,CHARGE:收费,PREAUTH:预授权,OTHER:其它。

type AlipayTopatsUserAccountreportGetResponse

type AlipayTopatsUserAccountreportGetResponse struct {
	Task *Task `json:"task"`
}

type AlipayTopatsUserAccountreportGetResponseResult

type AlipayTopatsUserAccountreportGetResponseResult struct {
	Response *AlipayTopatsUserAccountreportGetResponse `json:"alipay_topats_user_accountreport_get_response"`
}

type AlipayUserAccountFreezeGetRequest

type AlipayUserAccountFreezeGetRequest struct {
	open_taobao.TaobaoMethodRequest
}

查询支付宝账户冻结类型的冻结金额。

func (*AlipayUserAccountFreezeGetRequest) GetResponse

func (*AlipayUserAccountFreezeGetRequest) SetFreezeType

func (r *AlipayUserAccountFreezeGetRequest) SetFreezeType(value string)
冻结类型,多个用,分隔。不传返回所有类型的冻结金额。

DEPOSIT_FREEZE,充值冻结 WITHDRAW_FREEZE,提现冻结 PAYMENT_FREEZE,支付冻结 BAIL_FREEZE,保证金冻结 CHARGE_FREEZE,收费冻结 PRE_DEPOSIT_FREEZE,预存款冻结 LOAN_FREEZE,贷款冻结 OTHER_FREEZE,其它

type AlipayUserAccountFreezeGetResponse

type AlipayUserAccountFreezeGetResponse struct {
	FreezeItems  []*AccountFreeze `json:"freeze_items"`
	TotalResults string           `json:"total_results"`
}

type AlipayUserAccountFreezeGetResponseResult

type AlipayUserAccountFreezeGetResponseResult struct {
	Response *AlipayUserAccountFreezeGetResponse `json:"alipay_user_account_freeze_get_response"`
}

type AlipayUserAccountGetRequest

type AlipayUserAccountGetRequest struct {
	open_taobao.TaobaoMethodRequest
}

查询支付宝账户余额

func (*AlipayUserAccountGetRequest) GetResponse

func (r *AlipayUserAccountGetRequest) GetResponse(accessToken string) (*AlipayUserAccountGetResponse, []byte, error)

type AlipayUserAccountGetResponse

type AlipayUserAccountGetResponse struct {
	AlipayAccount *AlipayAccount `json:"alipay_account"`
}

type AlipayUserAccountGetResponseResult

type AlipayUserAccountGetResponseResult struct {
	Response *AlipayUserAccountGetResponse `json:"alipay_user_account_get_response"`
}

type AlipayUserContractGetRequest

type AlipayUserContractGetRequest struct {
	open_taobao.TaobaoMethodRequest
}

获取支付宝用户订购信息。在不确认用户对应用是否订购的时候,可以调用此API查询。

func (*AlipayUserContractGetRequest) GetResponse

func (r *AlipayUserContractGetRequest) GetResponse(accessToken string) (*AlipayUserContractGetResponse, []byte, error)

func (*AlipayUserContractGetRequest) SetSubscriberUserId

func (r *AlipayUserContractGetRequest) SetSubscriberUserId(value string)

订购者支付宝ID。session与subscriber_user_id二选一即可。

type AlipayUserContractGetResponse

type AlipayUserContractGetResponse struct {
	AlipayContract *AlipayContract `json:"alipay_contract"`
}

type AlipayUserContractGetResponseResult

type AlipayUserContractGetResponseResult struct {
	Response *AlipayUserContractGetResponse `json:"alipay_user_contract_get_response"`
}

type AlipayUserDetail

type AlipayUserDetail struct {
	AlipayUserId string `json:"alipay_user_id"`
	Certified    bool   `json:"certified"`
	LogonId      string `json:"logon_id"`
	RealName     string `json:"real_name"`
	Sex          string `json:"sex"`
	UserStatus   string `json:"user_status"`
	UserType     string `json:"user_type"`
}

支付宝会员信息详情

type AlipayUserGetRequest

type AlipayUserGetRequest struct {
	open_taobao.TaobaoMethodRequest
}

查询支付宝用户信息

func (*AlipayUserGetRequest) GetResponse

func (r *AlipayUserGetRequest) GetResponse(accessToken string) (*AlipayUserGetResponse, []byte, error)

func (*AlipayUserGetRequest) SetAuthToken

func (r *AlipayUserGetRequest) SetAuthToken(value string)

支付宝给用户的授权。如果没有top的授权,这个字段是必填项

func (*AlipayUserGetRequest) SetFields

func (r *AlipayUserGetRequest) SetFields(value string)

需要返回的字段列表。alipay_user_id:支付宝用户userId,user_status:支付宝用户状态,user_type:支付宝用户类型,certified:是否通过实名认证,real_name:真实姓名,logon_id:支付宝登录号,sex:用户性别

type AlipayUserGetResponse

type AlipayUserGetResponse struct {
	AlipayUserDetail *AlipayUserDetail `json:"alipay_user_detail"`
}

type AlipayUserGetResponseResult

type AlipayUserGetResponseResult struct {
	Response *AlipayUserGetResponse `json:"alipay_user_get_response"`
}

type AlipayUserTradeSearchRequest

type AlipayUserTradeSearchRequest struct {
	open_taobao.TaobaoMethodRequest
}

查询支付宝账户交易记录

func (*AlipayUserTradeSearchRequest) GetResponse

func (r *AlipayUserTradeSearchRequest) GetResponse(accessToken string) (*AlipayUserTradeSearchResponse, []byte, error)

func (*AlipayUserTradeSearchRequest) SetAlipayOrderNo

func (r *AlipayUserTradeSearchRequest) SetAlipayOrderNo(value string)

支付宝订单号,为空查询所有记录

func (*AlipayUserTradeSearchRequest) SetEndTime

func (r *AlipayUserTradeSearchRequest) SetEndTime(value string)

结束时间。与开始时间间隔在七天之内

func (*AlipayUserTradeSearchRequest) SetMerchantOrderNo

func (r *AlipayUserTradeSearchRequest) SetMerchantOrderNo(value string)

商户订单号,为空查询所有记录

func (*AlipayUserTradeSearchRequest) SetOrderFrom

func (r *AlipayUserTradeSearchRequest) SetOrderFrom(value string)

订单来源,为空查询所有来源。淘宝(TAOBAO),支付宝(ALIPAY),其它(OTHER)

func (*AlipayUserTradeSearchRequest) SetOrderStatus

func (r *AlipayUserTradeSearchRequest) SetOrderStatus(value string)

订单状态,为空查询所有状态订单

func (*AlipayUserTradeSearchRequest) SetOrderType

func (r *AlipayUserTradeSearchRequest) SetOrderType(value string)

订单类型,为空查询所有类型订单。

func (*AlipayUserTradeSearchRequest) SetPageNo

func (r *AlipayUserTradeSearchRequest) SetPageNo(value string)

页码。取值范围:大于零的整数; 默认值1

func (*AlipayUserTradeSearchRequest) SetPageSize

func (r *AlipayUserTradeSearchRequest) SetPageSize(value string)

每页获取条数。最大值500。

func (*AlipayUserTradeSearchRequest) SetStartTime

func (r *AlipayUserTradeSearchRequest) SetStartTime(value string)

开始时间,时间必须是今天范围之内。格式为yyyy-MM-dd HH:mm:ss,精确到秒

type AlipayUserTradeSearchResponse

type AlipayUserTradeSearchResponse struct {
	TotalPages   string         `json:"total_pages"`
	TotalResults string         `json:"total_results"`
	TradeRecords []*TradeRecord `json:"trade_records"`
}

type AlipayUserTradeSearchResponseResult

type AlipayUserTradeSearchResponseResult struct {
	Response *AlipayUserTradeSearchResponse `json:"alipay_user_trade_search_response"`
}

type MicroPayOrderDetail

type MicroPayOrderDetail struct {
	AlipayOrderNo   string `json:"alipay_order_no"`
	AlipayUserId    string `json:"alipay_user_id"`
	AvailableAmount string `json:"available_amount"`
	CreateTime      string `json:"create_time"`
	ExpireTime      string `json:"expire_time"`
	FreezeAmount    string `json:"freeze_amount"`
	Memo            string `json:"memo"`
	MerchantOrderNo string `json:"merchant_order_no"`
	ModifiedTime    string `json:"modified_time"`
	OrderStatus     string `json:"order_status"`
	PayAmount       string `json:"pay_amount"`
	PayConfirm      string `json:"pay_confirm"`
}

小额支付冻结订单详情

type SinglePayDetail

type SinglePayDetail struct {
	AlipayOrderNo      string `json:"alipay_order_no"`
	Amount             string `json:"amount"`
	CreateTime         string `json:"create_time"`
	ModifiedTime       string `json:"modified_time"`
	PayUrl             string `json:"pay_url"`
	ReceiveUserId      string `json:"receive_user_id"`
	TransferOrderNo    string `json:"transfer_order_no"`
	TransferOutOrderNo string `json:"transfer_out_order_no"`
}

小额支付单笔支付

type Subtask

type Subtask struct {
	IsSuccess      bool   `json:"is_success"`
	SubTaskRequest string `json:"sub_task_request"`
	SubTaskResult  string `json:"sub_task_result"`
}

批量异步任务的子任务结果

type Task

type Task struct {
	CheckCode   string     `json:"check_code"`
	Created     string     `json:"created"`
	DownloadUrl string     `json:"download_url"`
	Method      string     `json:"method"`
	Schedule    string     `json:"schedule"`
	Status      string     `json:"status"`
	Subtasks    []*Subtask `json:"subtasks"`
	TaskId      int        `json:"task_id"`
}

批量异步任务结果

type TradeRecord

type TradeRecord struct {
	AlipayOrderNo   string  `json:"alipay_order_no"`
	CreateTime      string  `json:"create_time"`
	InOutType       string  `json:"in_out_type"`
	MerchantOrderNo string  `json:"merchant_order_no"`
	ModifiedTime    string  `json:"modified_time"`
	OppositeLogonId string  `json:"opposite_logon_id"`
	OppositeName    string  `json:"opposite_name"`
	OppositeUserId  string  `json:"opposite_user_id"`
	OrderFrom       string  `json:"order_from"`
	OrderStatus     string  `json:"order_status"`
	OrderTitle      string  `json:"order_title"`
	OrderType       string  `json:"order_type"`
	OwnerLogonId    string  `json:"owner_logon_id"`
	OwnerName       string  `json:"owner_name"`
	OwnerUserId     string  `json:"owner_user_id"`
	ServiceCharge   float64 `json:"service_charge"`
	TotalAmount     float64 `json:"total_amount"`
}

支付宝交易明细

type UnfreezeOrderDetail

type UnfreezeOrderDetail struct {
	AlipayOrderNo   string `json:"alipay_order_no"`
	CreateTime      string `json:"create_time"`
	Memo            string `json:"memo"`
	MerchantOrderNo string `json:"merchant_order_no"`
	ModifiedTime    string `json:"modified_time"`
	OrderAmount     string `json:"order_amount"`
	OrderStatus     string `json:"order_status"`
	UnfreezeAmount  string `json:"unfreeze_amount"`
}

冻结订单详情

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL