Documentation ¶
Index ¶
- type MerchantParametersRequest
- type MerchantParametersResponse
- type Redsys
- func (r *Redsys) CreateMerchantParameters(data *MerchantParametersRequest) string
- func (r *Redsys) CreateMerchantSignature(data *MerchantParametersRequest) string
- func (r *Redsys) CreateMerchantSignatureNotif(data string) string
- func (r *Redsys) DecodeMerchantParameters(data string) MerchantParametersResponse
- func (r *Redsys) MerchantSignatureIsValid(mac1 string, mac2 string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MerchantParametersRequest ¶
type MerchantParametersRequest struct { // Optional fields are tagged with omitempty MerchantMerchantCode string `json:"Ds_Merchant_MerchantCode"` MerchantTerminal string `json:"Ds_Merchant_Terminal"` MerchantTransactionType string `json:"Ds_Merchant_TransactionType"` MerchantAmount string `json:"Ds_Merchant_Amount"` MerchantCurrency string `json:"Ds_Merchant_Currency"` MerchantOrder string `json:"Ds_Merchant_Order"` MerchantMerchantUrl string `json:"Ds_Merchant_MerchantURL,omitempty"` MerchantProductDescription string `json:"Ds_Merchant_ProductDescription,omitempty"` MerchantTitular string `json:"Ds_Merchant_Titular,omitempty"` MerchantUrlOK string `json:"Ds_Merchant_UrlOK,omitempty"` MerchantUrlKO string `json:"Ds_Merchant_UrlKO,omitempty"` MerchantMerchantName string `json:"Ds_Merchant_MerchantName,omitempty"` MerchantConsumerLanguage string `json:"Ds_Merchant_ConsumerLanguage,omitempty"` }
MerchantParametersRequest struct to construct Redsys API requests
type MerchantParametersResponse ¶
type MerchantParametersResponse struct { Date string `json:"Ds_Date"` Hour string `json:"Ds_Hour"` SecurePayment string `json:"Ds_SecurePayment"` CardCountry string `json:"Ds_Card_Country,omitempty"` Amount string `json:"Ds_Amount"` Currency string `json:"Ds_Currency"` Order string `json:"Ds_Order"` MerchantCode string `json:"Ds_MerchantCode"` Terminal string `json:"Ds_Terminal"` Response string `json:"Ds_Response"` MerchantData string `json:"Ds_MerchantData"` TransactionType string `json:"Ds_TransactionType"` ConsumerLanguage string `json:"Ds_ConsumerLanguage,omitempty"` AuthorisationCode string `json:"Ds_AuthorisationCode,omitempty"` }
MerchantParametersResponse struct to read Redsys API responses
type Redsys ¶
type Redsys struct {
Key string
}
Redsys Init this struct with your key to operate with the corresponding functions
func (*Redsys) CreateMerchantParameters ¶
func (r *Redsys) CreateMerchantParameters(data *MerchantParametersRequest) string
CreateMerchantParameters Return a string corresponding to a marshalled MerchantParametersRequest
func (*Redsys) CreateMerchantSignature ¶
func (r *Redsys) CreateMerchantSignature(data *MerchantParametersRequest) string
CreateMerchantSignature generates a merchant signature from MerchantParametersRequest
func (*Redsys) CreateMerchantSignatureNotif ¶
CreateMerchantSignatureNotif generates a signature for MerchantParametersResponse representing string
func (*Redsys) DecodeMerchantParameters ¶
func (r *Redsys) DecodeMerchantParameters(data string) MerchantParametersResponse
DecodeMerchantParameters Decode a response into a MerchantParametersResponse
Click to show internal directories.
Click to hide internal directories.