Documentation ¶
Index ¶
- func VerifySign(notifyReq *NotifyRequest, partnerCode string, credentialCode string) (err error)
- type Analysis
- type Client
- func (c *Client) ApplyRefund(ctx context.Context, orderId string, refundId string, bm gopay.BodyMap) (rsp *RefundRsp, err error)
- func (c *Client) CloseOrder(ctx context.Context, orderId string) (rsp *ErrorCode, err error)
- func (c *Client) ConsultPayment(ctx context.Context, bm gopay.BodyMap) (rsp *ConsultPaymentRsp, err error)
- func (c *Client) CreateH5PayOrder(ctx context.Context, orderId string, bm gopay.BodyMap) (rsp *PaymentRsp, err error)
- func (c *Client) CreateJSAPIOrder(ctx context.Context, orderId string, bm gopay.BodyMap) (rsp *PaymentRsp, err error)
- func (c *Client) CreateMiniProgramOrder(ctx context.Context, orderId string, bm gopay.BodyMap) (rsp *PaymentRsp, err error)
- func (c *Client) CreateNativeJSApiOrder(ctx context.Context, orderId string, bm gopay.BodyMap) (rsp *PaymentRsp, err error)
- func (c *Client) CreateNativeQRCodeOrder(ctx context.Context, orderId string, bm gopay.BodyMap) (rsp *PaymentRsp, err error)
- func (c *Client) CreateQRCodeOrder(ctx context.Context, orderId string, bm gopay.BodyMap) (rsp *PaymentRsp, err error)
- func (c *Client) CreateReportSeparate(ctx context.Context, partnerReportId, partnerSubReportId string, ...) (rsp *ReportRsp, err error)
- func (c *Client) CreateReportSingle(ctx context.Context, partnerReportId string, bm gopay.BodyMap) (rsp *ReportRsp, err error)
- func (c *Client) CreateRetailOrder(ctx context.Context, orderId string, bm gopay.BodyMap) (rsp *RetailPayRsp, err error)
- func (c *Client) CreateRetailQRCodeOrder(ctx context.Context, orderId string, bm gopay.BodyMap) (rsp *PaymentRsp, err error)
- func (c *Client) CreateSDKPaymentOrder(ctx context.Context, orderId string, bm gopay.BodyMap) (rsp *PaymentRsp, err error)
- func (c *Client) CreateWebGatewayOrder(ctx context.Context, orderId string, bm gopay.BodyMap) (rsp *PaymentRsp, err error)
- func (c *Client) GetCoupon(ctx context.Context, couponId string) (rsp *GetCouponRsp, err error)
- func (c *Client) GetEncrypt(ctx context.Context) (rsp *EncryptRsp, err error)
- func (c *Client) GetExchangeRate(ctx context.Context) (rsp *ExchangeRateRsp, err error)
- func (c *Client) H5AlipayPlusPay(ctx context.Context, orderId, redirect string) (rsp *ErrorCode, err error)
- func (c *Client) H5Pay(ctx context.Context, orderId, redirect string) (rsp *ErrorCode, err error)
- func (c *Client) JSAPIAlipayPay(ctx context.Context, orderId, redirect string, directPay bool) (rsp *ErrorCode, err error)
- func (c *Client) JSAPIAlipayPlusPay(ctx context.Context, orderId, redirect string) (rsp *ErrorCode, err error)
- func (c *Client) JSAPIWechatPay(ctx context.Context, orderId, redirect string, directPay bool) (rsp *ErrorCode, err error)
- func (c *Client) ModifyReportSeparate(ctx context.Context, partnerReportId, partnerSubReportId string, ...) (rsp *ReportRsp, err error)
- func (c *Client) ModifyReportSingle(ctx context.Context, partnerReportId string, bm gopay.BodyMap) (rsp *ReportRsp, err error)
- func (c *Client) OrderList(ctx context.Context, date, status string, page, limit int) (rsp *OrderListRsp, err error)
- func (c *Client) OrderStatus(ctx context.Context, orderId string) (rsp *OrdersRsp, err error)
- func (c *Client) QRCodePay(ctx context.Context, orderId, redirect string) (rsp *ErrorCode, err error)
- func (c *Client) RefundQuery(ctx context.Context, orderId string, refundId string) (rsp *RefundRsp, err error)
- func (c *Client) ReportStatus(ctx context.Context, partnerReportId string) (rsp *ReportRsp, err error)
- func (c *Client) ReportSubStatus(ctx context.Context, partnerReportId, partnerSubReportId string) (rsp *ReportRsp, err error)
- func (c *Client) ResendReportSeparate(ctx context.Context, partnerReportId, partnerSubReportId string) (rsp *ReportRsp, err error)
- func (c *Client) ResendReportSingle(ctx context.Context, partnerReportId string) (rsp *ReportRsp, err error)
- func (c *Client) SetBodySize(sizeMB int)
- func (c *Client) Settlements(ctx context.Context, date string) (rsp *SettlementsRsp, err error)
- func (c *Client) TransactionList(ctx context.Context, date string) (rsp *TransactionListRsp, err error)
- type Config
- type ConsultPaymentRsp
- type EncryptRsp
- type ErrorCode
- type ExchangeRateRsp
- type GetCouponRsp
- type NotifyRequest
- type OrderData
- type OrderListRsp
- type OrdersRsp
- type Pagination
- type PaymentRsp
- type RefundRsp
- type ReportRsp
- type ReportSub
- type RetailPayRsp
- type SettlementsRsp
- type SubChannel
- type Transaction
- type TransactionListRsp
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 Client ¶
type Client struct { PartnerCode string // partner_code:商户编码,由4~6位大写字母或数字构成 IsProd bool // 是否生产环境 DebugSwitch gopay.DebugSwitch // 调试开关,是否打印日志 // contains filtered or unexported fields }
Client lakala
func NewClient ¶
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 ¶
关闭订单 文档: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 ¶
获取优惠券信息 文档: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 ¶
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 ¶
查询订单状态 文档: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 ¶
SetBodySize 设置http response body size(MB)
func (*Client) Settlements ¶
查看清算详情 文档: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 ExchangeRateRsp ¶
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 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 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 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"` // 流水列表 }