Payment gateway providers SDK Go for zarinpal, idpay, pay.ir, and other gateway providers.
go get -u github.com/GoFarsi/paygap
example for zarinpal provider (Other examples)
package main
import (
"context"
"fmt"
"log"
"github.com/GoFarsi/paygap/client"
"github.com/GoFarsi/paygap/providers/zarinpal"
)
func main() {
c := client.New()
z, err := zarinpal.New(c, "YOUR_MERCHANT_ID", false)
if err != nil {
log.Fatal(err)
}
resp, err := z.RequestPayment(context.Background(), 1000, "YOUR_CALL_BACK", "YOUR_CURRENCY", "description", nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(resp)
}
- fork project in your GitHub account.
- create new branch for new changes.
- after change code, send Pull Request.
- zarinpal
- idpay
- pay.ir
- payping
- vandar.io
- rayanpay
- nextpay
- mellat
- parsian
- pasargad
- sadad
- zibal