igp-sep-example/main.go

21 lines
553 B
Go

package main
import (
"golang.project/gocasts/ipg-example/delivery/httphandler"
"golang.project/gocasts/ipg-example/service"
)
func main() {
config := service.Config{
PaymentGetToken: "https://sep.shaparak.ir/OnlinePG/OnlinePG",
PaymentVerifyURL: "https://sep.shaparak.ir/verifyTxnRandomSessionkey/ipg/VerifyTransaction",
CallbackURL: "http://localhost:8070/api/callback",
Credential: "000000",
}
paymentSvc := service.NewPaymentService(config)
handler := httphandler.NewHandler(paymentSvc)
handler.StartServer(":8070")
}