Package mahjson provides implementation of e-pay POS to Host JSON web services.
To start using mahjson, install Go and run go get
:
$ go get -u github.com/pnp200/mahjson
This will retrieve the library.
package main
import (
"fmt"
"github.com/pnp200/mahjson"
)
func main() {
url := "your test url"
publicKey := "your assigned public key"
privateKey := "your private key"
// Online PIN
pin, err := mahjson.NewClient(url, publicKey, privateKey)
if err != nil {
fmt.Println(err.Error())
return
}
pin.Amount = 5.00
pin.MerchantID = "201914"
pin.OperatorID = "SALE"
pin.TerminalID = "10000494"
pin.ProductCode = "TUNETALKST"
pin.TxnTraceID = 118205
pinResponse, err := pin.OnlinePIN()
if err != nil {
fmt.Println(err.Error())
}
fmt.Println(pinResponse)
}
- NetworkCheck
- OnlinePIN
- onlinePINReversal
- OnlinePINVoid
- Etopup
- etopupReversal
- EtopupVoid
- EtopupAccountInquiry
- EtopupTxnUpload
- Payment
- paymentReversal
- PaymentVoid
- PaymentRefund
- PaymentSeamless
- paymentSeamlessReversal
- PaymentSeamlessVoid
- PaymentSeamlessRefund
- PaymentAsynchronous
- PaymentQuery
- PaymentTxnUpload