소스 검색

Add expiration details

Mauricio Araujo 2 년 전
부모
커밋
ecd7f6877b
2개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      api/types/billing.go
  2. 2 0
      internal/billing/stripe.go

+ 2 - 0
api/types/billing.go

@@ -11,4 +11,6 @@ type PaymentMethod = struct {
 	ID           string `json:"id"`
 	DisplayBrand string `json:"display_brand"`
 	Last4        string `json:"last4"`
+	ExpMonth     int64  `json:"exp_month"`
+	ExpYear      int64  `json:"exp_year"`
 }

+ 2 - 0
internal/billing/stripe.go

@@ -73,6 +73,8 @@ func (s *StripeBillingManager) ListPaymentMethod(proj *models.Project) (paymentM
 			ID:           stripePaymentMethod.ID,
 			DisplayBrand: stripePaymentMethod.Card.DisplayBrand,
 			Last4:        stripePaymentMethod.Card.Last4,
+			ExpMonth:     stripePaymentMethod.Card.ExpMonth,
+			ExpYear:      stripePaymentMethod.Card.ExpYear,
 		})
 	}