qiwi

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2019 License: MIT Imports: 12 Imported by: 2

README

Qiwi GoDoc

An golang qiwi.com api client

Qiwi.com - CIS and Russian Payment system and this package relevant for Russian-speaking users. All the following documentation will be in Russian.

Чтобы получить токен доступа, перейдите по ссылке

История изменений

Доступна в файле CHANGELOG.md.

Установка

go get -u github.com/zhuharev/qiwi

Использование

token = "YOUR_TOKEN"
qw := qiwi.New(token)

// get last 10 payments
resp, err := qw.History.Payments(10)
if err != nil {
  // handle error
}
log.Printf("%v", resp)

Пример платежа

Для того, чтобы перевести деньги по номеру карты, мы должны определить ID провайдера, через которого будет проведён платёж.

	// токен
	token := "QIWI_TOKEN"
	// номер карты, на которую мы хотим сделать перевод
	cartNumber := "4377723744084975"
	// сумма перевода
	amount := 10.0

	qw := New(token)

	ctx := context.Background()

	// Определяем провайдера
	providerID, err := qw.Payments.DetectProviderIDByCardNumber(ctx, cartNumber)
	checkErr(err)

	// Проверяем комиссию
	resp, err := qw.Payments.SpecialComission(ctx, providerID, cartNumber, amount)
	checkErr(err)
	log.Printf("Комиссия: %.2f", resp.QwCommission.Amount)
	log.Printf("Сумма платежа с комиссией: %.2f", resp.WithdrawSum.Amount)

	// Делаем платёж
	paymentResponse, err := qw.Payment(ctx, providerID, cartNumber, amount)
	checkErr(err)
	log.Printf("ID транзакции: %s", paymentResponse.Transaction.ID)

Documentation

Index

Constants

View Source
const (
	// BaseURL represent base url
	BaseURL = "https://edge.qiwi.com"
	// OpenBaseURL open base url
	OpenBaseURL = "https://qiwi.com"
	// VersionAPI current qiwi.com api version
	VersionAPI = "v1"

	// QiwiProviderID used for payment to qiwi wallet
	QiwiProviderID = 99

	// CurrencyRUB rub id
	CurrencyRUB = "643"
	// CurrencyUSD usd currency id
	CurrencyUSD = "840"
	// CurrencyEUR euro currency id
	CurrencyEUR = "978"
	// CurrencyKZT tenge currency id
	CurrencyKZT = "398"
)
View Source
const (
	// EndpointProfile endpoint
	EndpointProfile = "person-profile/v1/profile/current"
	// EndpointIdent identification endpoint
	EndpointIdent = "identification/v1/persons/%s/identification" // %s - wallet
	// EndpointPaymentsHistory get history
	EndpointPaymentsHistory = "payment-history/v1/persons/%s/payments" // %s - wallet
	// EndpointStat get stat of payments
	EndpointStat = "payment-history/v1/persons/%s/payments/total" // %s - wallet
	// EndpointTxnInfo get info anout single txn
	EndpointTxnInfo = "payment-history/v1/transactions/%s" // %s - txn_id
	// EndpointBalance get wallet balance
	EndpointBalance = "funding-sources/v1/accounts/current"
	// EndpointCardsDetect detect code of PS
	EndpointCardsDetect = "card/detect.action"
	// EndpointPayment send money from wallet
	EndpointPayment = "sinap/api/v2/terms/%d/payments"
	// EndpointComission a provider comission
	EndpointComission = "sinap/providers/%d/form"
	// EndpointSpecialComission comission for specific amount
	EndpointSpecialComission = "sinap/providers/%d/onlineCommission"
)

Variables

View Source
var (
	// ErrSyntaxError error with bad request
	ErrSyntaxError = fmt.Errorf("Ошибка синтаксиса запроса (неправильный формат данных)")
	// ErrTokenInvalid error
	ErrTokenInvalid = fmt.Errorf("Неверный токен или истек срок действия токена")
	// ErrNotFound error
	ErrNotFound = fmt.Errorf("Не найден кошелёк, транзакция или отсутствуют платежи с указанными признаками")
	// ErrRateLimitReached error
	ErrRateLimitReached = fmt.Errorf("Слишком много запросов, сервис временно недоступен")
	// ErrInsufficient error
	ErrInsufficient = fmt.Errorf("Недостаточно средств")
)
View Source
var (
	// OpenMethods not require Bearer token
	OpenMethods = map[string]bool{
		EndpointCardsDetect: true,
	}
)

Functions

func Debug

func Debug(c *Client)

Debug enable debug

func Wallet

func Wallet(wallet string) func(c *Client)

Wallet set wallet to client example: qw := qiwi.New(token, qiwi.Wallet("70000000000"))

Types

type Account added in v1.0.0

type Account struct {
	Alias      string     `json:"alias"`
	FsAlias    string     `json:"fsAlias"`
	Title      string     `json:"title"`
	HasBalance bool       `json:"hasBalance"`
	Currency   int        `json:"currency"`
	Type       Type       `json:"type"`
	Balance    SumNumeric `json:"balance"`
}

type AuthInfo added in v1.0.0

type AuthInfo struct {
	PersonId         int64         `json:"personId"`
	RegistrationDate string        `json:"registrationDate"`
	BoundEmail       string        `json:"boundEmail"`
	IP               string        `json:"ip"`
	LastLoginDate    string        `json:"lastLoginDate"`
	MobilePinInfo    MobilePinInfo `json:"mobilePinInfo"`
	PassInfo         PassInfo      `json:"passInfo"`
}

type Balance

type Balance struct {
	// contains filtered or unexported fields
}

Balance for payment-history endpoints

func NewBalance

func NewBalance(c *Client) *Balance

NewBalance returns new Balance obj

func (*Balance) Current

func (b *Balance) Current(ctx context.Context) (hr BalanceResponse, err error)

Current call api and get current user balance

type BalanceResponse

type BalanceResponse struct {
	Accounts []Account
}

BalanceResponse response of balance request

type Balances added in v1.0.0

type Balances struct {
	Accounts []Account `json:"accounts"`
}

type CardsDetectResponse

type CardsDetectResponse struct {
	Code struct {
		Value json.Number `json:"value"`
		Name  string      `json:"_name"`
	} `json:"code"`
	Message json.Number `json:"message"`
}

CardsDetectResponse api response

type Client

type Client struct {
	Payments *Payments
	Profile  *Profile
	Balance  *Balance
	// contains filtered or unexported fields
}

Client main struct

func New

func New(token string, opts ...Opt) *Client

New returns client

func (*Client) SetWallet

func (c *Client) SetWallet(wallet string)

SetWallet set wallet for client

type Code added in v1.0.0

type Code struct {
	Value string `json:"value"`
	Name  string `json:"_name"`
}

type ComissionResponse added in v0.0.2

type ComissionResponse struct {
	Content struct {
		Terms struct {
			Commission struct {
				Ranges []struct {
					Bound float64 `json:"bound"`
					Fixed float64 `json:"fixed"`
					Rate  float64 `json:"rate"`
					Min   float64 `json:"min"`
					Max   float64 `json:"max"`
				} `json:"ranges"`
			} `json:"commission"`
		} `json:"terms"`
	} `json:"content"`
}

ComissionResponse json unserialazer

type Commission added in v1.0.0

type Commission struct {
	Ranges []Range `json:"ranges"`
}

type Content added in v1.0.0

type Content struct {
	Terms Terms `json:"terms"`
}

type ContractInfo added in v1.0.0

type ContractInfo struct {
	Blocked            bool                 `json:"blocked"`
	ContractID         int64                `json:"contractId"`
	CreationDate       string               `json:"creationDate"`
	Features           []interface{}        `json:"features"`
	IdentificationInfo []IdentificationInfo `json:"identificationInfo"`
}

type DetermineOperatorParams added in v1.0.0

type DetermineOperatorParams struct {
	Phone string `json:"phone,omitempty" url:"phone,omitempty"`
}

type DeterminedProvider added in v1.0.0

type DeterminedProvider struct {
	Code    Code   `json:"code"`
	Message string `json:"message"`
}

type ErrorResponse added in v1.0.0

type ErrorResponse struct {
	Code    string
	Message string
}

type Fields added in v1.0.0

type Fields struct {
	Account     string `json:"account"`
	AccountType string `json:"account_type"`
	ExpDate     string `json:"exp_date"`
}

type History

type History struct {
	Data        []Transaction `json:"data"`
	NextTxnId   int64         `json:"nextTxnId"`
	NextTxnDate string        `json:"nextTxnDate"`
}

type HistoryParams added in v1.0.0

type HistoryParams struct {
	Rows        int      `json:"rows,omitempty" url:"rows,omitempty"`
	Operation   string   `json:"operation,omitempty" url:"operation,omitempty"`
	Sources     []string `json:"sources,omitempty" url:"sources,omitempty"`
	StartDate   string   `json:"startDate,omitempty" url:"startDate,omitempty"`
	EndDate     string   `json:"endDate,omitempty" url:"endDate,omitempty"`
	NextTxnDate string   `json:"nextTxnDate,omitempty" url:"nextTxnDate,omitempty"`
	NextTxnId   int64    `json:"nextTxnId,omitempty" url:"nextTxnId,omitempty"`
}

all dates should be formatted in RFC3339

type Identification added in v1.0.0

type Identification struct {
	Required bool `json:"required"`
}

type IdentificationInfo added in v1.0.0

type IdentificationInfo struct {
	BankAlias           string `json:"bankAlias"`
	IdentificationLevel string `json:"identificationLevel"`
}

type Limit added in v1.0.0

type Limit struct {
	Currency string  `json:"currency"`
	Max      float64 `json:"max"`
	Min      float64 `json:"min"`
}

type MobilePinInfo added in v1.0.0

type MobilePinInfo struct {
	LastMobilePinChange string `json:"lastMobilePinChange"`
	MobilePinUsed       bool   `json:"mobilePinUsed"`
	NextMobilePinChange string `json:"nextMobilePinChange"`
}

type Opt

type Opt func(c *Client)

Opt returns func for changing client used for New

type PassInfo added in v1.0.0

type PassInfo struct {
	LastPassChange string `json:"lastPassChange"`
	NextPassChange string `json:"nextPassChange"`
	PasswordUsed   bool   `json:"passwordUsed"`
}

type Payment added in v1.0.0

type Payment struct {
	ID          string         `json:"id"`
	Terms       int            `json:"terms"`
	Fields      Fields         `json:"fields"`
	Sum         Sum            `json:"sum"`
	Source      string         `json:"source"`
	Comment     string         `json:"comment"`
	Transaction TransactionMin `json:"transaction"`
}

type PaymentMethod added in v1.0.0

type PaymentMethod struct {
	Type      string `json:"type"`
	AccountID string `json:"accountId"`
}

type PaymentParams added in v1.0.0

type PaymentParams struct {
	ID            string        `json:"id"`
	Sum           Sum           `json:"sum"`
	Source        string        `json:"source"`
	PaymentMethod PaymentMethod `json:"paymentMethod"`
	Fields        Fields        `json:"fields"`
	Comment       string        `json:"comment"`
}

type PaymentRequest

type PaymentRequest struct {
	ID  string `json:"id"`
	Sum struct {
		Amount   float64 `json:"amount"`
		Currency string  `json:"currency"`
	} `json:"sum"`
	PaymentMethod PaymentMethod `json:"paymentMethod"`
	Fields        struct {
		Account    string `json:"account"`               // Номер банковской карты
		RemName    string `json:"rem_name,omitempty"`    //Имя отправителя.
		RemNameF   string `json:"rem_name_f,omitempty"`  // Фамилия отправителя.
		RecAddress string `json:"rec_address,omitempty"` //Адрес отправителя
		RecCity    string `json:"rec_city,omitempty"`    //Город отправителя.
		RecCountry string `json:"rec_country,omitempty"` //Страна отправителя.
		RegName    string `json:"reg_name,omitempty"`    //Имя получателя.
		RegNameF   string `json:"reg_name_f,omitempty"`  //Фамилия получателя.
	} `json:"fields"`
	// Qiwi to qiwi related field
	Comment string `json:"comment,omitempty"`
}

PaymentRequest request of payment

type PaymentResponse

type PaymentResponse struct {
	ID     string `json:"id"`
	Terms  string `json:"terms"`
	Fields struct {
		Account string `json:"account"`
	} `json:"fields"`
	Sum struct {
		Amount   float64 `json:"amount"`
		Currency string  `json:"currency"`
	} `json:"sum"`
	Source      string `json:"source"`
	Transaction struct {
		ID    string `json:"id"`
		State struct {
			Code string `json:"code"`
		} `json:"state"`
	} `json:"transaction"`
	// Qiwi to qiwi related field
	Comment string `json:"comment,omitempty"`
}

PaymentResponse foemat of payment response

type PaymentStatistic added in v1.0.0

type PaymentStatistic struct {
	IncomingTotal []Sum `json:"incomingTotal"`
	OutgoingTotal []Sum `json:"outgoingTotal"`
}

type PaymentStatisticParams added in v1.0.0

type PaymentStatisticParams struct {
	StartDate string   `json:"startDate,omitempty" url:"startDate,omitempty"`
	EndDate   string   `json:"endDate,omitempty" url:"endDate,omitempty"`
	Operation string   `json:"operation,omitempty" url:"operation,omitempty"`
	Sources   []string `json:"sources,omitempty" url:"sources,omitempty"`
}

all dates should be formatted in RFC3339

type Payments added in v0.0.2

type Payments struct {
	// contains filtered or unexported fields
}

Payments for payment-history endpoints

func NewPayments added in v0.0.2

func NewPayments(c *Client) *Payments

NewPayments returns new Payments obj

func (*Payments) Comission added in v0.0.2

func (p *Payments) Comission(ctx context.Context, providerID int) (res ComissionResponse, err error)

Comission get provider comission

func (*Payments) DetectProviderIDByCardNumber added in v1.0.0

func (c *Payments) DetectProviderIDByCardNumber(ctx context.Context, cardNumber string) (id int, err error)

Detect detect card PS

func (*Payments) History added in v0.0.2

func (p *Payments) History(ctx context.Context, rows uint, params ...url.Values) (pr PaymentsResponse, err error)

History return payments history

func (*Payments) Payment added in v1.0.0

func (c *Payments) Payment(ctx context.Context, psID int, amount float64, account string, comments ...string) (res PaymentResponse, err error)

Payment make mayment

func (*Payments) SpecialComission added in v0.0.2

func (p *Payments) SpecialComission(ctx context.Context, providerID int, to string, amount float64) (res SpecialComissionResponse, err error)

SpecialComission get provider comission

func (*Payments) Stat added in v0.0.2

func (p *Payments) Stat(ctx context.Context, startDate, endDate time.Time, params ...url.Values) (res StatResponse, err error)

Stat get sum of incoming and outgoing payments

type PaymentsResponse

type PaymentsResponse struct {
	Data        []Txn       `json:"data"`
	NextTxnID   interface{} `json:"nextTxnId"`
	NextTxnDate interface{} `json:"nextTxnDate"`
}

PaymentsResponse api response format

type PinInfo added in v1.0.0

type PinInfo struct {
	PinUsed bool `json:"pinUsed"`
}

type Profile

type Profile struct {
	// contains filtered or unexported fields
}

Profile for profile endpoints

func NewProfile

func NewProfile(c *Client) *Profile

NewProfile returns new Profile obj

func (*Profile) Current

func (h *Profile) Current(ctx context.Context) (pr ProfileResponse, err error)

Current call api and get current user profile

type ProfileParams added in v1.0.0

type ProfileParams struct {
	AuthInfoEnabled     bool `json:"authInfoEnabled,omitempty" url:"authInfoEnabled,omitempty"`
	ContractInfoEnabled bool `json:"contractInfoEnabled,omitempty" url:"contractInfoEnabled,omitempty"`
	UserInfoEnabled     bool `json:"userInfoEnabled,omitempty" url:"userInfoEnabled,omitempty"`
}

type ProfileResponse

type ProfileResponse struct {
	AuthInfo struct {
		BoundEmail    string    `json:"boundEmail"`
		IP            string    `json:"ip"`
		LastLoginDate time.Time `json:"lastLoginDate"`
		MobilePinInfo struct {
			LastMobilePinChange time.Time `json:"lastMobilePinChange"`
			MobilePinUsed       bool      `json:"mobilePinUsed"`
			NextMobilePinChange time.Time `json:"nextMobilePinChange"`
		} `json:"mobilePinInfo"`
		PassInfo struct {
			LastPassChange time.Time `json:"lastPassChange"`
			NextPassChange time.Time `json:"nextPassChange"`
			PasswordUsed   bool      `json:"passwordUsed"`
		} `json:"passInfo"`
		PersonID int64 `json:"personId"`
		PinInfo  struct {
			PinUsed bool `json:"pinUsed"`
		} `json:"pinInfo"`
		RegistrationDate time.Time `json:"registrationDate"`
	} `json:"authInfo"`
	ContractInfo struct {
		Blocked            bool          `json:"blocked"`
		ContractID         int64         `json:"contractId"`
		CreationDate       time.Time     `json:"creationDate"`
		Features           []interface{} `json:"features"`
		IdentificationInfo []struct {
			BankAlias           string `json:"bankAlias"`
			IdentificationLevel string `json:"identificationLevel"`
		} `json:"identificationInfo"`
	} `json:"contractInfo"`
	UserInfo struct {
		DefaultPayCurrency int         `json:"defaultPayCurrency"`
		DefaultPaySource   int         `json:"defaultPaySource"`
		Email              interface{} `json:"email"`
		FirstTxnID         int64       `json:"firstTxnId"`
		Language           string      `json:"language"`
		Operator           string      `json:"operator"`
		PhoneHash          string      `json:"phoneHash"`
		PromoEnabled       interface{} `json:"promoEnabled"`
	} `json:"userInfo"`
}

ProfileResponse reponse

type Provider added in v1.0.0

type Provider struct {
	ID          int64  `json:"id"`
	ShortName   string `json:"shortName"`
	LongName    string `json:"longName"`
	LogoUrl     string `json:"logoUrl"`
	Description string `json:"description"`
	Keys        string `json:"keys"`
	SiteUrl     string `json:"siteUrl"`
}

type PurchaseTotal added in v1.0.0

type PurchaseTotal struct {
	Total Sum `json:"total"`
}

type Range added in v1.0.0

type Range struct {
	Bound float32 `json:"bound"`
	Rate  float32 `json:"rate"`
	Min   float32 `json:"min"`
	Max   float32 `json:"max"`
	Fixed float32 `json:"fixed"`
}

type SpecialComissionRequest added in v0.0.2

type SpecialComissionRequest struct {
	Account       string `json:"account"`
	PaymentMethod struct {
		Type      string `json:"type"`
		AccountID string `json:"accountId"`
	} `json:"paymentMethod"`
	PurchaseTotals struct {
		Total struct {
			Amount   float64 `json:"amount"`
			Currency string  `json:"currency"`
		} `json:"total"`
	} `json:"purchaseTotals"`
}

SpecialComissionRequest json serializer

type SpecialComissionResponse added in v0.0.2

type SpecialComissionResponse struct {
	ProviderID  int `json:"providerId"`
	WithdrawSum struct {
		Amount   float64 `json:"amount"`
		Currency string  `json:"currency"`
	} `json:"withdrawSum"`
	EnrollmentSum struct {
		Amount   float64 `json:"amount"`
		Currency string  `json:"currency"`
	} `json:"enrollmentSum"`
	QwCommission struct {
		Amount   float64 `json:"amount"`
		Currency string  `json:"currency"`
	} `json:"qwCommission"`
	FundingSourceCommission struct {
		Amount   float64 `json:"amount"`
		Currency string  `json:"currency"`
	} `json:"fundingSourceCommission"`
	WithdrawToEnrollmentRate float64 `json:"withdrawToEnrollmentRate"`
}

SpecialComissionResponse json unserialazer

type SpecialRate added in v1.0.0

type SpecialRate struct {
	ProviderId               string `json:"providerId"`
	WithdrawSum              Sum    `json:"withdrawSum"`
	EnrollmentSum            Sum    `json:"enrollmentSum"`
	QwCommission             Sum    `json:"qwCommission"`
	FundingSourceCommission  Sum    `json:"fundingSourceCommission"`
	WithdrawToEnrollmentRate int    `json:"withdrawToEnrollmentRate"`
}

type SpecialRateParams added in v1.0.0

type SpecialRateParams struct {
	Account       string        `json:"account"`
	PaymentMethod PaymentMethod `json:"paymentMethod"`
	PurchaseTotal PurchaseTotal `json:"purchaseTotal"`
}

type StandardRate added in v1.0.0

type StandardRate struct {
	Content Content `json:"content"`
}

type StatResponse

type StatResponse struct {
	IncomingTotal []struct {
		Amount   float64 `json:"amount"`
		Currency int     `json:"currency"`
	} `json:"incomingTotal"`
	OutgoingTotal []struct {
		Amount   float64 `json:"amount"`
		Currency int     `json:"currency"`
	} `json:"outgoingTotal"`
}

StatResponse response of stat endpoind

type State added in v1.0.0

type State struct {
	Code string `json:"code"`
}

type Sum added in v1.0.0

type Sum struct {
	Amount   float64 `json:"amount"`
	Currency string  `json:"currency"`
}

type SumNumeric added in v1.0.0

type SumNumeric struct {
	Amount   float64 `json:"amount"`
	Currency int     `json:"currency"`
}

type Terms added in v1.0.0

type Terms struct {
	Cashbacks         []interface{}  `json:"cashbacks"`
	Commission        Commission     `json:"commission"`
	Description       string         `json:"description"`
	ID                string         `json:"id"`
	Identification    Identification `json:"identification"`
	Limits            []Limit        `json:"limits"`
	Overpayment       bool           `json:"overpayment"`
	RepeatablePayment bool           `json:"repeatablePayment"`
	Type              string         `json:"type"`
	Underpayment      bool           `json:"underpayment"`
}

type Transaction added in v1.0.0

type Transaction struct {
	TxnId                  int64         `json:"txnId"`
	PersonId               int64         `json:"personId"`
	Date                   string        `json:"date"`
	ErrorCode              int           `json:"errorCode"`
	Error                  string        `json:"error"`
	Status                 string        `json:"status"`
	Type                   string        `json:"type"`
	StatusText             string        `json:"statusText"`
	TrmTxnId               string        `json:"trmTxnId"`
	Account                string        `json:"account"`
	Sum                    SumNumeric    `json:"sum"`
	Commission             SumNumeric    `json:"commission"`
	Total                  SumNumeric    `json:"total"`
	Provider               Provider      `json:"provider"`
	Comment                string        `json:"comment"`
	CurrencyRate           float64       `json:"currencyRate"`
	Extras                 []interface{} `json:"extras"`
	ChequeReady            bool          `json:"chequeReady"`
	BankDocumentAvailable  bool          `json:"bankDocumentAvailable"`
	BankDocumentReady      bool          `json:"bankDocumentReady"`
	RepeatPaymentEnabled   bool          `json:"repeatPaymentEnabled"`
	FavoritePaymentEnabled bool          `json:"favoritePaymentEnabled"`
	RegularPaymentEnabled  bool          `json:"regularPaymentEnabled"`
}

type TransactionMin added in v1.0.0

type TransactionMin struct {
	ID    string `json:"id"`
	State State  `json:"state"`
}

type Txn

type Txn struct {
	TxnID      int64     `json:"txnId"`
	PersonID   int64     `json:"personId"`
	Date       time.Time `json:"date"`
	ErrorCode  int       `json:"errorCode"`
	Error      string    `json:"error"`
	Status     string    `json:"status"`
	Type       string    `json:"type"`
	StatusText string    `json:"statusText"`
	TrmTxnID   string    `json:"trmTxnId"`
	Account    string    `json:"account"`
	Sum        struct {
		Amount   float64 `json:"amount"`
		Currency int     `json:"currency"`
	} `json:"sum"`
	Commission struct {
		Amount   float64 `json:"amount"`
		Currency int     `json:"currency"`
	} `json:"commission"`
	Total struct {
		Amount   float64 `json:"amount"`
		Currency int     `json:"currency"`
	} `json:"total"`
	Provider struct {
		ID          int           `json:"id"`
		ShortName   string        `json:"shortName"`
		LongName    string        `json:"longName"`
		LogoURL     string        `json:"logoUrl"`
		Description string        `json:"description"`
		Keys        string        `json:"keys"`
		SiteURL     string        `json:"siteUrl"`
		Extras      []interface{} `json:"extras"`
	} `json:"provider"`
	Source                 interface{}   `json:"source"`
	Comment                string        `json:"comment"`
	CurrencyRate           float64       `json:"currencyRate"`
	Extras                 []interface{} `json:"extras"`
	ChequeReady            bool          `json:"chequeReady"`
	BankDocumentAvailable  bool          `json:"bankDocumentAvailable"`
	BankDocumentReady      bool          `json:"bankDocumentReady"`
	RepeatPaymentEnabled   bool          `json:"repeatPaymentEnabled"`
	FavoritePaymentEnabled bool          `json:"favoritePaymentEnabled"`
	RegularPaymentEnabled  bool          `json:"regularPaymentEnabled"`
}

Txn represent qiwi transaction

type Type added in v1.0.0

type Type struct {
	ID    string `json:"id"`
	Title string `json:"title"`
}

type UserInfo added in v1.0.0

type UserInfo struct {
	DefaultPayCurrency int    `json:"defaultPayCurrency"`
	DefaultPaySource   int    `json:"defaultPaySource"`
	Email              string `json:"email"`
	FirstTxnID         int64  `json:"firstTxnId"`
	Language           string `json:"language"`
	Operator           string `json:"operator"`
	PhoneHash          string `json:"phoneHash"`
	PromoEnabled       string `json:"promoEnabled"`
}

type UserProfile added in v1.0.0

type UserProfile struct {
	AuthInfo     AuthInfo     `json:"authInfo"`
	ContractInfo ContractInfo `json:"contractInfo"`
	UserInfo     UserInfo     `json:"userInfo"`
}

Jump to

Keyboard shortcuts

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