Documentation
¶
Index ¶
- Variables
- func CheckRequiredParameters(params map[string]interface{}, keys []string) error
- func GenerateRef() string
- func MakeGetRequest(url string, params map[string]string) (error error, response map[string]interface{})
- func MakePostRequest(data interface{}, url string) (error error, response map[string]interface{})
- func MapToJSON(mapData interface{}) []byte
- func VerifyChargeResponse(chargeResponse string) error
- func VerifyChargedAmount(apiChargedAmount, funcChargedAmount float64) error
- func VerifyCurrencyCode(apiCurrencyCode, funcCurrencyCode interface{}) error
- func VerifySuccessMessage(status string) error
- func VerifyTransactionReference(apiTransactionRef, funcTransactionRef interface{}) error
- type Account
- func (a Account) ChargeAccount(data AccountChargeData) (error error, response map[string]interface{})
- func (a Account) ValidateAccount(data AccountValidateData) (error error, response map[string]interface{})
- func (a Account) VerifyAccount(data AccountVerifyData) (error error, response map[string]interface{})
- type AccountCharge
- type AccountChargeData
- type AccountInterface
- type AccountResolveData
- type AccountValidate
- type AccountValidateData
- type AccountVerify
- type AccountVerifyData
- type AllTransfersGetter
- type BVN
- type BankTransfer
- type BankTransferData
- type Banktransfers
- type BaseUrlGetter
- type BillCategory
- type BillCategoryFilter
- type BillPaymentRequest
- type BillPaymentResponse
- type BillPayments
- func (b BillPayments) Create(req *BillPaymentRequest) (response BillPaymentResponse, err error)
- func (b BillPayments) GetBillCategories(filter ...BillCategoryFilter) (categories []BillCategory, err error)
- func (b BillPayments) Status(ref string) (response BillPaymentResponse, err error)
- func (b BillPayments) ValidateBillCategory(data *ValidationData) (response ValidationResponse, err error)
- type Billpayment
- type BulkPaymentData
- type BulkTransfer
- type BulkTransferStatus
- type Card
- func (c Card) ChargeCard(data CardChargeData) (error error, response map[string]interface{})
- func (c Card) SetupCharge(data CardChargeData) map[string]interface{}
- func (c Card) TokenizedCharge(data TokenizedChargeData) (error error, response map[string]interface{})
- func (c Card) ValidateCard(data CardValidateData) (error error, response map[string]interface{})
- func (c Card) VerifyCard(data CardVerifyData) (error error, response map[string]interface{})
- type CardCharge
- type CardChargeData
- type CardInterface
- type CardTokenized
- type CardValidate
- type CardValidateData
- type CardVerify
- type CardVerifyData
- type Create
- type CreateAcct
- type CreateAcctData
- type CreateData
- type CreateOrder
- type CreateOrderData
- type CreateRecipientData
- type CreateSubaccount
- type CreateSubaccountData
- type CustomerInfoData
- type DeleteRecipientData
- type DeleteSubaccount
- type Ebills
- type Encryptor
- type EndpointGetter
- type Fetch
- type FetchData
- type FetchRecipientsData
- type FetchSettlement
- type FetchSettlementData
- type FetchSubaccount
- type FlutterwaveOTP
- type FlyBuyData
- type Flybuy
- type Freeze
- type FreezeData
- type Fund
- type FundData
- type Get
- type GetData
- type Helpers
- type List
- type ListData
- type ListSettlementData
- type ListSubaccount
- type ListSubaccountData
- type OTPData
- type PaymentPlan
- func (p PaymentPlan) Cancel(id int) (error error, response map[string]interface{})
- func (p PaymentPlan) Create(data PaymentPlanData) (error error, response map[string]interface{})
- func (p PaymentPlan) Edit(id int, name string, status string) (error error, response map[string]interface{})
- func (p PaymentPlan) Fetch(id string) (error error, response map[string]interface{})
- func (p PaymentPlan) List() (error error, response map[string]interface{})
- type PaymentPlanData
- type Preauth
- func (p Preauth) CapturePreauth(data PreauthCaptureData) (error error, response map[string]interface{})
- func (p Preauth) ChargePreauth(data TokenizedChargeData) (error error, response map[string]interface{})
- func (p Preauth) RefundOrVoidPreauth(data PreauthRefundData) (error error, response map[string]interface{})
- func (p Preauth) VerifyPreauth(data CardVerifyData) (error error, response map[string]interface{})
- type PreauthCapture
- type PreauthCaptureData
- type PreauthCharge
- type PreauthInterface
- type PreauthRefundData
- type PreauthRefundOrVoid
- type PreauthVerify
- type PublickeyGetter
- type Rave
- func (r Rave) Encrypt(payload string) string
- func (r *Rave) Get(url string, params map[string]string, resp any) (err error)
- func (r Rave) GetBaseURL() string
- func (Rave) GetEndpoint(raveType string, action string) string
- func (r Rave) GetPublicKey() string
- func (r Rave) GetSecretKey() string
- func (r *Rave) Post(url string, params map[string]string, body, resp interface{}) (err error)
- type RaveBalanceGetter
- type Refund
- type RefundCharge
- type RefundData
- type RefundInterface
- type RequestsData
- type SecretkeyGetter
- type ServicepayData
- type ServicepayLoadData
- type SettlementInterface
- type Settlements
- type SinglePaymentData
- type SingleTransfer
- type SingleTransferGetter
- type Subaccount
- func (s Subaccount) CreateSubaccount(data CreateSubaccountData) (error error, response map[string]interface{})
- func (s Subaccount) DeleteSubaccount(id string) (error error, response map[string]interface{})
- func (s Subaccount) FetchSubaccount(id string) (error error, response map[string]interface{})
- func (s Subaccount) ListSubaccount(data ListSubaccountData) (error error, response map[string]interface{})
- type SubaccountInterface
- type Subscription
- func (s Subscription) Activate(id int) (error error, response map[string]interface{})
- func (s Subscription) Cancel(id int) (error error, response map[string]interface{})
- func (s Subscription) Fetch(id string) (error error, response map[string]interface{})
- func (s Subscription) List() (error error, response map[string]interface{})
- type TokenizedChargeData
- type TransRecipients
- func (t TransRecipients) CreateRecipient(data CreateRecipientData) (error error, response map[string]interface{})
- func (t TransRecipients) DeleteRecipient(data DeleteRecipientData) (error error, response map[string]interface{})
- func (t TransRecipients) Fetch(data FetchRecipientsData) (error error, response map[string]interface{})
- func (t TransRecipients) List() (error error, response map[string]interface{})
- type Transfer
- func (t Transfer) FetchAllTransfers(status string) (error error, response map[string]interface{})
- func (t Transfer) FetchTransfer(reference string) (error error, response map[string]interface{})
- func (t Transfer) GetBulkTransferStatus(batch_id string) (error error, response map[string]interface{})
- func (t Transfer) GetRaveBalance(currency string) (error error, response map[string]interface{})
- func (t Transfer) GetTransferFee(currency string) (error error, response map[string]interface{})
- func (t Transfer) InitiateBulkTransfer(paymentData BulkPaymentData) (error error, response map[string]interface{})
- func (t Transfer) InitiateSingleTransfer(paymentData SinglePaymentData) (error error, response map[string]interface{})
- func (t Transfer) ResolveAccount(account_data AccountResolveData) (error error, response map[string]interface{})
- type TransferFeeGetter
- type TransferHelpers
- type TransferInterface
- type UpdateOrder
- type UpdateOrderData
- type ValidationData
- type ValidationResponse
- type VerifyTransaction
- type VerifyTransactionData
- type Verifytransaction
- type Virtualaccount
- type Virtualcard
- type Virtualcards
- func (v Virtualcards) Create(data CreateData) (error error, response map[string]interface{})
- func (v Virtualcards) Fetch(data FetchData) (error error, response map[string]interface{})
- func (v Virtualcards) Freeze(data FreezeData) (error error, response map[string]interface{})
- func (v Virtualcards) Fund(data FundData) (error error, response map[string]interface{})
- func (v Virtualcards) Get(data GetData) (error error, response map[string]interface{})
- func (v Virtualcards) List(data ListData) (error error, response map[string]interface{})
- func (v Virtualcards) Withdraw(data WithdrawData) (error error, response map[string]interface{})
- type Withdraw
- type WithdrawData
Constants ¶
This section is empty.
Variables ¶
var Endpoints = map[string]map[string]string{
"card": {
"charge": "flwv3-pug/getpaidx/api/charge",
"validate": "flwv3-pug/getpaidx/api/validatecharge",
"verify": "flwv3-pug/getpaidx/api/v2/verify",
"chargeSavedCard": "flwv3-pug/getpaidx/api/tokenized/charge",
},
"preauth": {
"charge": "flwv3-pug/getpaidx/api/tokenized/preauth_charge",
"capture": "flwv3-pug/getpaidx/api/capture",
"refundorvoid": "flwv3-pug/getpaidx/api/refundorvoid",
},
"account": {
"charge": "flwv3-pug/getpaidx/api/charge",
"validate": "flwv3-pug/getpaidx/api/validate",
"verify": "flwv3-pug/getpaidx/api/v2/verify",
},
"payment_plan": {
"create": "v2/gpx/paymentplans/create",
"fetch": "v2/gpx/paymentplans/query",
"list": "v2/gpx/paymentplans/query",
"cancel": "v2/gpx/paymentplans/",
"edit": "v2/gpx/paymentplans/",
},
"subscriptions": {
"fetch": "v2/gpx/subscriptions/query",
"list": "v2/gpx/subscriptions/query",
"cancel": "v2/gpx/subscriptions/",
"activate": "v2/gpx/subscriptions/",
},
"subaccount": {
"create": "v2/gpx/subaccounts/create",
"list": "v2/gpx/subaccounts/",
"fetch": "v2/gpx/subaccounts/get",
"delete": "v2/gpx/subaccounts/delete",
},
"transfer": {
"initiate": "v2/gpx/transfers/create",
"bulk": "v2/gpx/transfers/create_bulk",
"fetch": "v2/gpx/transfers",
"fee": "v2/gpx/transfers/fee",
"balance": "v2/gpx/balance",
"accountVerification": "flwv3-pug/getpaidx/api/resolve_account",
},
"verify": {
"verify": "flwv3-pug/getpaidx/api/v2/verify",
},
"refund": {
"refund": "gpx/merchant/transactions/refund",
},
"mobilemoney": {
"charge": "flwv3-pug/getpaidx/api/charge",
},
"virtualcard": {
"create": "v2/services/virtualcards/new",
"list": "v2/services/virtualcards/search",
"get": "v2/services/virtualcards/get",
"terminate": "v2/services/virtualcards/",
"fund": "v2/services/virtualcards/fund",
"fetch": "v2/services/virtualcards/transactions",
"withdraw": "v2/services/virtualcards/withdraw",
"freeze": "v2/services/virtualcards/",
},
"bvn": {
"bvnverification": "v2/kyc/bvn/",
},
"virtualaccount": {
"virtualaccountnumber": "v2/banktransfers/accountnumbers",
},
"settlement": {
"list": "v2/merchant/settlements",
"fetch": "v2/merchant/settlements/",
},
"verifytransaction": {
"verify": "flwv3-pug/getpaidx/api/v2/verify",
},
"ebills": {
"createorder": "flwv3-pug/getpaidx/api/ebills/generateorder/",
"updateorder": "flwv3-pug/getpaidx/api/ebills/update/",
},
"Banktransfer": {
"charge": "flwv3-pug/getpaidx/api/charge",
},
"Beneficiaries": {
"list": "v2/gpx/transfers/beneficiaries",
"fetch": "v2/gpx/transfers/beneficiaries",
"create": "v2/gpx/transfers/beneficiaries/create",
"delete": "v2/gpx/transfers/beneficiaries/delete",
},
"Billspayments": {
"flybuy": "v2/services/confluence",
"categories": "v3/bill-categories",
"validate": "v3/bill-items/:item_code/validate",
"list": "/v3/bills",
"fetch": "/v3/bills",
"create": "/v3/bills",
},
"flutterwaveOTP": {
"otp": "v2/services/confluence",
},
}
Functions ¶
func CheckRequiredParameters ¶
Checks if all required parameters are present
func GenerateRef ¶
func GenerateRef() string
func MakeGetRequest ¶
func MakeGetRequest(url string, params map[string]string) (error error, response map[string]interface{})
Makes a get request to rave api
func MakePostRequest ¶
Makes a post request to rave api
func VerifyChargeResponse ¶
The Charge response should equal "00" or "0"
func VerifyChargedAmount ¶
The Charged Amount must be greater than or equal to the paid amount
func VerifyCurrencyCode ¶
func VerifyCurrencyCode(apiCurrencyCode, funcCurrencyCode interface{}) error
The Currency code must match
func VerifySuccessMessage ¶
The status should equal "success" for a succesful transaction
func VerifyTransactionReference ¶
func VerifyTransactionReference(apiTransactionRef, funcTransactionRef interface{}) error
Checks that the transaction reference(TxRef) match
Types ¶
type Account ¶
type Account struct {
Rave
}
func (Account) ChargeAccount ¶
func (a Account) ChargeAccount(data AccountChargeData) (error error, response map[string]interface{})
func (Account) ValidateAccount ¶
func (a Account) ValidateAccount(data AccountValidateData) (error error, response map[string]interface{})
Validates account charge using otp
func (Account) VerifyAccount ¶
func (a Account) VerifyAccount(data AccountVerifyData) (error error, response map[string]interface{})
Verifies the transaction, amount, and currency
type AccountCharge ¶
type AccountCharge interface {
ChargeAccount(data AccountChargeData) (error error, response map[string]interface{})
}
type AccountChargeData ¶
type AccountChargeData struct {
Cardno string `json:"cardno"`
Cvv string `json:"cvv"`
Accountbank string `json:"accountbank"`
Accountnumber string `json:"accountnumber"`
Paymenttype string `json:"payment_type"`
Amount float64 `json:"amount"`
Currency string `json:"currency"`
Country string `json:"country"`
Bvn string `json:"bvn"`
Passcode string `json:"passcode"`
CustomerPhone string `json:"customer_phone"`
Firstname string `json:"firstname"`
Lastname string `json:"lastname"`
Email string `json:"email"`
IP string `json:"IP"`
Txref string `json:"txRef"`
SuggestedAuth string `json:"suggested_auth"`
RedirectUrl string `json:"redirect_url"`
Subaccounts types.Slice `json:"subaccounts"`
DeviceFingerprint string `json:"device_fingerprint"`
Meta types.Slice `json:"meta"`
}
type AccountInterface ¶
type AccountInterface interface {
AccountCharge
AccountValidate
AccountVerify
}
type AccountResolveData ¶
type AccountValidate ¶
type AccountValidate interface {
ValidateAccount(data AccountValidateData) (error error, response map[string]interface{})
}
type AccountValidateData ¶
type AccountVerify ¶
type AccountVerify interface {
VerifyAccount(data AccountVerifyData) (error error, response map[string]interface{})
}
type AccountVerifyData ¶
type AllTransfersGetter ¶
type BankTransfer ¶
type BankTransfer interface {
BankTransfer(data BankTransferData) (error error, response map[string]interface{})
}
type BankTransferData ¶
type BankTransferData struct {
Pubkey string `json:"PBFPubKey"`
Currency string `json:"currency"`
Country string `json:"country"`
Amount string `json:"amount"`
Email string `json:"email"`
Phonenumber string `json:"phonenumber"`
Firstname string `json:"firstname"`
Lastname string `json:"lastname"`
IP string `json:"IP"`
Txref string `json:"txRef"`
Meta types.Slice `json:"meta"`
Subaccounts types.Slice `json:"subaccounts"`
Frequency int `json:"frequency"`
IsBankTransfer bool `json:"is_bank_transfer"`
IsPermanent int `json:"is_permanent"`
Narration string `json:"narration"`
Duration int `json:"duration"`
PaymentType string `json:"payment_type"`
}
type Banktransfers ¶
type Banktransfers struct {
Rave
}
func (Banktransfers) SetupCharge ¶
func (b Banktransfers) SetupCharge(data BankTransferData) map[string]interface{}
func (Banktransfers) Transfer ¶
func (b Banktransfers) Transfer(data BankTransferData) (error error, response map[string]interface{})
type BaseUrlGetter ¶
type BaseUrlGetter interface {
GetBaseUrl() string
}
BaseUrlGetter implements behaviour to get the base url (live or sandbox)
type BillCategory ¶
type BillCategory struct {
Id int `json:"id"`
BillerCode string `json:"biller_code"`
Name string `json:"name"`
DefaultCommission float64 `json:"default_commission"`
DateAdded time.Time `json:"date_added"`
Country string `json:"country"`
IsAirtime bool `json:"is_airtime"`
BillerName string `json:"biller_name"`
ItemCode string `json:"item_code"`
ShortName string `json:"short_name"`
Fee int `json:"fee"`
CommissionOnFee bool `json:"commission_on_fee"`
LabelName string `json:"label_name"`
Amount int `json:"amount"`
}
type BillCategoryFilter ¶
type BillCategoryFilter string
const ( Airtime BillCategoryFilter = "airtime" DataBundle BillCategoryFilter = "data_bundle" Power BillCategoryFilter = "power" Internet BillCategoryFilter = "internet" Toll BillCategoryFilter = "toll" Cable BillCategoryFilter = "cable" BillerCode BillCategoryFilter = "biller_code" )
type BillPaymentRequest ¶
type BillPaymentResponse ¶
type BillPaymentResponse struct {
PhoneNumber string `json:"phone_number"`
Amount int `json:"amount"`
Network string `json:"network"`
FlwRef string `json:"flw_ref"`
TxRef string `json:"tx_ref"`
Reference interface{} `json:"reference"`
Fee int `json:"fee"`
Currency *string `json:"currency"`
Extra interface{} `json:"extra"`
Token interface{} `json:"token"`
}
type BillPayments ¶
type BillPayments struct {
Rave
}
func (BillPayments) Create ¶
func (b BillPayments) Create(req *BillPaymentRequest) (response BillPaymentResponse, err error)
func (BillPayments) GetBillCategories ¶
func (b BillPayments) GetBillCategories(filter ...BillCategoryFilter) (categories []BillCategory, err error)
func (BillPayments) Status ¶
func (b BillPayments) Status(ref string) (response BillPaymentResponse, err error)
func (BillPayments) ValidateBillCategory ¶
func (b BillPayments) ValidateBillCategory(data *ValidationData) (response ValidationResponse, err error)
type Billpayment ¶
type Billpayment struct {
Rave
}
func (Billpayment) Bill ¶
func (b Billpayment) Bill(data FlyBuyData) (error error, response map[string]interface{})
type BulkPaymentData ¶
type BulkTransfer ¶
type BulkTransfer interface {
InitiateBulkTransfer(data BulkPaymentData) (error error, response map[string]interface{})
}
type BulkTransferStatus ¶
type Card ¶
type Card struct {
Rave
}
func (Card) ChargeCard ¶
func (c Card) ChargeCard(data CardChargeData) (error error, response map[string]interface{})
func (Card) SetupCharge ¶
func (c Card) SetupCharge(data CardChargeData) map[string]interface{}
func (Card) TokenizedCharge ¶
func (c Card) TokenizedCharge(data TokenizedChargeData) (error error, response map[string]interface{})
func (Card) ValidateCard ¶
func (c Card) ValidateCard(data CardValidateData) (error error, response map[string]interface{})
func (Card) VerifyCard ¶
func (c Card) VerifyCard(data CardVerifyData) (error error, response map[string]interface{})
type CardCharge ¶
type CardCharge interface {
ChargeCard(data CardChargeData) (error error, response map[string]interface{})
}
type CardChargeData ¶
type CardChargeData struct {
Cardno string `json:"cardno"`
Cvv string `json:"cvv"`
Expirymonth string `json:"expirymonth"`
Expiryyear string `json:"expiryyear"`
Pin string `json:"pin"`
Amount float64 `json:"amount"`
Currency string `json:"currency"`
Country string `json:"country"`
CustomerPhone string `json:"customer_phone"`
Firstname string `json:"firstname"`
Lastname string `json:"lastname"`
Email string `json:"email"`
Ip string `json:"IP"`
Txref string `json:"txRef"`
RedirectUrl string `json:"redirect_url"`
Subaccounts types.Slice `json:"subaccounts"`
DeviceFingerprint string `json:"device_fingerprint"`
Meta types.Slice `json:"meta"`
SuggestedAuth string `json:"suggested_auth"`
BillingZip string `json:"billingzip"`
BillingCity string `json:"billingcity"`
BillingAddress string `json:"billingaddress"`
BillingState string `json:"billingstate"`
BillingCountry string `json:"billingcountry"`
Chargetype string `json:"charge_type"`
}
type CardInterface ¶
type CardInterface interface {
CardCharge
CardValidate
CardVerify
CardTokenized
}
type CardTokenized ¶
type CardTokenized interface {
TokenizedCharge(data TokenizedChargeData) (error error, response map[string]interface{})
}
type CardValidate ¶
type CardValidate interface {
ValidateCard(data CardValidateData) (error error, response map[string]interface{})
}
type CardValidateData ¶
type CardVerify ¶
type CardVerify interface {
VerifyCard(data CardVerifyData) (error error, response map[string]interface{})
}
type CardVerifyData ¶
type Create ¶
type Create interface {
Create(data CreateData) (
error error,
response map[string]interface{},
)
}
type CreateAcct ¶
type CreateAcct interface {
Create(data CreateData) (error error, response map[string]interface{})
}
type CreateAcctData ¶
type CreateData ¶
type CreateData struct {
Currency string `json:"currency"`
Amount string `json:"amount"`
BillingName string `json:"billing_name"`
BillingAddress string `json:"billing_address"`
BillingCity string `json:"billing_city"`
BillingState string `json:"billing_state"`
BillingPostalCode string `json:"billing_postal_code"`
BillingCountry string `json:"billing_country"`
Seckey string `json:"seckey"`
CallbackURL string `json:"callback_url"`
}
type CreateOrder ¶
type CreateOrder interface {
Create(data CreateOrderData) (error error, response map[string]interface{})
}
type CreateOrderData ¶
type CreateOrderData struct {
Currency string `json:"currency"`
NumberOfUnits int `json:"numberofunits"`
Amount int `json:"amount"`
Narration string `json:"narration"`
Seckey string `json:"SECKEY"`
PhoneNumber string `json:"phonenumber"`
Email string `json:"email"`
Txref string `json:"txRef"`
IP string `json:"IP"`
Country string `json:"country"`
}
type CreateRecipientData ¶
type CreateSubaccount ¶
type CreateSubaccount interface {
CreateSubaccount(data CreateSubaccountData) (error error, response map[string]interface{})
}
type CreateSubaccountData ¶
type CreateSubaccountData struct {
AccountBank string `json:"account_bank"`
AccountNumber string `json:"account_number"`
BusinessName string `json:"business_name"`
BusinessEmail string `json:"business_email"`
BusinessContact string `json:"business_contact"`
BusinessMobile string `json:"business_mobile"`
BusinessContactMobile string `json:"business_contact_mobile"`
Seckey string `json:"seckey"`
Meta types.Slice `json:"meta"`
SplitType string `json:"split_type"`
SplitValue string `json:"split_value"`
}
type CustomerInfoData ¶
type DeleteRecipientData ¶
type DeleteSubaccount ¶
type Ebills ¶
type Ebills struct {
Rave
}
func (Ebills) CreateOrder ¶
func (e Ebills) CreateOrder(data CreateOrderData) (error error, response map[string]interface{})
func (Ebills) UpdateOrder ¶
func (e Ebills) UpdateOrder(data UpdateOrderData) (error error, response map[string]interface{})
type Encryptor ¶
type Encryptor interface {
Encrypt() string
}
Encryptor implements behaviour to encrypt payment payload with user secret key
type EndpointGetter ¶
EndpointGetter implements behaviour to get the endpoint needed for a particular action
type FetchRecipientsData ¶
type FetchSettlement ¶
type FetchSettlementData ¶
type FetchSubaccount ¶
type FlutterwaveOTP ¶
type FlutterwaveOTP struct {
Rave
}
type FlyBuyData ¶
type Flybuy ¶
type Flybuy interface {
Bill(data FlyBuyData) (error error, response map[string]interface{})
}
type FreezeData ¶
type Helpers ¶
type Helpers interface {
BaseUrlGetter
EndpointGetter
PublickeyGetter
SecretkeyGetter
Encryptor
}
type ListSettlementData ¶
type ListSubaccount ¶
type ListSubaccount interface {
ListSubaccount(data ListSubaccountData) (error error, response map[string]interface{})
}
type ListSubaccountData ¶
type OTPData ¶
type OTPData struct {
Service string `json:"service"`
ServiceMethod string `json:"service_method"`
ServiceVersion string `json:"service_version"`
ServiceChannel string `json:"service_channel`
ServicePayload ServicepayData `json:"service_payload"`
Seckey string `json:"secret_key"`
OtpExpiresInMins int `json:"otp_expires_in_minutes"`
SenderBusinessname string `json:"sender_business_name"`
SenderSameOTP bool `json:"send_same_otp"`
SenderAsIs int `json:"send_as_is"`
}
type PaymentPlan ¶
type PaymentPlan struct {
Rave
}
func (PaymentPlan) Cancel ¶
func (p PaymentPlan) Cancel(id int) (error error, response map[string]interface{})
func (PaymentPlan) Create ¶
func (p PaymentPlan) Create(data PaymentPlanData) (error error, response map[string]interface{})
func (PaymentPlan) Fetch ¶
func (p PaymentPlan) Fetch(id string) (error error, response map[string]interface{})
func (PaymentPlan) List ¶
func (p PaymentPlan) List() (error error, response map[string]interface{})
type PaymentPlanData ¶
type Preauth ¶
func (Preauth) CapturePreauth ¶
func (p Preauth) CapturePreauth(data PreauthCaptureData) (error error, response map[string]interface{})
func (Preauth) ChargePreauth ¶
func (p Preauth) ChargePreauth(data TokenizedChargeData) (error error, response map[string]interface{})
func (Preauth) RefundOrVoidPreauth ¶
func (p Preauth) RefundOrVoidPreauth(data PreauthRefundData) (error error, response map[string]interface{})
func (Preauth) VerifyPreauth ¶
func (p Preauth) VerifyPreauth(data CardVerifyData) (error error, response map[string]interface{})
type PreauthCapture ¶
type PreauthCapture interface {
CapturePreauth(data CardValidateData) (
error error,
response map[string]interface{},
)
}
type PreauthCaptureData ¶
type PreauthCharge ¶
type PreauthCharge interface {
ChargePreauth(data TokenizedChargeData) (
error error,
response map[string]interface{},
)
}
type PreauthInterface ¶
type PreauthInterface interface {
PreauthCharge
PreauthVerify
PreauthCapture
PreauthRefundOrVoid
}
type PreauthRefundData ¶
type PreauthRefundOrVoid ¶
type PreauthRefundOrVoid interface {
RefundOrVoidPreauth(data CardVerifyData) (
error error,
response map[string]interface{},
)
}
type PreauthVerify ¶
type PreauthVerify interface {
VerifyPreauth(data CardVerifyData) (
error error,
response map[string]interface{},
)
}
type PublickeyGetter ¶
type PublickeyGetter interface {
GetPublicKey() string
}
PublickeyGetter implements behaviour to get the developers public key
type Rave ¶
Rave base type
func (Rave) GetBaseURL ¶
gets the correct url for live and test mode
func (Rave) GetPublicKey ¶
gets the public key from the environment variable if set or from the Rave object
type RaveBalanceGetter ¶
type RaveBalanceGetter interface {
GetRaveBalance()
}
type Refund ¶
type Refund struct {
Rave
}
func (Refund) RefundTransaction ¶
func (r Refund) RefundTransaction(data RefundData) (error error, response map[string]interface{})
type RefundCharge ¶
type RefundCharge interface {
RefundTransaction(data RefundData) (error error, response map[string]interface{})
}
type RefundData ¶
type RefundInterface ¶
type RefundInterface interface {
RefundCharge
}
type RequestsData ¶
type SecretkeyGetter ¶
type SecretkeyGetter interface {
GetSecretKey() string
}
SecretkeyGetter implements behaviour to get the developers secret key
type ServicepayData ¶
type ServicepayData struct {
LenghtOfOTP int `json:"length_of_otp"`
SendOTPasCustomer bool `json:"send_otp_to_customer"`
CustomerInfo CustomerInfoData `json:"customer_info"`
Medium []string `json:"medium"`
TransactionRef string `json:"transaction_reference"`
}
type MediumData struct {
Whatsapp string `json:"whatsapp"`
SMS string `json:"sms"` TBC................................................................
Email string `json:"email"`
}
type ServicepayLoadData ¶
type ServicepayLoadData struct {
Country string `json:"Country"`
Amount int `json:"Amount"`
CustomerId string `json:"CustomerId"`
RecurringType int `json:"RecurringType"`
IsAirtime bool `json:"IsAirtime"`
BillerName string `json:"BillerName"`
Reference string `json:"Reference"`
BatchRef string `json:"BatchReference"`
CallBackURL string `json:"CallBackUrl"`
Requests []RequestsData `json:"Requests"`
}
type SettlementInterface ¶
type Settlements ¶
type Settlements struct {
Rave
}
func (Settlements) Fetch ¶
func (s Settlements) Fetch(data FetchSettlementData) ( error error, response map[string]interface{}, )
func (Settlements) List ¶
func (s Settlements) List(data ListSettlementData) ( error error, response map[string]interface{}, )
type SinglePaymentData ¶
type SinglePaymentData struct {
SecKey string `json:"seckey"`
AccountBank string `json:"account_bank"`
AccountNumber string `json:"account_number"`
Amount int `json:"amount"`
Narration string `json:"narration"`
Currency string `json:"currency"`
Reference string `json:"reference"`
Meta types.Slice `json:"meta"`
BeneficiaryName string `json:"beneficiary_name"`
}
type SingleTransfer ¶
type SingleTransfer interface {
InitiateSingleTransfer(data SinglePaymentData) (error error, response map[string]interface{})
}
type SingleTransferGetter ¶
type Subaccount ¶
type Subaccount struct {
Rave
}
func (Subaccount) CreateSubaccount ¶
func (s Subaccount) CreateSubaccount(data CreateSubaccountData) (error error, response map[string]interface{})
func (Subaccount) DeleteSubaccount ¶
func (s Subaccount) DeleteSubaccount(id string) (error error, response map[string]interface{})
func (Subaccount) FetchSubaccount ¶
func (s Subaccount) FetchSubaccount(id string) (error error, response map[string]interface{})
func (Subaccount) ListSubaccount ¶
func (s Subaccount) ListSubaccount(data ListSubaccountData) (error error, response map[string]interface{})
type SubaccountInterface ¶
type SubaccountInterface interface {
CreateSubaccount
ListSubaccount
FetchSubaccount
DeleteSubaccount
}
type Subscription ¶
type Subscription struct {
Rave
}
func (Subscription) Activate ¶
func (s Subscription) Activate(id int) ( error error, response map[string]interface{}, )
func (Subscription) Cancel ¶
func (s Subscription) Cancel(id int) ( error error, response map[string]interface{}, )
func (Subscription) Fetch ¶
func (s Subscription) Fetch(id string) ( error error, response map[string]interface{}, )
func (Subscription) List ¶
func (s Subscription) List() ( error error, response map[string]interface{}, )
type TokenizedChargeData ¶
type TokenizedChargeData struct {
SecretKey string `json:"SECKEY"`
Currency string `json:"currency"`
Token string `json:"token"`
Country string `json:"country"`
Amount float64 `json:"amount"`
Email string `json:"email"`
Firstname string `json:"firstname"`
Lastname string `json:"lastname"`
Ip string `json:"IP"`
Txref string `json:"txRef"`
Chargetype string `json:"charge_type"`
}
type TransRecipients ¶
type TransRecipients struct {
Rave
}
func (TransRecipients) CreateRecipient ¶
func (t TransRecipients) CreateRecipient(data CreateRecipientData) (error error, response map[string]interface{})
func (TransRecipients) DeleteRecipient ¶
func (t TransRecipients) DeleteRecipient(data DeleteRecipientData) (error error, response map[string]interface{})
func (TransRecipients) Fetch ¶
func (t TransRecipients) Fetch(data FetchRecipientsData) (error error, response map[string]interface{})
func (TransRecipients) List ¶
func (t TransRecipients) List() (error error, response map[string]interface{})
type Transfer ¶
type Transfer struct {
Rave
}
func (Transfer) FetchAllTransfers ¶
Gets all transfers
func (Transfer) FetchTransfer ¶
Gets a single transfer
func (Transfer) GetBulkTransferStatus ¶
func (Transfer) GetRaveBalance ¶
Gets a customer's Rave available Balance
func (Transfer) GetTransferFee ¶
Gets the transfer fee
func (Transfer) InitiateBulkTransfer ¶
func (t Transfer) InitiateBulkTransfer(paymentData BulkPaymentData) (error error, response map[string]interface{})
initiates a bulk transfer
func (Transfer) InitiateSingleTransfer ¶
func (t Transfer) InitiateSingleTransfer(paymentData SinglePaymentData) (error error, response map[string]interface{})
Initiates a single transfer
func (Transfer) ResolveAccount ¶
func (t Transfer) ResolveAccount(account_data AccountResolveData) (error error, response map[string]interface{})
type TransferFeeGetter ¶
type TransferFeeGetter interface {
GetTransferFee()
}
type TransferHelpers ¶
type TransferHelpers interface {
SingleTransferGetter
AllTransfersGetter
TransferFeeGetter
RaveBalanceGetter
BulkTransferStatus
}
type TransferInterface ¶
type TransferInterface interface {
SingleTransfer
BulkTransfer
TransferHelpers
}
type UpdateOrder ¶
type UpdateOrder interface {
Update(data UpdateOrderData) (error error, response map[string]interface{})
}
type UpdateOrderData ¶
type ValidationData ¶
type ValidationResponse ¶
type ValidationResponse struct {
ResponseCode string `json:"response_code"`
Address interface{} `json:"address"`
ResponseMessage string `json:"response_message"`
Name string `json:"name"`
BillerCode string `json:"biller_code"`
Customer string `json:"customer"`
ProductCode string `json:"product_code"`
Email interface{} `json:"email"`
Fee int `json:"fee"`
Maximum int `json:"maximum"`
Minimum int `json:"minimum"`
}
type VerifyTransaction ¶
type VerifyTransaction interface {
Verify(data VerifyTransactionData) (error error, response map[string]interface{})
}
type VerifyTransactionData ¶
type Verifytransaction ¶
type Verifytransaction struct {
Rave
}
func (Verifytransaction) Verfiy ¶
func (v Verifytransaction) Verfiy(data VerifyTransactionData) (error error, response map[string]interface{})
type Virtualaccount ¶
type Virtualaccount struct {
Rave
}
func (Virtualaccount) Create ¶
func (v Virtualaccount) Create(data CreateAcctData) (error error, response map[string]interface{})
type Virtualcards ¶
type Virtualcards struct {
Rave
}
func (Virtualcards) Create ¶
func (v Virtualcards) Create(data CreateData) ( error error, response map[string]interface{}, )
func (Virtualcards) Fetch ¶
func (v Virtualcards) Fetch(data FetchData) ( error error, response map[string]interface{}, )
func (Virtualcards) Freeze ¶
func (v Virtualcards) Freeze(data FreezeData) ( error error, response map[string]interface{}, )
func (Virtualcards) Fund ¶
func (v Virtualcards) Fund(data FundData) ( error error, response map[string]interface{}, )
func (Virtualcards) Get ¶
func (v Virtualcards) Get(data GetData) ( error error, response map[string]interface{}, )
func (Virtualcards) List ¶
func (v Virtualcards) List(data ListData) ( error error, response map[string]interface{}, )
func (Virtualcards) Withdraw ¶
func (v Virtualcards) Withdraw(data WithdrawData) ( error error, response map[string]interface{}, )