-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathstripe_card_payment.go
46 lines (42 loc) · 1.04 KB
/
stripe_card_payment.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package anor
import (
"context"
"github.com/shopspring/decimal"
"time"
)
type StripeCardPayment struct {
ID int64
OrderID int64
UserID int64
BillingAddressID int64
PaymentIntentID string
PaymentMethodID string
Amount decimal.Decimal
Currency string
Status string
ClientSecret string
LastError string
CardLast4 string
CardBrand string
CreatedAt time.Time
UpdatedAt time.Time
}
type StripePaymentCreateParams struct {
OrderID int64
UserID int64
BillingAddressID int64
PaymentIntentID string
PaymentMethodID string
Amount decimal.Decimal
Currency string
Status string
ClientSecret string
LastError string
CardLast4 string
CardBrand string
CreatedAt time.Time
}
type StripePaymentService interface {
GetByOrderID(ctx context.Context, orderID int64) (StripeCardPayment, error)
Create(ctx context.Context, params StripePaymentCreateParams) error
}