Documentation
¶
Index ¶
- Variables
- func Amount(amount string) string
- func Api(merchant, terminal string) (*API, *Request)
- func B64(data string) (hash string)
- func Currency(currency string) string
- func D64(data string) []byte
- func Expiry(month, year string) string
- func Installment(installment string) string
- func MAC(xid, amount, currency, mid, key, tid, extra string) (mac string)
- func QueryString(v interface{}) (url.Values, error)
- func SHA256(data string) (hash string)
- func String(v reflect.Value) string
- func XID(n int) string
- type API
- type Auth
- type Cancel
- type Card
- type Form
- type OOS
- type OOSMerchant
- type OOSTran
- type PostAuth
- type PreAuth
- type Refund
- type Request
- type Response
Constants ¶
This section is empty.
Variables ¶
View Source
var Currencies = map[string]string{
"TRY": "TL",
"YTL": "TL",
"TRL": "TL",
"TL": "TL",
"USD": "US",
"US": "US",
"EUR": "EU",
"EU": "EU",
}
View Source
var EndPoints = map[string]string{
"PROD": "https://posnet.yapikredi.com.tr/PosnetWebService/XML",
"PROD3D": "https://posnet.yapikredi.com.tr/3DSWebService/YKBPaymentService",
"TEST": "https://setmpos.ykb.com/PosnetWebService/XML",
"TEST3D": "https://setmpos.ykb.com/3DSWebService/YKBPaymentService",
}
Functions ¶
func Installment ¶
func QueryString ¶
Types ¶
type API ¶
func (*API) Transaction ¶
type Auth ¶
type Auth struct { Card *Card `xml:"cardInfo,omitempty"` CardNumber string `xml:"ccno,omitempty"` CardExpiry string `xml:"expDate,omitempty"` CardCode string `xml:"cvc,omitempty"` Amount string `xml:"amount,omitempty"` Currency string `xml:"currencyCode,omitempty"` Installment string `xml:"installment,omitempty"` OrderId string `xml:"orderID,omitempty"` Mailorder string `xml:"mailorderflag,omitempty"` }
type Form ¶
type Form struct { MerchantID string `form:"mid,omitempty"` PosnetID string `form:"posnetID,omitempty"` Data1 string `form:"posnetData,omitempty"` Data2 string `form:"posnetData2,omitempty"` Sign string `form:"digest,omitempty"` VftCode string `form:"vftCode,omitempty"` ReturnUrl string `form:"merchantReturnURL,omitempty"` Url string `form:"url,omitempty"` NewWindow string `form:"openANewWindow,omitempty"` Lang string `form:"lang,omitempty"` }
type OOS ¶
type OOS struct { PosnetID string `xml:"posnetid,omitempty"` XID string `xml:"XID,omitempty"` TranType string `xml:"tranType,omitempty"` CardHolder string `xml:"cardHolderName,omitempty"` CardNumber string `xml:"ccno,omitempty"` CardExpiry string `xml:"expDate,omitempty"` CardCode string `xml:"cvc,omitempty"` Amount string `xml:"amount,omitempty"` Currency string `xml:"currencyCode,omitempty"` Installment string `xml:"installment,omitempty"` }
type OOSMerchant ¶
type PreAuth ¶
type PreAuth struct { Card *Card `xml:"cardInfo,omitempty"` CardNumber string `xml:"ccno,omitempty"` CardExpiry string `xml:"expDate,omitempty"` CardCode string `xml:"cvc,omitempty"` Amount string `xml:"amount,omitempty"` Currency string `xml:"currencyCode,omitempty"` Installment string `xml:"installment,omitempty"` OrderId string `xml:"orderID,omitempty"` }
type Request ¶
type Request struct { XMLName xml.Name `xml:"posnetRequest,omitempty"` MerchantID string `xml:"mid,omitempty"` TerminalID string `xml:"tid,omitempty"` TranDate string `xml:"tranDateRequired,omitempty"` OOS *OOS `xml:"oosRequestData,omitempty"` OOSMerchant *OOSMerchant `xml:"oosResolveMerchantData,omitempty"` OOSTran *OOSTran `xml:"oosTranData,omitempty"` PreAuth *PreAuth `xml:"auth,omitempty"` Auth *Auth `xml:"sale,omitempty"` PostAuth *PostAuth `xml:"capt,omitempty"` Refund *Refund `xml:"return,omitempty"` Cancel *Cancel `xml:"reverse,omitempty"` }
type Response ¶
type Response struct { XMLName xml.Name `xml:"posnetResponse,omitempty"` Approved string `xml:"approved,omitempty"` HostLogKey string `xml:"hostlogkey,omitempty"` AuthCode string `xml:"authCode,omitempty"` ErrorCode string `xml:"respCode,omitempty"` ErrorText string `xml:"respText,omitempty"` TranDate string `xml:"tranDate,omitempty"` YourIP string `xml:"yourIP,omitempty"` MAC string `xml:"mac,omitempty"` OOS struct { Data1 string `xml:"data1,omitempty"` Data2 string `xml:"data2,omitempty"` Sign string `xml:"sign,omitempty"` } `xml:"oosRequestDataResponse,omitempty"` OOSMerchant struct { XID string `xml:"XID,omitempty"` Amount string `xml:"amount,omitempty"` Currency string `xml:"currency,omitempty"` Installment string `xml:"installment,omitempty"` TxStatus string `xml:"txStatus,omitempty"` MdStatus string `xml:"mdStatus,omitempty"` MdError string `xml:"mdErrorMessage,omitempty"` MAC string `xml:"mac,omitempty"` } `xml:"oosResolveMerchantDataResponse,omitempty"` }
Click to show internal directories.
Click to hide internal directories.