Documentation ¶
Index ¶
- func GetAcceptedCoins(clientHeader http.Header) (string, error)
- func InitTransaction(clientHeader http.Header, ...) (string, error)
- func LazerpayClient(publicKey, secretKey string) (http.Header, error)
- func Transfer(clientHeader http.Header, amount uint, recipient, coin, blockchain string) (string, error)
- func VerifyTransaction(clientHeader http.Header, reference string) (string, error)
- type InitializeTransaction
- type TransferFunds
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAcceptedCoins ¶
GetAcceptedCoins helps retrive all accepted coins.
The “clientHeader“ is gotten from the LazerpayClient
lazerpay.GetAcceptedCoins(clientHeader)
func InitTransaction ¶
func InitTransaction(clientHeader http.Header, reference, amount, customerName, customerEmail, currencyType, coin string, acceptPartialPayment bool) (string, error)
InitTransaction function helps initialize new transactions.
The “clientHeader“ is gotten from the LazerpayClient
lazerpay.InitTransaction(clientHeader ,"4tytytreytrey65756u5u66", "1000", "Abdulfatai Suleiman", "staticdev20046@gmail.com", "USD", "DAI", true)
func LazerpayClient ¶
LazerpayClient adds the necessary “http.header“
lazerpay.LazerpayClient(publicKey, secretKey)
func Transfer ¶
func Transfer(clientHeader http.Header, amount uint, recipient, coin, blockchain string) (string, error)
Transfer helps send funds to another recipient.
amount must not be less than 1 and also it should not be empty. recipient should not be empty, and also the recipient must be an Ethereum address. coin must be a string, coin should not be empty. blockchain must be a string, and blockchain must not be empty.
The “clientHeader“ is gotten from the LazerpayClient
lazerpay.Transfer(clientHeader,1, "0xF378c952d5266eF8e1783521a1395Fe40cDCe55B", "USDT", "Binance Smart Chain")
Types ¶
type InitializeTransaction ¶
type InitializeTransaction struct { Reference string `json:"reference"` Amount string `json:"amount"` CustomerName string `json:"customer_name"` CustomerEmail string `json:"customer_Eemail"` Currency string `json:"currency"` Coin string `json:"coin"` AcceptPartialPayment bool `json:"accept_partial_payment"` }
Click to show internal directories.
Click to hide internal directories.