Skip to content

Commit 562b714

Browse files
committed
add: api version to idpay, pay and zarinpal
1 parent b02fd8b commit 562b714

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

_example/idpay/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
func main() {
1212
c := client.New()
13-
i, err := idpay.New(c, "YOUR_API_KEY", false)
13+
i, err := idpay.New(c, "YOUR_API_KEY", true)
1414
if err != nil {
1515
log.Fatal(err)
1616
}

providers/idpay/idpay.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import (
1010
"reflect"
1111
)
1212

13+
const API_VERSION = "1.1"
14+
1315
const (
1416
IDPAY_HOST = "https://api.idpay.ir"
1517

providers/pay/pay.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import (
1111
"strconv"
1212
)
1313

14+
const API_VERSION = "1"
15+
1416
const (
1517
PAY_HOST = "https://pay.ir"
1618

providers/zarinpal/zarinpal.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import (
88
"net/http"
99
)
1010

11+
const API_VERSION = "4"
12+
1113
const (
1214
ZARINPAL_HOST = "https://api.zarinpal.com"
1315
ZARINPAL_SANDBOX_HOST = "https://sandbox.zarinpal.com"

0 commit comments

Comments
 (0)