add payment settting
This commit is contained in:
1 parent
0971158e98
commit
b8455625b5
21 files changed
+1760
-12
No files matched your search
@@ -0,0 +1,25 @@
|
||||
package visamasterpay
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
)
|
||||
|
||||
// ErrAlreadyPaid is returned when the order has already been paid out (or
|
||||
// was paid by a concurrent request that won the race).
|
||||
var ErrAlreadyPaid = errors.New("order already paid")
|
||||
|
||||
// ErrAmountNotSet is returned when the order has no amount_usd set yet.
|
||||
var ErrAmountNotSet = errors.New("order has no requested amount")
|
||||
|
||||
// ErrAmountExceedsMax is returned when the submitted amountTmt is above
|
||||
// what the order's amount_usd converts to at the current rate.
|
||||
var ErrAmountExceedsMax = errors.New("amount exceeds the order's requested amount")
|
||||
|
||||
type Repository interface {
|
||||
// OwnerInfo returns the order's owner/branch so the handler can run
|
||||
// rbac.GuardOrder without importing cards/visamaster.
|
||||
OwnerInfo(ctx context.Context, orderID int64) (userID *int64, branchID int64, err error)
|
||||
Quote(ctx context.Context, orderID int64) (PaymentQuoteDTO, error)
|
||||
Pay(ctx context.Context, orderID int64, dto PayOrderDTO) (PaymentResultDTO, error)
|
||||
}
|
||||
Reference in new issue
Block a user