cashbill

package module
v0.0.0-...-90f745f Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2021 License: MIT Imports: 11 Imported by: 0

README

Cashbill API implementation in GO

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BadCode = errors.New("bad code")
View Source
var InvalidNumber = errors.New("invalid number")

Functions

func Check

func Check(token, code string) (service string, amount int, err error)

func CheckOld

func CheckOld(token, code string) (service string, amount int, err error)

Types

type API

type API struct {
	ShopID string
	Secret string
}

func (*API) CreatePayment

func (api *API) CreatePayment(newPayment NewPayment) (Payment, error)

type NewPayment

type NewPayment struct {
	Title             string `url:"title"`
	Amount            string `url:"amount.value"`
	Currency          string `url:"amount.currencyCode"`
	Description       string `url:"description"`
	AdditionalData    string `url:"additionalData"`
	ReturnURL         string `url:"returnUrl"`
	NegativeReturnURL string `url:"negativeReturnUrl"`
	PaymentChannel    string `url:"paymentChannel"`
	LanguageCode      string `url:"languageCode"`
	Referer           string `url:"referer"`
}

type Payment

type Payment struct {
	ID        string `json:"id"`
	ReturnURL string `json:"returnUrl"`
}

Jump to

Keyboard shortcuts

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