Documentation
¶
Overview ¶
Package callbacks implements the payment gateway callback subdomain of the billing module: it authenticates EPay/Stripe/Alipay/Cryptomus notifications, verifies them against the order's immutable payment expectation, re-confirms with the gateway and settles the payment. Only the module facade may reach it.
Index ¶
- type EPayNotifyMeta
- type Service
- func (s *Service) AlipayNotify(ctx context.Context, form url.Values) error
- func (s *Service) CryptomusNotify(ctx context.Context, payload []byte) error
- func (s *Service) EPayNotify(ctx context.Context, meta EPayNotifyMeta, req *dto.EPayNotifyRequest) error
- func (s *Service) StripeNotify(ctx context.Context, payload []byte, signature string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EPayNotifyMeta ¶
EPayNotifyMeta carries the raw callback transport details needed to verify the gateway signature.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(orders repository.OrderRepo, queue settle.Queue) *Service
func (*Service) AlipayNotify ¶
AlipayNotify authenticates and settles an Alipay F2F notification.
func (*Service) CryptomusNotify ¶ added in v1.15.17
CryptomusNotify authenticates and settles a Cryptomus webhook. The payload signature proves the gateway sent it; the settlement is still re-confirmed against the gateway's payment-info API before money is accepted, mirroring the EPay callback's defense in depth.
func (*Service) EPayNotify ¶
func (s *Service) EPayNotify(ctx context.Context, meta EPayNotifyMeta, req *dto.EPayNotifyRequest) error
EPayNotify authenticates and settles an EPay gateway callback.