lakala

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VerifySign

func VerifySign(notifyReq *NotifyRequest, partnerCode string, credentialCode string) (err error)

验证签名

Types

type Analysis

type Analysis struct {
	OrderCount int `json:"order_count,omitempty"` // 支付成功订单数(包含有退款订单)
	TotalFee   int `json:"total_fee,omitempty"`   // 成交订单总额,货币最小单位
	RealFee    int `json:"real_fee,omitempty"`    // 支付总额,货币最小单位
}

type Client

type Client struct {
	PartnerCode string // partner_code:商户编码,由4~6位大写字母或数字构成

	IsProd      bool              // 是否生产环境
	DebugSwitch gopay.DebugSwitch // 调试开关,是否打印日志
	// contains filtered or unexported fields
}

Client lakala

func NewClient

func NewClient(partnerCode, credentialCode string, isProd bool) (client *Client, err error)

NewClient 初始化lakala户端 partnerCode: 商户编码,由4~6位大写字母或数字构成 credentialCode: 系统为商户分配的开发校验码,请妥善保管,不要在公开场合泄露 isProd: 是否生产环境

func (*Client) ApplyRefund

func (c *Client) ApplyRefund(ctx context.Context, orderId string, refundId string, bm gopay.BodyMap) (rsp *RefundRsp, err error)

申请退款 文档:https://payjp.lakala.com/docs/cn/#api-CommonApi-RefundOrder

func (*Client) CloseOrder

func (c *Client) CloseOrder(ctx context.Context, orderId string) (rsp *ErrorCode, err error)

关闭订单 文档:https://payjp.lakala.com/docs/cn/#api-CommonApi-CloseOrder

func (*Client) ConsultPayment

func (c *Client) ConsultPayment(ctx context.Context, bm gopay.BodyMap) (rsp *ConsultPaymentRsp, err error)

查询可用钱包 文档:https://payjp.lakala.com/docs/cn/#api-CommonApi-ConsultPayment

func (*Client) CreateH5PayOrder

func (c *Client) CreateH5PayOrder(ctx context.Context, orderId string, bm gopay.BodyMap) (rsp *PaymentRsp, err error)

创建H5支付单 文档:https://payjp.lakala.com/docs/cn/#api-MobileH5-NewMobileH5Pay

func (*Client) CreateJSAPIOrder

func (c *Client) CreateJSAPIOrder(ctx context.Context, orderId string, bm gopay.BodyMap) (rsp *PaymentRsp, err error)

创建JSAPI订单 文档:https://payjp.lakala.com/docs/cn/#api-JSApi-NewJSAPI

func (*Client) CreateMiniProgramOrder

func (c *Client) CreateMiniProgramOrder(ctx context.Context, orderId string, bm gopay.BodyMap) (rsp *PaymentRsp, err error)

创建小程序订单 文档:https://payjp.lakala.com/docs/cn/#api-Miniprogram_Payment-microapp

func (*Client) CreateNativeJSApiOrder

func (c *Client) CreateNativeJSApiOrder(ctx context.Context, orderId string, bm gopay.BodyMap) (rsp *PaymentRsp, err error)

创建Native JSAPI订单(offline) 文档:https://payjp.lakala.com/docs/cn/#api-JSApi-NativeJSAPI

func (*Client) CreateNativeQRCodeOrder

func (c *Client) CreateNativeQRCodeOrder(ctx context.Context, orderId string, bm gopay.BodyMap) (rsp *PaymentRsp, err error)

创建Native QRCode支付单 文档:https://payjp.lakala.com/docs/cn/#api-QRCode-NativeQRCode

func (*Client) CreateQRCodeOrder

func (c *Client) CreateQRCodeOrder(ctx context.Context, orderId string, bm gopay.BodyMap) (rsp *PaymentRsp, err error)

创建QRCode支付单 文档:https://payjp.lakala.com/docs/cn/#api-QRCode-NewQRCode

func (*Client) CreateReportSeparate

func (c *Client) CreateReportSeparate(ctx context.Context, partnerReportId, partnerSubReportId string, bm gopay.BodyMap) (rsp *ReportRsp, err error)

创建报关单(拆单) 文档:https://payjp.lakala.com/docs/cn/#api-Custom-declare_report_separate

func (*Client) CreateReportSingle

func (c *Client) CreateReportSingle(ctx context.Context, partnerReportId string, bm gopay.BodyMap) (rsp *ReportRsp, err error)

创建报关单(非拆单) 文档:https://payjp.lakala.com/docs/cn/#api-Custom-declare_report_single

func (*Client) CreateRetailOrder

func (c *Client) CreateRetailOrder(ctx context.Context, orderId string, bm gopay.BodyMap) (rsp *RetailPayRsp, err error)

创建线下支付订单 文档:https://payjp.lakala.com/docs/cn/#api-RetailPay-RetailMicroPay

func (*Client) CreateRetailQRCodeOrder

func (c *Client) CreateRetailQRCodeOrder(ctx context.Context, orderId string, bm gopay.BodyMap) (rsp *PaymentRsp, err error)

创建线下QRCode支付单 文档:https://payjp.lakala.com/docs/cn/#api-RetailPay-RetailQRCode

func (*Client) CreateSDKPaymentOrder

func (c *Client) CreateSDKPaymentOrder(ctx context.Context, orderId string, bm gopay.BodyMap) (rsp *PaymentRsp, err error)

创建SDK订单(Online) 文档:https://payjp.lakala.com/docs/cn/#api-SDKPayment-SDK

func (*Client) CreateWebGatewayOrder

func (c *Client) CreateWebGatewayOrder(ctx context.Context, orderId string, bm gopay.BodyMap) (rsp *PaymentRsp, err error)

创建渠道Web网关订单 文档:https://payjp.lakala.com/docs/cn/#api-Channel_Web_Gateway-WebGateway

func (*Client) GetCoupon

func (c *Client) GetCoupon(ctx context.Context, couponId string) (rsp *GetCouponRsp, err error)

获取优惠券信息 文档:https://payjp.lakala.com/docs/cn/#api-CommonApi-GetCoupon

func (*Client) GetEncrypt

func (c *Client) GetEncrypt(ctx context.Context) (rsp *EncryptRsp, err error)

获取加密密钥 文档:https://payjp.lakala.com/docs/cn/#api-CommonApi-GetEncrypt

func (*Client) GetExchangeRate

func (c *Client) GetExchangeRate(ctx context.Context) (rsp *ExchangeRateRsp, err error)

获取当前汇率 文档:https://payjp.lakala.com/docs/cn/#api-CommonApi-GetExchange

func (*Client) H5AlipayPlusPay

func (c *Client) H5AlipayPlusPay(ctx context.Context, orderId, redirect string) (rsp *ErrorCode, err error)

H5支付跳转页(Alipay+) 文档:https://payjp.lakala.com/docs/cn/#api-MobileH5-MobileH5PayAlipayPlus

func (*Client) H5Pay

func (c *Client) H5Pay(ctx context.Context, orderId, redirect string) (rsp *ErrorCode, err error)

H5支付跳转页 文档:https://payjp.lakala.com/docs/cn/#api-MobileH5-MobileH5Pay

func (*Client) JSAPIAlipayPay

func (c *Client) JSAPIAlipayPay(ctx context.Context, orderId, redirect string, directPay bool) (rsp *ErrorCode, err error)

支付宝JSAPI支付跳转页 文档:https://payjp.lakala.com/docs/cn/#api-JSApi-AliJSAPIPay

func (*Client) JSAPIAlipayPlusPay

func (c *Client) JSAPIAlipayPlusPay(ctx context.Context, orderId, redirect string) (rsp *ErrorCode, err error)

Alipay+ JSAPI支付跳转页 文档:https://payjp.lakala.com/docs/cn/#api-JSApi-ApsJSAPIPAY

func (*Client) JSAPIWechatPay

func (c *Client) JSAPIWechatPay(ctx context.Context, orderId, redirect string, directPay bool) (rsp *ErrorCode, err error)

微信JSAPI支付跳转页 文档:https://payjp.lakala.com/docs/cn/#api-JSApi-WxJSAPIPay

func (*Client) ModifyReportSeparate

func (c *Client) ModifyReportSeparate(ctx context.Context, partnerReportId, partnerSubReportId string, bm gopay.BodyMap) (rsp *ReportRsp, err error)

修改报关信息(拆单) 文档:https://payjp.lakala.com/docs/cn/#api-Custom-declare_modify_separate

func (*Client) ModifyReportSingle

func (c *Client) ModifyReportSingle(ctx context.Context, partnerReportId string, bm gopay.BodyMap) (rsp *ReportRsp, err error)

修改报关信息(非拆单) 文档:https://payjp.lakala.com/docs/cn/#api-Custom-declare_modify_single

func (*Client) OrderList

func (c *Client) OrderList(ctx context.Context, date, status string, page, limit int) (rsp *OrderListRsp, err error)

查看订单 文档:https://payjp.lakala.com/docs/cn/#api-CommonApi-ListOrder

func (*Client) OrderStatus

func (c *Client) OrderStatus(ctx context.Context, orderId string) (rsp *OrdersRsp, err error)

查询订单状态 文档:https://payjp.lakala.com/docs/cn/#api-CommonApi-OrderStatus

func (*Client) QRCodePay

func (c *Client) QRCodePay(ctx context.Context, orderId, redirect string) (rsp *ErrorCode, err error)

QRCode支付跳转页 文档:https://payjp.lakala.com/docs/cn/#api-QRCode-QRCodePay

func (*Client) RefundQuery

func (c *Client) RefundQuery(ctx context.Context, orderId string, refundId string) (rsp *RefundRsp, err error)

查询退款状态 文档:https://payjp.lakala.com/docs/cn/#api-CommonApi-RefundQuery

func (*Client) ReportStatus

func (c *Client) ReportStatus(ctx context.Context, partnerReportId string) (rsp *ReportRsp, err error)

报关状态查询 文档:https://payjp.lakala.com/docs/cn/#api-Custom-declare_query_single

func (*Client) ReportSubStatus

func (c *Client) ReportSubStatus(ctx context.Context, partnerReportId, partnerSubReportId string) (rsp *ReportRsp, err error)

报关子单状态查询 文档:https://payjp.lakala.com/docs/cn/#api-Custom-declare_query_separate

func (*Client) ResendReportSeparate

func (c *Client) ResendReportSeparate(ctx context.Context, partnerReportId, partnerSubReportId string) (rsp *ReportRsp, err error)

报关单子单重推 文档:https://payjp.lakala.com/docs/cn/#api-Custom-declare_resend_separate

func (*Client) ResendReportSingle

func (c *Client) ResendReportSingle(ctx context.Context, partnerReportId string) (rsp *ReportRsp, err error)

重推报关(非拆单) 文档:https://payjp.lakala.com/docs/cn/#api-Custom-declare_resend_single

func (*Client) SetBodySize

func (c *Client) SetBodySize(sizeMB int)

SetBodySize 设置http response body size(MB)

func (*Client) Settlements

func (c *Client) Settlements(ctx context.Context, date string) (rsp *SettlementsRsp, err error)

查看清算详情 文档:https://payjp.lakala.com/docs/cn/#api-CommonApi-SettleLog

func (*Client) TransactionList

func (c *Client) TransactionList(ctx context.Context, date string) (rsp *TransactionListRsp, err error)

查看账单流水 文档:https://payjp.lakala.com/docs/cn/#api-CommonApi-ListTransaction

type Config

type Config struct {
	PartnerCode    string `toml:"PartnerCode"`    //partner_code:商户编码,由4~6位大写字母或数字构成
	CredentialCode string `toml:"credentialCode"` //credential_code:系统为商户分配的开发校验码,请妥善保管,不要在公开场合泄露
	AppId          string `toml:"appId"`          //微信appid,微信通道要求必填
	IsProd         bool   `toml:"isProd"`         //是否正式环境,沙盒
	NotifyUrl      string `toml:"notifyUrl"`      //支付回调地址
	Redirect       string `toml:"redirect"`       //可选参数。支付成功后跳转回商户APP的页面地址。
	Version        string `toml:"version"`        //客户端版本号,可选参数
}

配置结构

type ConsultPaymentRsp

type ConsultPaymentRsp struct {
	ErrorCode
	SubChannels []*SubChannel `json:"sub_channels,omitempty"`
}

type EncryptRsp

type EncryptRsp struct {
	ErrorCode
	PublicKey   string `json:"public_key,omitempty"`   // 公钥信息
	EncryptType string `json:"encrypt_type,omitempty"` // 加密类型(目前仅支持RSA)
	KeyId       string `json:"key_id,omitempty"`       // 密钥ID
	Expire      int64  `json:"expire,omitempty"`       // 过期时间(13位毫秒时间戳)
}

type ErrorCode

type ErrorCode struct {
	ReturnCode string `json:"return_code,omitempty"` // 执行结果
	ResultCode string `json:"result_code,omitempty"` // SUCCESS表示成功
	ReturnMsg  string `json:"return_msg,omitempty"`  // 返回错误信息
}

type ExchangeRateRsp

type ExchangeRateRsp struct {
	ErrorCode
	WechatRate       float64 `json:"wechat_rate,omitempty"`        // 微信汇率
	AlipayRetailRate float64 `json:"alipay_retail_rate,omitempty"` // 支付宝线下渠道汇率
	AlipayOnlineRate float64 `json:"alipay_online_rate,omitempty"` // 支付宝线上渠道汇率
}

type GetCouponRsp

type GetCouponRsp struct {
	Res           string `json:"res,omitempty"`
	AvailableTime string `json:"available_time,omitempty"`
	VoucherNum    string `json:"voucher_num,omitempty"`
	EndTime       string `json:"end_time,omitempty"`
	Discount      string `json:"discount,omitempty"`
	Title         string `json:"title,omitempty"`
	State         string `json:"state,omitempty"`
	Type          string `json:"type,omitempty"`
	IsValidNow    string `json:"is_valid_now,omitempty"`
	AvailableWeek string `json:"available_week,omitempty"`
	BeginAmount   string `json:"begin_amount,omitempty"`
}

type NotifyRequest

type NotifyRequest struct {
	Time           string  `json:"time,omitempty"`             // UTC时间戳
	NonceStr       string  `json:"nonce_str,omitempty"`        // 随机字符串
	Sign           string  `json:"sign,omitempty"`             // 签名
	PartnerOrderId string  `json:"partner_order_id,omitempty"` // 商户订单ID
	OrderId        string  `json:"order_id,omitempty"`         // Lakala订单ID
	ChannelOrderId string  `json:"channel_order_id,omitempty"` // 渠道方(微信、支付宝等)流水号ID
	TotalFee       int     `json:"total_fee,omitempty"`        // 订单金额,单位是货币最小面值单位
	RealFee        int     `json:"real_fee,omitempty"`         // 实际支付金额,单位是货币最小面值单位(目前等于订单金额,为卡券预留)
	Rate           float64 `json:"rate,omitempty"`             // 交易时使用的汇率,1JPY=?CNY,只有支付成功时返回,若渠道未提供汇率,会返回1.0
	CustomerId     string  `json:"customer_id,omitempty"`      // 客户ID
	Currency       string  `json:"currency,omitempty"`         // 币种 (JPY/CNY)
	Channel        string  `json:"channel,omitempty"`          // 支付渠道 Alipay|支付宝、Wechat|微信、AlipayOnline|支付宝线上、Alipay+、日系QR*、UnionPay|银联,若订单未确定渠道则不返回
	CreateTime     string  `json:"create_time,omitempty"`      // 订单创建时间(最新订单为准)(yyyy-MM-dd HH:mm:ss,GMT+9)
	PayTime        string  `json:"pay_time,omitempty"`         // 支付时间(yyyy-MM-dd HH:mm:ss,GMT+9),只有支付成功时返回
	System         string  `json:"system,omitempty"`
	PaymentId      string  `json:"payment_id,omitempty"`
	PayType        string  `json:"pay_type,omitempty"` // 支付钱包类型(日系QR* /Alipay+存在)
}

CommonApi - 付款通知

func ParseNotify

func ParseNotify(req *http.Request) (notifyReq *NotifyRequest, err error)

付款通知 文档:https://payjp.lakala.com/docs/cn/#api-CommonApi-PayNotice

type OrderData

type OrderData struct {
	OrderId        string `json:"order_id,omitempty"`         // Lakala订单ID
	PartnerOrderId string `json:"partner_order_id,omitempty"` // 商户订单ID
	TotalFee       int    `json:"total_fee,omitempty"`        // 订单金额,单位是货币最小面值单位
	RealFee        int    `json:"real_fee,omitempty"`         // 实际支付金额,单位是货币最小面值单位(目前等于订单金额,为卡券预留)
	Channel        string `json:"channel,omitempty"`          // 支付渠道 Alipay|支付宝、Wechat|微信、AlipayOnline|支付宝线上、Alipay+、日系QR*、UnionPay|银联,若订单未确定渠道则不返回
	Currency       string `json:"currency,omitempty"`         // 币种,通常为JPY
	PayTime        string `json:"pay_time,omitempty"`         // 支付时间(yyyy-MM-dd HH:mm:ss,GMT+9),只有支付成功时返回
	CreateTime     string `json:"create_time,omitempty"`      // 订单创建时间(最新订单为准)(yyyy-MM-dd HH:mm:ss,GMT+9)
	Status         string `json:"status,omitempty"`           // 订单状态
	OrderBody      string `json:"order_body,omitempty"`       // 订单标题
	Gateway        string `json:"gateway,omitempty"`          // 订单模式
	PartnerCode    string `json:"partner_code,omitempty"`     // 商户编码
	PartnerName    string `json:"partner_name,omitempty"`     // 商户名称
	RefundFee      string `json:"refund_fee,omitempty"`       // 当前订单退款金额,货币最小单位
}

type OrderListRsp

type OrderListRsp struct {
	ErrorCode
	Data       []*OrderData `json:"data,omitempty"`       // 订单列表
	Pagination Pagination   `json:"pagination,omitempty"` // 分页信息
	Analysis   Analysis     `json:"analysis,omitempty"`   // 分析信息
}

type OrdersRsp

type OrdersRsp struct {
	ErrorCode
	OrderId             string  `json:"order_id,omitempty"`              // Lakala订单ID
	PartnerOrderId      string  `json:"partner_order_id,omitempty"`      // 商户订单ID
	ChannelOrderId      string  `json:"channel_order_id,omitempty"`      // 渠道方(微信、支付宝等)流水号ID,只有支付成功时返回
	TotalFee            int     `json:"total_fee,omitempty"`             // 订单金额,单位是货币最小面值单位
	RealFee             int     `json:"real_fee,omitempty"`              // 实际支付金额,单位是货币最小面值单位(目前等于订单金额,为卡券预留)
	Rate                float64 `json:"rate,omitempty"`                  // 交易时使用的汇率,1JPY=?CNY,只有支付成功时返回,若渠道未提供汇率,会返回1.0
	CustomerId          string  `json:"customer_id,omitempty"`           // 客户ID,若渠道未提供则不存在
	PayTime             string  `json:"pay_time,omitempty"`              // 支付时间(yyyy-MM-dd HH:mm:ss,GMT+9),只有支付成功时返回
	CreateTime          string  `json:"create_time,omitempty"`           // 订单创建时间(最新订单为准)(yyyy-MM-dd HH:mm:ss,GMT+9)
	Currency            string  `json:"currency,omitempty"`              // 币种,通常为JPY
	Channel             string  `json:"channel,omitempty"`               // 支付渠道 Alipay|支付宝、Wechat|微信、AlipayOnline|支付宝线上、Alipay+、日系QR*、UnionPay|银联,若订单未确定渠道则不返回
	PayType             string  `json:"pay_type,omitempty"`              // 支付钱包类型(日系QR* /Alipay+存在)
	OrderDescription    string  `json:"order_description,omitempty"`     // 备注
	ChannelErrorCode    string  `json:"channel_error_code,omitempty"`    // 渠道错误码,订单提交失败、支付失败或已关闭时存在
	ChannelErrorMessage string  `json:"channel_error_message,omitempty"` // 渠道错误描述,订单提交失败、支付失败或已关闭时存在
	MerchantAppId       string  `json:"merchant_app_id,omitempty"`       // 小程序/开放平台APPID,微信小程序或微信SDK订单且支付完成时存在
	MerchantCustomerId  string  `json:"merchant_customer_id,omitempty"`  // 小程序关联消费者openid,微信小程序或微信SDK订单且支付完成时存在
}

type Pagination

type Pagination struct {
	Page       int `json:"page,omitempty"`       // 当前页码
	Limit      int `json:"limit,omitempty"`      // 每页条数
	TotalCount int `json:"totalCount,omitempty"` // 总条数
	TotalPages int `json:"totalPages,omitempty"` // 总页数
}

type PaymentRsp

type PaymentRsp struct {
	ErrorCode
	Channel        string `json:"channel,omitempty"`          // 支付渠道 允许值: Alipay, Alipay+, Wechat, UnionPay
	PartnerCode    string `json:"partner_code,omitempty"`     // 商户编码
	FullName       string `json:"full_name,omitempty"`        // 商户注册全名
	PartnerName    string `json:"partner_name,omitempty"`     // 商户名称
	OrderId        string `json:"order_id,omitempty"`         // Lakala订单ID
	PartnerOrderId string `json:"partner_order_id,omitempty"` // 商户订单ID
	CodeUrl        string `json:"code_url,omitempty"`         // 支付码链接,商户可以据此自行生成二维码
	QrcodeImg      string `json:"qrcode_img,omitempty"`       // Base64封装的二维码图片,可直接作为img的src属性
	PayUrl         string `json:"pay_url,omitempty"`          // 跳转URL
	SdkParams      string `json:"sdk_params,omitempty"`       // NativeJsapi、小程序支付所需参数(Json字符串)
}

type RefundRsp

type RefundRsp struct {
	ErrorCode
	RefundId        string `json:"refund_id,omitempty"`         // Lakala退款单号
	PartnerRefundId string `json:"partner_refund_id,omitempty"` // 商户提交的退款单号
	Amount          int    `json:"amount,omitempty"`            // 退款金额,单位是货币最小单位
	Currency        string `json:"currency,omitempty"`          // 币种,通常为JPY
}

type ReportRsp

type ReportRsp struct {
	ErrorCode
	Reports []*ReportSub `json:"reports,omitempty"`
}

type ReportSub

type ReportSub struct {
	ReportId                string `json:"report_id,omitempty"` // Lakala海关单号
	PartnerReportId         string `json:"partner_report_id,omitempty"`
	Status                  string `json:"status,omitempty"`
	Channel                 string `json:"channel,omitempty"`
	ChannelReportId         string `json:"channel_report_id,omitempty"`
	PartnerSubReportId      string `json:"partner_sub_report_id,omitempty"`
	ChannelSubReportId      string `json:"channel_sub_report_id,omitempty"`
	Customs                 string `json:"customs,omitempty"`
	MchCustomsNo            string `json:"mch_customs_no,omitempty"`
	MchCustomsName          string `json:"mch_customs_name,omitempty"`
	OrderId                 string `json:"order_id,omitempty"`
	TransactionId           string `json:"transaction_id,omitempty"`
	OrderCurrency           string `json:"order_currency,omitempty"`
	OrderAmount             int    `json:"order_amount,omitempty"`
	SubOrderFee             int    `json:"sub_order_fee,omitempty"`
	SubProductFee           int    `json:"sub_product_fee,omitempty"`
	SubTransportFee         int    `json:"sub_transport_fee,omitempty"`
	CreationDate            string `json:"creation_date,omitempty"`
	LastUpdateDate          string `json:"last_update_date,omitempty"`
	VerifyDepartment        string `json:"verify_department,omitempty"`
	VerifyDepartmentTradeId string `json:"verify_department_trade_id,omitempty"`
	ErrorCode               string `json:"error_code,omitempty"`
	ErrorMsg                string `json:"error_msg,omitempty"`
}

type RetailPayRsp

type RetailPayRsp struct {
	ErrorCode
	OrderId             string `json:"order_id,omitempty"`              // Lakala订单ID
	PartnerOrderId      string `json:"partner_order_id,omitempty"`      // 商户订单ID
	TotalFee            int    `json:"total_fee,omitempty"`             // 订单金额,单位是货币最小面值单位
	RealFee             int    `json:"real_fee,omitempty"`              // 实际支付金额,单位是货币最小面值单位(目前等于订单金额,为卡券预留)
	PayTime             string `json:"pay_time,omitempty"`              // 支付时间(yyyy-MM-dd HH:mm:ss,GMT+9),只有支付成功时返回
	CreateTime          string `json:"create_time,omitempty"`           // 订单创建时间(最新订单为准)(yyyy-MM-dd HH:mm:ss,GMT+9)
	Currency            string `json:"currency,omitempty"`              // 币种 (JPY/CNY)
	Channel             string `json:"channel,omitempty"`               // 支付渠道 Alipay|支付宝、Wechat|微信、AlipayOnline|支付宝线上、Alipay+、日系QR*、UnionPay|银联,若订单未确定渠道则不返回
	OrderDescription    string `json:"order_description,omitempty"`     // 备注
	ChannelErrorCode    string `json:"channel_error_code,omitempty"`    // 渠道错误码,订单提交失败、支付失败或已关闭时存在
	ChannelErrorMessage string `json:"channel_error_message,omitempty"` // 渠道错误描述,订单提交失败、支付失败或已关闭时存在
}

type SettlementsRsp

type SettlementsRsp struct {
	ErrorCode
	SettleFrom       string         `json:"settle_from,omitempty"`
	SettleTo         string         `json:"settle_to,omitempty"`
	SettleDays       string         `json:"settle_days,omitempty"`
	TransactionCount int            `json:"transaction_count,omitempty"` // 流水总条目
	OrderCount       int            `json:"order_count,omitempty"`       // 付款单数
	RefundCount      int            `json:"refund_count,omitempty"`      // 退款单数
	TotalCredit      int            `json:"total_credit,omitempty"`
	TotalDebit       int            `json:"total_debit,omitempty"`
	TotalSurcharge   int            `json:"total_surcharge,omitempty"`
	TotalTransfer    int            `json:"total_transfer,omitempty"`
	Transactions     []*Transaction `json:"transactions,omitempty"` // 流水列表
}

type SubChannel

type SubChannel struct {
	SubChannel     string `json:"sub_channel,omitempty"`
	SubChannelName string `json:"sub_channel_name,omitempty"`
}

type Transaction

type Transaction struct {
	TransactionTime       string  `json:"transaction_time,omitempty"`        // 交易时间,格式yyyyMMddHHmmss,GMT+9
	OrderId               string  `json:"order_id,omitempty"`                // Lakala订单ID
	PartnerOrderId        string  `json:"partner_order_id,omitempty"`        // 商户订单ID
	ChannelOrderId        string  `json:"channel_order_id,omitempty"`        // 渠道方(微信、支付宝等)流水号ID,只有支付成功时返回
	RefundId              string  `json:"refund_id,omitempty"`               // Lakala退款单号
	PartnerRefundId       string  `json:"partner_refund_id,omitempty"`       // 商户提交的退款单号
	Gateway               string  `json:"gateway,omitempty"`                 // 下单接口
	Channel               string  `json:"channel,omitempty"`                 // 支付渠道 Alipay|支付宝、Wechat|微信、AlipayOnline|支付宝线上、Alipay+、日系QR*、UnionPay|银联,若订单未确定渠道则不返回
	Type                  string  `json:"type,omitempty"`                    // 流水类型
	Currency              string  `json:"currency,omitempty"`                // 币种,通常为JPY
	TotalAmount           int     `json:"total_amount,omitempty"`            // 订单总金额,单位是货币最小单位
	InputAmount           int     `json:"input_amount,omitempty"`            // 订单输入金额,单位是货币最小单位
	CustomerPaymentAmount int     `json:"customer_payment_amount,omitempty"` // 客户实际支付金额,单位是货币最小单位
	SettleAmount          int     `json:"settle_amount,omitempty"`           // 结算金额,币种为JPY,单位是货币最小单位
	SurchargeRate         string  `json:"surcharge_rate,omitempty"`          // 手续费费率(x%)
	Surcharge             int     `json:"surcharge,omitempty"`               // 手续费金额,单位是JPY分
	TransferAmount        int     `json:"transfer_amount,omitempty"`         // 打款金额,单位是JPY分
	ExchangeRate          float64 `json:"exchange_rate,omitempty"`           // 使用汇率
	Remark                string  `json:"remark,omitempty"`                  // 备注
}

type TransactionListRsp

type TransactionListRsp struct {
	ErrorCode
	TransactionCount int            `json:"transaction_count,omitempty"` // 流水总条目
	OrderCount       int            `json:"order_count,omitempty"`       // 付款单数
	RefundCount      int            `json:"refund_count,omitempty"`      // 退款单数
	Transactions     []*Transaction `json:"transactions,omitempty"`      // 流水列表
}

Jump to

Keyboard shortcuts

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