Versions in this module Expand all Collapse all v0 v0.1.3 Sep 26, 2020 Changes in this version + func FormatCreditInstallmentOption(option CreditInstallmentOption) string + func FormatDate(time time.Time) string + func FormatDatetime(time time.Time) string + func FormatIgnorePayment(option IgnorePaymentOption) string + func FormatInvoiceItem(items []string) string + func FormatItemName(items []string) string + func GeneratePostForm(action string, form url.Values) string + func GetCheckMacValue(req url.Values, hashKey, hashIV string) string + func ParseQueryString(q string) (map[string]interface{}, error) + func WithSandbox(client *Client) error + type ATMParam struct + ClientRedirectURL string + ExpireDate int + PaymentInfoURL string + type ActionType string + const ActionTypeC + const ActionTypeE + const ActionTypeN + const ActionTypeR + type AllocateStatusType string + const AllocateStatusTypeDone + const AllocateStatusTypeNotYet + type BindingCardType string + const BindingCardTypeNo + const BindingCardTypeYes + type CVSOrBarcodeParam struct + ClientRedirectURL string + Desc1 string + Desc2 string + Desc3 string + Desc4 string + PaymentInfoURL string + StoreExpireDate int + type CarrierType string + const CarrierTypeCellphone + const CarrierTypeCitizen + const CarrierTypeMember + const CarrierTypeNone + type CharSetType string + const CharSetTypeBig5 + const CharSetTypeUTF8 + type ChoosePaymentType string + const ChoosePaymentTypeATM + const ChoosePaymentTypeAll + const ChoosePaymentTypeBarCode + const ChoosePaymentTypeCVS + const ChoosePaymentTypeCredit + const ChoosePaymentTypeGooglePay + const ChoosePaymentTypeWebATM + type ChooseSubpaymentType string + const ChooseSubpaymentTypeBOT + const ChooseSubpaymentTypeBarcode + const ChooseSubpaymentTypeCVS + const ChooseSubpaymentTypeCathay + const ChooseSubpaymentTypeChinaTrust + const ChooseSubpaymentTypeESUN + const ChooseSubpaymentTypeFamily + const ChooseSubpaymentTypeFirst + const ChooseSubpaymentTypeFubon + const ChooseSubpaymentTypeHiLife + const ChooseSubpaymentTypeIBon + const ChooseSubpaymentTypeLand + const ChooseSubpaymentTypeMega + const ChooseSubpaymentTypeOK + const ChooseSubpaymentTypeSinoPac + const ChooseSubpaymentTypeTachong + const ChooseSubpaymentTypeTaishin + type ClearanceMarkType string + const ClearanceMarkTypeCustoms + const ClearanceMarkTypeNormal + type Client struct + func NewClient(merchantID, hashKey, hashIV string, options ...ClientOption) (*Client, error) + func (c *Client) AioCheckOut(order Order) (string, error) + func (c *Client) DoAction(action CreditCardAction) (map[string]interface{}, error) + func (c *Client) FundingReconDetail(statement Statement) (string, error) + func (c *Client) Info() map[string]string + func (c *Client) QueryCreditCardPeriodInfo(info CreditCardPeriodInfo) (map[string]interface{}, error) + func (c *Client) QueryPaymentInfo(info PaymentInfo) (map[string]interface{}, error) + func (c *Client) QueryTrade(trade Trade) (map[string]interface{}, error) + func (c *Client) QueryTradeInfo(info TradeInfo) (map[string]interface{}, error) + func (c *Client) TradeNoAio(statement CreditCardStatement) (string, error) + type ClientOption func(*Client) error + type CreditCardAction struct + Action ActionType + MerchantTradeNo string + PlatformID string + TotalAmount int + TradeNo string + func (a CreditCardAction) ToFormData() url.Values + func (a CreditCardAction) Validate() (bool, error) + type CreditCardPeriodInfo struct + MerchantTradeNo string + PlatformID string + TimeStamp int64 + func (c CreditCardPeriodInfo) ToFormData() url.Values + func (c CreditCardPeriodInfo) Validate() (bool, error) + type CreditCardStatement struct + AllocateStatus AllocateStatusType + BeginDate string + CharSet CharSetType + DateType DateType + EndDate string + MediaFormated MediaFormatedType + MerchantTradeNo string + PaymentStatus PaymentStatusType + PaymentType MerchantPaymentType + PlatformStatus PlatformStatusType + func (s CreditCardStatement) ToFormData() url.Values + func (s CreditCardStatement) Validate() (bool, error) + type CreditInstallmentOption struct + Month12 bool + Month18 bool + Month24 bool + Month3 bool + Month6 bool + Month9 bool + type CreditParam struct + BindingCard BindingCardType + CreditInstallment string + ExecTimes int + Frequency int + Language string + MerchantMemberID string + PeriodAmount int + PeriodReturnURL string + PeriodType PeriodType + Redeem RedeemType + UnionPay UnionPayType + type DateType string + const DateTypeAllocation + const DateTypeOrder + const DateTypePayment + type DonationType string + const DonationTypeNo + const DonationTypeYes + type IgnorePaymentOption struct + ATM bool + Barcode bool + CVS bool + Credit bool + WebATM bool + type InvoiceMarkType string + const InvoiceMarkTypeNo + const InvoiceMarkTypeYes + type InvoiceParam struct + CarrierNum string + CarrierType CarrierType + ClearanceMark ClearanceMarkType + CustomerAddr string + CustomerEmail string + CustomerID string + CustomerIdentifier string + CustomerName string + CustomerPhone string + DelayDay int + Donation DonationType + InvType string + InvoiceItemCount string + InvoiceItemName string + InvoiceItemPrice string + InvoiceItemTaxType string + InvoiceItemWord string + InvoiceRemark string + LoveCode string + Print PrintType + RelateNumber string + TaxType TaxType + type InvoiceType string + const InvoiceTypeGeneral + const InvoiceTypeSpecial + type LanguageType string + const LanguageTypeEnglish + const LanguageTypeJapanese + const LanguageTypeKorean + const LanguageTypeSimplifiedChinese + type MediaFormatedType string + const MediaFormatedTypeNew + const MediaFormatedTypeOld + type MerchantPaymentType string + const MerchantPaymentTypeATM + const MerchantPaymentTypeBarcode + const MerchantPaymentTypeCVS + const MerchantPaymentTypeCreditCard + const MerchantPaymentTypeWebATM + type NeedExtraPaidInfoType string + const NeedExtraPaidInfoTypeNo + const NeedExtraPaidInfoTypeYes + type Order struct + ATM *ATMParam + CVSBarcode *CVSOrBarcodeParam + ChoosePayment ChoosePaymentType + ChooseSubPayment ChooseSubpaymentType + ClientBackURL string + Credit *CreditParam + CustomField1 string + CustomField2 string + CustomField3 string + CustomField4 string + DeviceSource string + EncryptType string + IgnorePayment string + Invoice *InvoiceParam + InvoiceMark InvoiceMarkType + ItemName string + ItemURL string + Language LanguageType + MerchantTradeDate string + MerchantTradeNo string + NeedExtraPaidInfo NeedExtraPaidInfoType + OrderResultURL string + PaymentType PaymentType + PlatformID string + Remark string + ReturnURL string + StoreID string + TotalAmount int + TradeDesc string + func (o Order) ToFormData() url.Values + func (o Order) Validate() (bool, error) + type PayDateType string + const PayDateTypeClose + const PayDateTypeEnter + const PayDateTypeFund + type Payload interface + ToFormData func() url.Values + Validate func() (bool, error) + type PaymentInfo struct + MerchantTradeNo string + PlatformID string + TimeStamp int64 + func (t PaymentInfo) ToFormData() url.Values + func (t PaymentInfo) Validate() (bool, error) + type PaymentStatusType string + const PaymentStatusTypeFailed + const PaymentStatusTypePaid + const PaymentStatusTypeUnpaid + type PaymentType string + const PaymentTypeAIO + const PaymentTypeATMCathay + const PaymentTypeATMESUN + const PaymentTypeATMFirst + const PaymentTypeATMFubon + const PaymentTypeCVSCVS + const PaymentTypeCVSFamily + const PaymentTypeCVSIbon + const PaymentTypeCreditCreditCard + const PaymentTypeWebATMBOT + const PaymentTypeWebATMCathay + const PaymentTypeWebATMChinaTrust + const PaymentTypeWebATMLand + const PaymentTypeWebATMSinoPac + const PaymentTypeWebATMTaishin + type PeriodType string + const PeriodTypeDay + const PeriodTypeMonth + const PeriodTypeYear + type PlatformStatusType string + const PlatformStatusTypeAll + const PlatformStatusTypeNormal + const PlatformStatusTypePlatform + type PrintType string + const PrintTypeNo + const PrintTypeYes + type RedeemType string + const RedeemTypeNo + const RedeemTypeYes + type Statement struct + AllocateStatus string + BeginDate string + CharSet string + EndDate string + MediaFormated string + MerchantTradeNo string + PayDateType PayDateType + PaymentStatus string + PaymentType string + PlatformStatus string + func (s Statement) ToFormData() url.Values + func (s Statement) Validate() (bool, error) + type TaxType string + const TaxTypeDutiable + const TaxTypeFree + const TaxTypeMix + const TaxTypeZero + type Trade struct + CreditAmount int + CreditCheckCode string + CreditRefundID string + func (o Trade) ToFormData() url.Values + func (o Trade) Validate() (bool, error) + type TradeInfo struct + MerchantTradeNo string + PlatformID string + TimeStamp string + func (t TradeInfo) ToFormData() url.Values + func (t TradeInfo) Validate() (bool, error) + type UnionPayType string + const UnionPayTypeHidden + const UnionPayTypeOnly + const UnionPayTypeSelect