payment

package
v0.0.0-...-654a53c Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

支付应用服务

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	*state.STDCtx
}

func New

func New() *Service

func WithGinContext

func WithGinContext(ctx *gin.Context) *Service

func (*Service) AccomplishPayment

func (s *Service) AccomplishPayment(accountId uint, payId string) error

完成支付 立即取消解冻定时器,执行扣减库存和资金 意味着客户已经完成付款,这个方法在正式业务中应当作为三方支付平台的回调,而演示项目就直接由客户端发起调用了

func (*Service) AccomplishSettlement

func (s *Service) AccomplishSettlement(payState domain.PayState, payId string)

根据支付状态,实际调整库存(扣减库存或者解冻)

func (*Service) CancelPayment

func (s *Service) CancelPayment(payId string) error

取消支付 立即取消解冻定时器,执行扣减库存和资金 意味着客户已经完成付款,这个方法在正式业务中应当作为三方支付平台的回调,而演示项目就直接由客户端发起调用了

func (*Service) ExecuteBySettlement

func (s *Service) ExecuteBySettlement(bill *domain.Settlement) *domain.Payment

根据结算清单的内容执行,生成对应的支付单

func (*Service) ProducePayment

func (s *Service) ProducePayment(bill *domain.Settlement) *domain.Payment

生成支付单 根据结算单冻结指定的货物,计算总价,生成支付单

func (*Service) ReplenishProductInformation

func (s *Service) ReplenishProductInformation(bill *domain.Settlement)

根据结算单中货物的ID,填充货物的完整信息到结算单对象上

type StockpileService

type StockpileService struct {
	*state.STDCtx
}

type WalletService

type WalletService struct {
	*state.STDCtx
}

Jump to

Keyboard shortcuts

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