Documentation
¶
Index ¶
- Variables
- func Api(bank, clientid, username, password string) (*API, *Request)
- func B64(data string) (hash string)
- func D64(data string) []byte
- func HEX(data string) (hash string)
- func Hash(form url.Values, keys []string, secret string) string
- func IPv4(r *http.Request) (ip string)
- func QueryString(v interface{}) (url.Values, error)
- func Random(n int) string
- func SHA512(data string) (hash string)
- func String(v reflect.Value) string
- type API
- func (api *API) Auth(ctx context.Context, req *Request) (Response, error)
- func (api *API) Auth3D(ctx context.Context, req *Request) (Response, error)
- func (api *API) Auth3Dhtml(ctx context.Context, req *Request) (string, error)
- func (api *API) Cancel(ctx context.Context, req *Request) (Response, error)
- func (api *API) PostAuth(ctx context.Context, req *Request) (Response, error)
- func (api *API) PreAuth(ctx context.Context, req *Request) (Response, error)
- func (api *API) PreAuth3D(ctx context.Context, req *Request) (Response, error)
- func (api *API) PreAuth3Dhtml(ctx context.Context, req *Request) (string, error)
- func (api *API) Refund(ctx context.Context, req *Request) (Response, error)
- func (api *API) SetStoreKey(key string)
- func (api *API) Transaction(ctx context.Context, req *Request) (res Response, err error)
- func (api *API) Transaction3D(ctx context.Context, req *Request) (res string, err error)
- type Item
- type ItemList
- type Pb
- type Request
- func (request *Request) SetAmount(total string, currency string)
- func (request *Request) SetCardCode(code string)
- func (request *Request) SetCardExpiry(month, year string)
- func (request *Request) SetCardHolder(holder string)
- func (request *Request) SetCardNumber(number string)
- func (request *Request) SetCurrency(currency string)
- func (request *Request) SetIPAddress(ip string)
- func (request *Request) SetInstallment(ins string)
- func (request *Request) SetMode(mode string)
- func (request *Request) SetOrderId(oid string)
- func (request *Request) SetPhoneNumber(phone string)
- func (request *Request) SetTaksit(ins string)
- type Response
- type To
Constants ¶
This section is empty.
Variables ¶
View Source
var CurrencyCode = map[string]string{
"TRY": "949",
"YTL": "949",
"TRL": "949",
"TL": "949",
"USD": "840",
"EUR": "978",
"GBP": "826",
"JPY": "392",
}
View Source
var CurrencyISO = map[string]string{
"949": "TRY",
"840": "USD",
"978": "EUR",
"826": "GBP",
"392": "JPY",
}
View Source
var EndPoints = map[string]string{
"asseco": "https://entegrasyon.asseco-see.com.tr/fim/api",
"asseco3D": "https://entegrasyon.asseco-see.com.tr/fim/est3Dgate",
"anadolu": "https://anadolusanalpos.est.com.tr/fim/api",
"anadolu3D": "https://anadolusanalpos.est.com.tr/fim/est3Dgate",
"akbank": "https://www.sanalakpos.com/fim/api",
"akbank3D": "https://www.sanalakpos.com/fim/est3Dgate",
"isbank": "https://spos.isbank.com.tr/fim/api",
"isbank3D": "https://spos.isbank.com.tr/fim/est3Dgate",
"ziraatbank": "https://sanalpos2.ziraatbank.com.tr/fim/api",
"ziraatbank3D": "https://sanalpos2.ziraatbank.com.tr/fim/est3Dgate",
"halkbank": "https://sanalpos.halkbank.com.tr/fim/api",
"halkbank3D": "https://sanalpos.halkbank.com.tr/fim/est3Dgate",
"finansbank": "https://www.fbwebpos.com/fim/api",
"finansbank3D": "https://www.fbwebpos.com/fim/est3Dgate",
"teb": "https://sanalpos.teb.com.tr/fim/api",
"teb3D": "https://sanalpos.teb.com.tr/fim/est3Dgate",
}
Functions ¶
func QueryString ¶
Types ¶
type API ¶
func (*API) Auth3Dhtml ¶
func (*API) PreAuth3Dhtml ¶
func (*API) SetStoreKey ¶
func (*API) Transaction ¶
type Pb ¶
type Pb struct { OrderType string `xml:"OrderType,omitempty"` TotalNumberPayments string `xml:"TotalNumberPayments,omitempty"` OrderFrequencyCycle string `xml:"OrderFrequencyCycle,omitempty"` OrderFrequencyInterval string `xml:"OrderFrequencyInterval,omitempty"` Desc string `xml:"Desc,omitempty"` Price string `xml:"Price,omitempty"` Total string `xml:"Total,omitempty"` }
type Request ¶
type Request struct { XMLName xml.Name `xml:"CC5Request,omitempty"` Username string `xml:"Name,omitempty"` Password string `xml:"Password,omitempty"` ClientId string `xml:"ClientId,omitempty" form:"clientid,omitempty"` OrderId string `xml:"OrderId,omitempty" form:"oid,omitempty"` GroupId string `xml:"GroupId,omitempty"` TransId string `xml:"TransId,omitempty"` UserId string `xml:"UserId,omitempty"` IPAddress string `xml:"IPAddress,omitempty" form:"clientip,omitempty"` Email string `xml:"Email,omitempty"` Mode string `xml:"Mode,omitempty"` CardType string `xml:",omitempty" form:"cardtype,omitempty"` StoreType string `xml:",omitempty" form:"storetype,omitempty"` StoreKey string `xml:",omitempty" form:"storekey,omitempty"` Type string `xml:"Type,omitempty" form:"TranType,omitempty"` CardNumber string `xml:"Number,omitempty" form:"pan,omitempty"` CardMonth string `xml:",omitempty" form:"Ecom_Payment_Card_ExpDate_Month,omitempty"` CardYear string `xml:",omitempty" form:"Ecom_Payment_Card_ExpDate_Year,omitempty"` CardExpiry string `xml:"Expires,omitempty"` CardCode string `xml:"Cvv2Val,omitempty" form:"cv2,omitempty"` Total string `xml:"Total,omitempty" form:"amount,omitempty"` Currency string `xml:"Currency,omitempty" form:"currency,omitempty"` Installment string `xml:"Instalment,omitempty" form:"Instalment,omitempty"` Taksit string `xml:"Taksit,omitempty" form:"Taksit,omitempty"` XID string `xml:"PayerTxnId,omitempty"` ECI string `xml:"PayerSecurityLevel,omitempty"` CAVV string `xml:"PayerAuthenticationCode,omitempty"` PresentCode string `xml:"CardholderPresentCode,omitempty"` BillTo *To `xml:"BillTo,omitempty"` ShipTo *To `xml:"ShipTo,omitempty"` PbOrder *Pb `xml:"PbOrder,omitempty"` OrderItemList *ItemList `xml:"OrderItemList,omitempty"` Random string `xml:",omitempty" form:"rnd,omitempty"` Hash string `xml:",omitempty" form:"hash,omitempty"` HashAlgorithm string `xml:",omitempty" form:"hashAlgorithm,omitempty"` OkUrl string `xml:",omitempty" form:"okUrl,omitempty"` FailUrl string `xml:",omitempty" form:"failUrl,omitempty"` Lang string `xml:"lang,omitempty" form:"lang,omitempty"` Encoding string `xml:"encoding,omitempty" form:"encoding,omitempty"` VersionInfo string `xml:"VersionInfo,omitempty"` }
func (*Request) SetCardCode ¶
func (*Request) SetCardExpiry ¶
func (*Request) SetCardHolder ¶
func (*Request) SetCardNumber ¶
func (*Request) SetCurrency ¶
func (*Request) SetIPAddress ¶
func (*Request) SetInstallment ¶
func (*Request) SetOrderId ¶
func (*Request) SetPhoneNumber ¶
type Response ¶
type Response struct { XMLName xml.Name `xml:"CC5Response,omitempty"` OrderId string `xml:"OrderId,omitempty"` GroupId string `xml:"GroupId,omitempty"` TransId string `xml:"TransId,omitempty"` Response string `xml:"Response,omitempty"` AuthCode string `xml:"AuthCode,omitempty"` HostRefNum string `xml:"HostRefNum,omitempty"` ProcReturnCode string `xml:"ProcReturnCode,omitempty"` ErrMsg string `xml:"ErrMsg,omitempty"` }
type To ¶
type To struct { Name string `xml:"Name,omitempty" form:"BillToName,omitempty"` Company string `xml:"Company,omitempty" form:"BillToCompany,omitempty"` Street1 string `xml:"Street1,omitempty"` Street2 string `xml:"Street2,omitempty"` Street3 string `xml:"Street3,omitempty"` City string `xml:"City,omitempty"` StateProv string `xml:"StateProv,omitempty"` PostalCode string `xml:"PostalCode,omitempty"` Country string `xml:"Country,omitempty"` Phone string `xml:"TelVoice,omitempty" form:"phone,omitempty"` }
Click to show internal directories.
Click to hide internal directories.