rave

package
v0.0.0-...-8685b06 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2018 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakePostRequest

func MakePostRequest(URL string, data map[string]interface{}) ([]byte, error)

MakePostRequest : make s post request with the Content-Type set to application/json

Types

type Rave

type Rave struct {
	Live bool
	// contains filtered or unexported fields
}

Rave : Base Rave type

func NewRave

func NewRave() Rave

NewRave : Constructor for Rave struct

func (Rave) CalculateIntegrityCheckSum

func (r Rave) CalculateIntegrityCheckSum(data map[string]interface{}) string

CalculateIntegrityCheckSum : Calculates the integrity checksum of the data required by the browser

func (Rave) Capture

func (r Rave) Capture(data map[string]interface{}) ([]byte, error)

Capture : Capture a preauthorized transaction

func (Rave) ChargeAccount

func (r Rave) ChargeAccount(data map[string]interface{}) ([]byte, error)

ChargeAccount : Charge a Local (Nigerian) or South African Bank Account

func (Rave) ChargeCard

func (r Rave) ChargeCard(chargeData map[string]interface{}) ([]byte, error)

ChargeCard : Sends a Card request and determine the validation flow to be used

func (Rave) Encrypt3Des

func (r Rave) Encrypt3Des(payload string) string

Encrypt3Des : Encrypts the data using 3Des encryption Go doesn't include ECB encryption in the standard library for security reasons reference: https://gist.github.com/cuixin/10612934

func (Rave) GetFees

func (r Rave) GetFees(data map[string]interface{}) ([]byte, error)

GetFees : Get fees to be charged for a particular amount/currency

func (Rave) GetPublicKey

func (r Rave) GetPublicKey() string

GetPublicKey : Get Rave Public key

func (Rave) GetSecretKey

func (r Rave) GetSecretKey() string

GetSecretKey : Get Rave Secret key

func (Rave) ListBanks

func (r Rave) ListBanks() ([]byte, error)

ListBanks : List Nigerian banks.

func (Rave) PreauthorizeCard

func (r Rave) PreauthorizeCard(chargeData map[string]interface{}) ([]byte, error)

PreauthorizeCard : This is just a wrapper arond the ChargeCard method that automatically sets "charge_type" to "preauth"

func (Rave) RefundOrVoidPreauth

func (r Rave) RefundOrVoidPreauth(data map[string]interface{}) ([]byte, error)

RefundOrVoidPreauth : Refund or void a captured amount

func (Rave) RefundTransaction

func (r Rave) RefundTransaction(data map[string]interface{}) ([]byte, error)

RefundTransaction : Refund direct charges

func (Rave) ValidateAccountCharge

func (r Rave) ValidateAccountCharge(data map[string]interface{}) ([]byte, error)

ValidateAccountCharge : Validate an account charge using OTP

func (Rave) ValidateCharge

func (r Rave) ValidateCharge(data map[string]interface{}) ([]byte, error)

ValidateCharge : Validate a card charge using OTP

func (Rave) VerifyTransaction

func (r Rave) VerifyTransaction(data map[string]interface{}) ([]byte, error)

VerifyTransaction : Verify a transaction using "flw_ref" or "tx_ref"

func (Rave) XrequeryTransactionVerification

func (r Rave) XrequeryTransactionVerification(data map[string]interface{}) ([]byte, error)

XrequeryTransactionVerification : verify a transaction using xrequery

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL