add readme
This commit is contained in:
parent
a63fe09f26
commit
10aac2cb31
|
|
@ -0,0 +1,21 @@
|
||||||
|
# SEP Payment Gateway Integration
|
||||||
|
|
||||||
|
A simple Go implementation for integrating with SEP (Shaparak Electronic Payment) gateway.
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
- Go 1.21 or higher
|
||||||
|
- Internet connection (for testing with SEP sandbox/production)
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
Before running the project, you need to configure the payment gateway credentials in `main.go`:
|
||||||
|
|
||||||
|
```go
|
||||||
|
config := service.Config{
|
||||||
|
PaymentGetToken: "https://sep.shaparak.ir/OnlinePG/OnlinePG",
|
||||||
|
PaymentVerifyURL: "https://sep.shaparak.ir/verifyTxnRandomSessionkey/ipg/VerifyTransaction",
|
||||||
|
PaymentReverseURL: "https://sep.shaparak.ir/verifyTxnRandomSessionkey/ipg/ReverseTransaction",
|
||||||
|
CallbackURL: "http://localhost:8070/api/callback",
|
||||||
|
Credential: "YOUR_TERMINAL_ID", // Replace with your Terminal ID
|
||||||
|
}
|
||||||
2
main.go
2
main.go
|
|
@ -10,7 +10,7 @@ func main() {
|
||||||
PaymentGetToken: "https://sep.shaparak.ir/OnlinePG/OnlinePG",
|
PaymentGetToken: "https://sep.shaparak.ir/OnlinePG/OnlinePG",
|
||||||
PaymentVerifyURL: "https://sep.shaparak.ir/verifyTxnRandomSessionkey/ipg/VerifyTransaction",
|
PaymentVerifyURL: "https://sep.shaparak.ir/verifyTxnRandomSessionkey/ipg/VerifyTransaction",
|
||||||
CallbackURL: "http://localhost:8070/api/callback",
|
CallbackURL: "http://localhost:8070/api/callback",
|
||||||
Credential: "15144433",
|
Credential: "000000",
|
||||||
}
|
}
|
||||||
|
|
||||||
paymentSvc := service.NewPaymentService(config)
|
paymentSvc := service.NewPaymentService(config)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue