alipay_client.go 1.1 KB

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