Documentation ¶
Index ¶
- Variables
- func DecryptRequestBody(body io.Reader, key []byte) ([]byte, error)
- func ObfuscateKey(key []byte) []byte
- func PKCS5Unpad(input []byte) ([]byte, error)
- func StripCtrlChars(input []byte) string
- type ClickbankAddress
- type ClickbankContact
- type ClickbankCustomer
- type ClickbankHopfeed
- type ClickbankLineItem
- type ClickbankNotification
- type ClickbankUpsell
- type CryptStruct
- type EncryptedNotification
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCouldNotDecode = errors.New("could not Base64 decode string")
View Source
var ErrInvalidInput = errors.New("input is not a factor of the cipher's blocksize")
View Source
var ErrInvalidPadding = errors.New("decrypted output does not appear to be correctly PKCS5 padded")
Functions ¶
func ObfuscateKey ¶
func PKCS5Unpad ¶
func StripCtrlChars ¶
Types ¶
type ClickbankAddress ¶
type ClickbankContact ¶
type ClickbankCustomer ¶
type ClickbankCustomer struct { Shipping ClickbankContact `json:"shipping"` Billing ClickbankContact `json:"billing"` }
type ClickbankHopfeed ¶
type ClickbankHopfeed struct { HopfeedClickId string `json:"hopfeedClickId"` HopfeedApplicationId int `json:"hopfeedApplicationId"` HopfeedCreativeId int `json:"hopfeedCreativeId"` HopfeedApplicationPayout float32 `json:"hopfeedApplicationPayout"` HopfeedVendorPayout float32 `json:"hopfeedVendorPayout"` }
type ClickbankLineItem ¶
type ClickbankNotification ¶
type ClickbankNotification struct { TransactionTime string `json:"transactionTime"` Receipt string `json:"receipt"` TransactionType string `json:"transactionType"` Vendor string `json:"vendor"` Affiliate string `json:"affiliate"` Role string `json:"role"` TotalAccountAmount float32 `json:"totalAccountAmount"` PaymentMethod string `json:"paymentMethod"` TotalOrderAmount float32 `json:"totalOrderAmount"` TotalTaxAmount float32 `json:"totalTaxAmount"` TotalShippingAmount float32 `json:"totalShippingAmount"` Currency string `json:"currency"` OrderLanguage string `json:"orderLanguage"` TrackingCodes []string `json:"trackingCodes"` LineItems []ClickbankLineItem `json:"lineItems"` Customer ClickbankCustomer `json:"customer"` Upsell ClickbankUpsell `json:"upsell"` Hopfeed ClickbankHopfeed `json:"hopfeed"` Version float32 `json:"version"` AttemptCount int `json:"attemptCount"` VendorVariables map[string]interface{} `json:"vendorVariables"` }
func DecodeResponse ¶
func DecodeResponse(encoded_response []byte) (*ClickbankNotification, error)
type ClickbankUpsell ¶
type CryptStruct ¶
type CryptStruct struct {
// contains filtered or unexported fields
}
func NewCryptStruct ¶
func NewCryptStruct(key []byte, iv []byte) (*CryptStruct, error)
Create a new CrypteStruct
func (*CryptStruct) Decrypt ¶
func (c *CryptStruct) Decrypt(input []byte) ([]byte, error)
Decrypt Something
func (*CryptStruct) DecryptPKCS5 ¶
func (c *CryptStruct) DecryptPKCS5(input []byte) ([]byte, error)
type EncryptedNotification ¶
Click to show internal directories.
Click to hide internal directories.