Skip to content
rl404Public

About

Unofficial golang API wrapper for ovo.id.

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Repository files navigation

ovo-go

License: MIT GitHub tag (latest SemVer) Go Reference

ovo-go is unofficial golang API wrapper for OVO.

Features

  • Inquiry customer phone number
  • Create push-to-pay transaction
  • Create reversal push-to-pay transaction
  • Void transaction
  • Get transaction

Installation

go get github.com/rl404/ovo-go

Quick Start

package main

import (
    "log"

    "github.com/rl404/ovo-go"
)

func main() {
    // Prepare credentials.
    appID := "appID"
    key := "key123"
    tid := "123"
    mid := "123"
    merchantID := "123"
    storeCode := "ABC123"

    // Create ovo client.
    o := ovo.NewDefault(appID, key, tid, mid, merchantID, storeCode, ovo.Sandbox)

    // Create transaction.
    tx, code, err := o.GetStatus(ovo.GetStatusRequest{
        Amount:          10000,
        Phone:           "081234567890",
        MerchantInvoice: "invoice123",
        ReferenceNumber: 1,
        BatchNo:         1,
    })
    if err != nil {
        log.Println(code, err)
        return
    }

    log.Println(code, tx)
}

For more detail config and usage, please go to the documentation.

License

MIT License

Copyright (c) 2021 Axel

About

Unofficial golang API wrapper for ovo.id.

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages