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
- type RequestErrorMessage
- type RequestPreauthorization
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"`
MerchantIdentifier string `json:"Ds_Merchant_Identifier,omitempty"`
MerchantCofIni string `json:"Ds_Merchant_Cof_Ini,omitempty"`
MerchantCofType string `json:"Ds_Merchant_Cof_Type,omitempty"`
MerchantData string `json:"Ds_Merchant_MerchantData,omitempty"`
MerchantCofTxnid string `json:"Ds_Merchant_Cof_Txnid,omitempty"`
MerchantExcepSca string `json:"Ds_Merchant_Excep_SCA,omitempty"`
MerchantDirectPayment string `json:"Ds_Merchant_DirectPayment,omitempty"`
MerchantGroup string `json:"Ds_Merchant_Group,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"`
Identifier string `json:"Ds_Merchant_Identifier,omitempty"`
CofTxnid string `json:"Ds_Merchant_Cof_Txnid,omitempty"`
ExpiryDate string `json:"Ds_ExpiryDate,omitempty"`
Description string `json:"Ds_Response_Description,omitempty"`
CardNumber string `json:"Ds_Card_Number,omitempty"`
CardBrand string `json:"Ds_Card_Brand,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
type RequestErrorMessage ¶ added in v1.0.3
type RequestPreauthorization ¶ added in v1.0.2
type RequestPreauthorization struct {
}
Click to show internal directories.
Click to hide internal directories.