CreateOrderService

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateOrderService

type CreateOrderService struct {
	BaseURL                 string
	WebBaseURL              string
	FabricID                string
	MerchantID              string
	MerchantCode            string
	NotifyPath              string
	PrivateKeyPEM           string
	ReturnURL               string
	ApplyFabricTokenService *ApplyFabricToken.ApplyFabricTokenService
	Client                  *http.Client
}

===CreateOrderService===

func NewCreateOrderService

func NewCreateOrderService(
	baseURL, webBaseURL, fabricID, merchantID, merchantCode, notifyPath, privateKeyPEM, returnURL string,
	applyFabricTokenService *ApplyFabricToken.ApplyFabricTokenService, opts ...Option,
) *CreateOrderService

func (*CreateOrderService) CreateOrder

func (s *CreateOrderService) CreateOrder(title, amount string) (string, error)

type Option added in v0.0.6

type Option func(*CreateOrderService)

func WithClient added in v0.0.6

func WithClient(client *http.Client) Option

type PreOrderBizContent

type PreOrderBizContent struct {
	PrepayID     string `json:"prepay_id"`
	MerchOrderID string `json:"merch_order_id"`
}

type PreOrderResponse

type PreOrderResponse struct {
	Result     string             `json:"result"`
	Code       string             `json:"code"`
	Msg        string             `json:"msg"`
	BizContent PreOrderBizContent `json:"biz_content"`
	NonceStr   string             `json:"nonce_str"`
	Sign       string             `json:"sign"`
	SignType   string             `json:"sign_type"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL