Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
Type Type `json:"type"`
// Deprecated
AffirmAccount
PayPalAccount
StripeAccount
// PlaidAccount
BitcoinTransaction
EthereumTransaction
AuthorizeNetAccount
Affirm AffirmAccount `json:"affirm,omitempty"`
PayPal PayPalAccount `json:"paypal,omitempty"`
Square SquareAccount `json:"square,omitempty"`
Stripe StripeAccount `json:"stripe,omitempty"`
// Plaid PlaidAccount `json:"plaid,omitempty"`
Bitcoin BitcoinTransaction `json:"bitcoin,omitempty"`
Ethereum EthereumTransaction `json:"ethereum,omitempty"`
AuthorizeNet AuthorizeNetAccount `json:"authorizenet,omitempty"`
Error string `json:"error,omitempty"`
}
Sort of a union type of all possible payment accounts, used everywhere for convenience
type AffirmAccount ¶
type AuthorizeNetAccount ¶
type AuthorizeNetAccount struct {
AuthCode string `json:"authCode,omitempty"`
AvsResultCode string `json:"avsResultCode,omitempty"`
CvvResultCode string `json:"cvvResultCode,omitempty"`
CavvResultCode string `json:"cavvResultCode,omitempty"`
TransId string `json:"transId,omitempty"`
RefTransId string `json:"refTransId,omitempty"`
TransHash string `json:"transHash,omitempty"`
TestRequest string `json:"testRequest,omitempty"`
AccountNumber string `json:"accountNumber,omitempty"`
AccountType string `json:"accountType,omitempty"`
Messages string `json:"message,omitempty"`
ErrorMessages string `json:"errorMessage,omitempty"`
}
type BitcoinTransaction ¶
type BitcoinTransaction struct {
BitcoinTransactionTxId string `json:"bitcoinTransactionTxId,omitempty"`
BitcoinChainType blockchains.Type `json:"bitcoinChainType,omitempty"`
BitcoinAmount currency.Cents `json:"bitcoinAmount,omitempty"`
// Denotes whether or not a successful transfer occurred
BitcoinTransferred bool `json:"bitcoinTransfered"`
BitcoinFinalTransactionTxId string `json:"finalbitcoinTransactionTxId,omitempty"`
BitcoinFinalTransactionCost currency.Cents `json:"finalbitcoinTransactionCost,omitempty"`
BitcoinFinalAddress string `json:"finalbitcoinAddress,omitempty"`
BitcoinFinalAmount currency.Cents `json:"finalbitcoinAmount,omitempty"`
}
type EthereumTransaction ¶
type EthereumTransaction struct {
EthereumTransactionHash string `json:"ethereumTransactionHash,omitempty"`
EthereumChainType blockchains.Type `json:"ethereumChainType,omitempty"`
EthereumAmount blockchains.BigNumber `json:"ethereumAmount,omitempty"`
EthereumFromAddress string `json:"ethereumFromAddress,omitempty"`
EthereumToAddress string `json:"ethereumToAddress,omitempty"`
// Denotes whether or not a successful transfer occurred
EthereumTransferred bool `json:"ethereumTransfered"`
EthereumFinalTransactionHash string `json:"finalEthereumTransactionHash,omitempty"`
EthereumFinalTransactionCost blockchains.BigNumber `json:"finalEthereumTransactionCost,omitempty"`
EthereumFinalAddress string `json:"finalEthereumAddress,omitempty"`
EthereumFinalAmount blockchains.BigNumber `json:"finalEthereumAmount,omitempty"`
}
type PayPalAccount ¶
type PayPalAccount struct {
Email string `json:"email,omitempty"`
SellerEmail string `json:"sellerEmail,omitempty"`
RedirectUrl string `json:"redirectUrl,omitempty"`
Ipn string `json:"ipn,omitempty"`
PayKey string `json:"payKey,omitempty"`
PreapprovalKey string `json:"preapprovalKey,omitempty"`
// Preapproval expiration date (Unix timestamp in milliseconds).
Ending int `json:"ending,omitempty"`
// Preapproval expiration date (ISO 8601 timestamp).
EndingDate string `json:"endingDate,omitempty"`
}
type SquareAccount ¶
type SquareAccount struct {
PaymentId string `json:"paymentId,omitempty"`
CustomerId string `json:"customerId,omitempty"`
LocationId string `json:"locationId,omitempty"`
CardBrand string `json:"cardBrand,omitempty"`
LastFour string `json:"lastFour,omitempty"`
ReceiptURL string `json:"receiptUrl,omitempty"`
}
type StripeAccount ¶
type StripeAccount struct {
// Very important to never store these!
Name string `json:"name,omitempty" datastore:"-"`
Number string `json:"number,omitempty" datastore:"-"`
CVC string `json:"cvc,omitempty" datastore:"-"`
BalanceTransactionId string `json:"balanceTransactionId,omitempty"`
CardId string `json:"cardId,omitempty"`
ChargeId string `json:"chargeId,omitempty"`
CustomerId string `json:"customerId,omitempty"`
Fingerprint string `json:"fingerprint,omitempty"`
Funding string `json:"funding,omitempty"`
Brand string `json:"brand,omitempty"`
LastFour string `json:"lastFour,omitempty"`
Month int `json:"month,string,omitempty"`
Year int `json:"year,string,omitempty"`
Country string `json:"country,omitempty"`
CVCCheck string `json:"cvcCheck,omitempty"`
}
func (StripeAccount) CardMatches ¶
func (sa StripeAccount) CardMatches(acct Account) bool
Click to show internal directories.
Click to hide internal directories.