Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatMoney ¶ added in v1.14.0
FormatMoney returns the exact two-decimal amount sent to an EPay-compatible gateway. It intentionally preserves the historical truncation behaviour.
func ParseMoney ¶ added in v1.14.0
ParseMoney converts a non-negative decimal amount to its integer minor unit. It rejects floats, exponents and values with more than two decimal places.
Types ¶
type Client ¶
type Client struct {
Pid string
Url string
Key string
Type string
// contains filtered or unexported fields
}
func (*Client) CreatePayUrl ¶
func (*Client) QueryOrder ¶ added in v1.14.0
func (c *Client) QueryOrder(orderNo string) (*QueryResult, error)
QueryOrder obtains authoritative payment details directly from the gateway. A successful HTTP response is not enough: EPay-compatible gateways use code=1 to indicate a successful lookup and status=1 to indicate a paid order.
func (*Client) QueryOrderStatus ¶
QueryOrderStatus is kept for callers that only need a status boolean.
Click to show internal directories.
Click to hide internal directories.