diff --git a/README.md b/README.md new file mode 100644 index 0000000..6f91ef8 --- /dev/null +++ b/README.md @@ -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 +} \ No newline at end of file diff --git a/main.go b/main.go index 36ae2af..e314a14 100644 --- a/main.go +++ b/main.go @@ -10,7 +10,7 @@ func main() { PaymentGetToken: "https://sep.shaparak.ir/OnlinePG/OnlinePG", PaymentVerifyURL: "https://sep.shaparak.ir/verifyTxnRandomSessionkey/ipg/VerifyTransaction", CallbackURL: "http://localhost:8070/api/callback", - Credential: "15144433", + Credential: "000000", } paymentSvc := service.NewPaymentService(config)