Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.
/ go-idpay Public archive

Simple go wrapper for IDPay API

License

Notifications You must be signed in to change notification settings

haashemi/go-idpay

Repository files navigation

Go IDPay API Wrapper

Go Report Card Go Reference

Installation

go get github.com/haashemi/go-idpay

Usage

package main

import (
    "fmt"
    "github.com/haashemi/go-idpay"
)

func main() {
    // 1- create new idpay client
    idp := idpay.New("My-IDPay-APIKey")

    // 2- create new transaction
    tr, _ := idp.CreateTransaction(orderID, callbackURL, amount, nil)
    
    // 3- verify the transaction
    trInfo, _ := idp.VerifyTransaction(tr.ID, orderID)
}