蛋蛋星球-制度模式
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
679 B

  1. package lakala
  2. import (
  3. "os"
  4. "testing"
  5. "github.com/go-pay/gopay"
  6. "github.com/go-pay/xlog"
  7. )
  8. var (
  9. client *Client
  10. err error
  11. partnerCode = "xxxxxxx"
  12. credentialCode = "xxxxxxx"
  13. )
  14. func TestMain(m *testing.M) {
  15. // 初始化lakala户端
  16. // PartnerCode: 商户编码,由4~6位大写字母或数字构成
  17. // credentialCode: 系统为商户分配的开发校验码,请妥善保管,不要在公开场合泄露
  18. // isProd: 是否生产环境
  19. client, err = NewClient(partnerCode, credentialCode, false)
  20. if err != nil {
  21. xlog.Error(err)
  22. return
  23. }
  24. // 打开Debug开关,输出日志
  25. client.DebugSwitch = gopay.DebugOn
  26. os.Exit(m.Run())
  27. }