ali_pay.go 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. package gopay
  2. type aliPayClient struct {
  3. AppId string
  4. MchId string
  5. secretKey string
  6. Params *AliPayParams
  7. isProd bool
  8. }
  9. //初始化支付宝客户端
  10. // appId:应用ID
  11. // mchID:商户ID
  12. // isProd:是否是正式环境
  13. // secretKey:key,(当isProd为true时,此参数必传;false时,此参数为空)
  14. func NewAlipayClient(appId, mchId string, isProd bool, secretKey ...string) *aliPayClient {
  15. client := new(aliPayClient)
  16. client.AppId = appId
  17. client.MchId = mchId
  18. client.isProd = isProd
  19. if isProd && len(secretKey) > 0 {
  20. client.secretKey = secretKey[0]
  21. }
  22. return client
  23. }
  24. //统一下单
  25. func (this aliPayClient) UnifiedOrder() {
  26. }
  27. //查询订单
  28. func (this aliPayClient) QueryOrder() {
  29. }
  30. //关闭订单
  31. func (this aliPayClient) CloseOrder() {
  32. }
  33. //申请退款
  34. func (this aliPayClient) Refund() {
  35. }
  36. //查询退款
  37. func (this aliPayClient) QueryRefund() {
  38. }
  39. //下载对账单
  40. func (this aliPayClient) DownloadBill() {
  41. }
  42. //下载资金账单
  43. func (this aliPayClient) DownloadFundFlow() {
  44. }
  45. //拉取订单评价数据
  46. func (this aliPayClient) BatchQueryComment() {
  47. }