Skip to content

Commit

Permalink
update mod name
Browse files Browse the repository at this point in the history
  • Loading branch information
rosbit committed Jun 3, 2019
1 parent 77a6fea commit 82f91bf
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 32 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

```bash
$ git clone https://github.com/rosbit/go-wxpay-gateway
$ cd go-wx-gateway
$ cd go-wxpay-gateway
$ make
```
3. 编译成功,会得到3个可执行程序
Expand Down
4 changes: 2 additions & 2 deletions getsandbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package main

import (
"github.com/rosbit/go-wxpay-gateway/wx-pay-api"
"github.com/rosbit/go-wxpay-gateway/conf"
"go-wxpay-gateway/wx-pay-api"
"go-wxpay-gateway/conf"
"fmt"
)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/rosbit/go-wxpay-gateway
module go-wxpay-gateway

go 1.12

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package main
import (
"os"
"fmt"
"github.com/rosbit/go-wxpay-gateway/conf"
"go-wxpay-gateway/conf"
)

// variables set via go build -ldflags
Expand Down
4 changes: 2 additions & 2 deletions notify-service.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ package main

import (
lm "github.com/rosbit/logmerger"
"github.com/rosbit/go-wxpay-gateway/conf"
"github.com/rosbit/go-wxpay-gateway/utils"
"go-wxpay-gateway/conf"
"go-wxpay-gateway/utils"
)

func StartService() error {
Expand Down
4 changes: 2 additions & 2 deletions rest/rest-close-order.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package rest

import (
"net/http"
"github.com/rosbit/go-wxpay-gateway/conf"
"github.com/rosbit/go-wxpay-gateway/wx-pay-api"
"go-wxpay-gateway/conf"
"go-wxpay-gateway/wx-pay-api"
)

// POST /queryorder
Expand Down
6 changes: 3 additions & 3 deletions rest/rest-notify.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"fmt"
"log"
"io/ioutil"
"github.com/rosbit/go-wxpay-gateway/conf"
"github.com/rosbit/go-wxpay-gateway/wx-pay-api"
"github.com/rosbit/go-wxpay-gateway/utils"
"go-wxpay-gateway/conf"
"go-wxpay-gateway/wx-pay-api"
"go-wxpay-gateway/utils"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions rest/rest-pay.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"net/http"
"fmt"
"encoding/json"
"github.com/rosbit/go-wxpay-gateway/conf"
"github.com/rosbit/go-wxpay-gateway/wx-pay-api"
"go-wxpay-gateway/conf"
"go-wxpay-gateway/wx-pay-api"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions rest/rest-query-order.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package rest

import (
"net/http"
"github.com/rosbit/go-wxpay-gateway/conf"
"github.com/rosbit/go-wxpay-gateway/wx-pay-api"
"go-wxpay-gateway/conf"
"go-wxpay-gateway/wx-pay-api"
)

// POST /queryorder
Expand Down
4 changes: 2 additions & 2 deletions rest/rest-refund.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package rest

import (
"net/http"
"github.com/rosbit/go-wxpay-gateway/conf"
"github.com/rosbit/go-wxpay-gateway/wx-pay-api"
"go-wxpay-gateway/conf"
"go-wxpay-gateway/wx-pay-api"
)

// POST /refundment
Expand Down
14 changes: 5 additions & 9 deletions rest/sandbox-utils.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
package rest

import (
"strings"
)

const (
SANDBOX_SUFFIX = "-dev" // pay-app名称有该后缀,表示使用sandbox方式
)

func _IsSandbox(payApp string) (isSandbox bool) {
sl := len(SANDBOX_SUFFIX)
al := len(payApp)
if al <= sl {
return false
}
if payApp[al-sl:] == SANDBOX_SUFFIX {
return true
}
return false
return strings.HasSuffix(payApp, SANDBOX_SUFFIX)
}
8 changes: 4 additions & 4 deletions router-gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
"github.com/gernest/alien"
"net/http"
"fmt"
"github.com/rosbit/go-wxpay-gateway/conf"
"github.com/rosbit/go-wxpay-gateway/rest"
"github.com/rosbit/go-wxpay-gateway/wx-pay-api"
"github.com/rosbit/go-wxpay-gateway/utils"
"go-wxpay-gateway/conf"
"go-wxpay-gateway/rest"
"go-wxpay-gateway/wx-pay-api"
"go-wxpay-gateway/utils"
)

func StartService() error {
Expand Down
2 changes: 1 addition & 1 deletion utils/notify-service.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"strconv"
"time"
"log"
"github.com/rosbit/go-wxpay-gateway/conf"
"go-wxpay-gateway/conf"
)

const (
Expand Down

0 comments on commit 82f91bf

Please sign in to comment.