Documentation ¶
Index ¶
- func HandlePayment(w http.ResponseWriter, r *http.Request) error
- func HandlePaymentShow(w http.ResponseWriter, r *http.Request) error
- type Address
- type BillingDetails
- type CustomerDetails
- type Data
- type Email
- type Event
- type EventSubscriptionModel
- type MetaData
- type Object
- type Time
- type TotalDetails
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandlePayment ¶
func HandlePayment(w http.ResponseWriter, r *http.Request) error
HandlePayment enables the subscription features after payment
func HandlePaymentShow ¶
func HandlePaymentShow(w http.ResponseWriter, r *http.Request) error
HandlePaymentShow shows the subscriptions page by responding to the GET request
Types ¶
type BillingDetails ¶
type CustomerDetails ¶
type CustomerDetails struct {
Email string `json:"email"`
}
type Event ¶
type Event struct { ID string `json:"id"` Data Data `json:"data"` Created Time `json:"created"` Subscription string `json:"subscription"` }
Stripe event object
type EventSubscriptionModel ¶
type EventSubscriptionModel struct { MerchantID string `json:"merchant_id"` Type string `json:"type"` EventID string `json:"event_id"` CreatedAt time.Time `json:"created_at"` Data struct { Type string `json:"type"` ID string `json:"id"` Object struct { Subscription struct { ID string `json:"id"` CreatedDate string `json:"created_date"` CustomerID string `json:"customer_id"` LocationID string `json:"location_id"` PlanID string `json:"plan_id"` StartDate string `json:"start_date"` Status string `json:"status"` TaxPercentage string `json:"tax_percentage"` Timezone string `json:"timezone"` Version int64 `json:"version"` } `json:"subscription"` } `json:"object"` } `json:"data"` }
type Object ¶
type Object struct { ID string `json:"id"` AmountSubTotal float64 `json:"amount_subtotal"` AmountTotal float64 `json:"amount_total"` Currency string `json:"currency"` Customer string `json:"customer"` CustomerDetails CustomerDetails `json:"customer_details"` CustomerEmail string `json:"customer_email"` Subscription string `json:"subscription"` MetaData MetaData `json:"metadata"` Mode string `json:"mode"` PaymentStatus string `json:"payment_status"` TotalDetails TotalDetails `json:"total_details"` PaymentIntent string `json:"payment_intent"` BillingDetails BillingDetails `json:"billing_details"` }
type Time ¶
func (*Time) UnmarshalJSON ¶
returns time.Now() no matter what!
type TotalDetails ¶
Click to show internal directories.
Click to hide internal directories.