Documentation ¶
Overview ¶
Code generated by "enumerator -type EvidenceDelivery -linecomment -empty"; DO NOT EDIT.
Code generated by "enumerator -type FeeType"; DO NOT EDIT.
Code generated by "enumerator -type PreviousFee -empty"; DO NOT EDIT.
Index ¶
- Constants
- Variables
- func Cost(feeType FeeType, previousFee PreviousFee) int
- type AuthorisationSummary
- type BillingAddress
- type CardDetails
- type Client
- type CreatePaymentBody
- type CreatePaymentResponse
- type Doer
- type EventClient
- type EvidenceDelivery
- type EvidenceDeliveryOptions
- type FeeType
- func (i FeeType) IsFullFee() bool
- func (i FeeType) IsHalfFee() bool
- func (i FeeType) IsHardshipFee() bool
- func (i FeeType) IsNoFee() bool
- func (i FeeType) IsRepeatApplicationFee() bool
- func (i FeeType) MarshalText() ([]byte, error)
- func (i FeeType) String() string
- func (i *FeeType) UnmarshalText(text []byte) error
- type FeeTypeOptions
- type GetPaymentResponse
- type Link
- type Logger
- type PreviousFee
- func (i PreviousFee) Empty() bool
- func (i PreviousFee) IsPreviousFeeExemption() bool
- func (i PreviousFee) IsPreviousFeeFull() bool
- func (i PreviousFee) IsPreviousFeeHalf() bool
- func (i PreviousFee) IsPreviousFeeHardship() bool
- func (i PreviousFee) MarshalText() ([]byte, error)
- func (i PreviousFee) String() string
- func (i *PreviousFee) UnmarshalText(text []byte) error
- type PreviousFeeOptions
- type RefundSummary
- type SettlementSummary
- type State
- type ThreeDSecure
Constants ¶
View Source
const (
PaymentPublicServiceUrl = "https://www.payments.service.gov.uk"
)
Variables ¶
View Source
var EvidenceDeliveryValues = EvidenceDeliveryOptions{ Upload: Upload, Post: Post, }
View Source
var FeeTypeValues = FeeTypeOptions{ FullFee: FullFee, HalfFee: HalfFee, NoFee: NoFee, HardshipFee: HardshipFee, RepeatApplicationFee: RepeatApplicationFee, }
View Source
var PreviousFeeValues = PreviousFeeOptions{ PreviousFeeFull: PreviousFeeFull, PreviousFeeHalf: PreviousFeeHalf, PreviousFeeExemption: PreviousFeeExemption, PreviousFeeHardship: PreviousFeeHardship, }
Functions ¶
func Cost ¶ added in v0.795.0
func Cost(feeType FeeType, previousFee PreviousFee) int
Types ¶
type AuthorisationSummary ¶
type AuthorisationSummary struct {
ThreeDSecure ThreeDSecure `json:"three_d_secure"`
}
type BillingAddress ¶
type CardDetails ¶
type CardDetails struct { CardBrand string `json:"card_brand"` CardType string `json:"card_type"` LastDigitsCardNumber string `json:"last_digits_card_number"` FirstDigitsCardNumber string `json:"first_digits_card_number"` ExpiryDate string `json:"expiry_date"` CardholderName string `json:"cardholder_name"` BillingAddress BillingAddress `json:"billing_address"` }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶ added in v0.1183.0
func New(logger Logger, doer Doer, eventClient EventClient, baseURL, apiKey string) *Client
func (*Client) CreatePayment ¶
func (c *Client) CreatePayment(ctx context.Context, lpaUID string, body CreatePaymentBody) (*CreatePaymentResponse, error)
func (*Client) GetPayment ¶
type CreatePaymentBody ¶
type CreatePaymentResponse ¶
type CreatePaymentResponse struct { CreatedDate time.Time `json:"created_date"` State State `json:"State"` Links map[string]Link `json:"_links"` Amount int `json:"amount"` Reference string `json:"reference"` Description string `json:"description"` ReturnURL string `json:"return_url"` PaymentID string `json:"payment_id"` PaymentProvider string `json:"payment_provider"` ProviderID string `json:"provider_id"` }
type EventClient ¶ added in v0.1183.0
type EventClient interface {
SendPaymentCreated(ctx context.Context, e event.PaymentCreated) error
}
type EvidenceDelivery ¶ added in v0.795.0
type EvidenceDelivery uint8
const ( Upload EvidenceDelivery = iota + 1 // upload Post // post )
func ParseEvidenceDelivery ¶ added in v0.795.0
func ParseEvidenceDelivery(s string) (EvidenceDelivery, error)
func (EvidenceDelivery) Empty ¶ added in v0.795.0
func (i EvidenceDelivery) Empty() bool
func (EvidenceDelivery) IsPost ¶ added in v0.795.0
func (i EvidenceDelivery) IsPost() bool
func (EvidenceDelivery) IsUpload ¶ added in v0.795.0
func (i EvidenceDelivery) IsUpload() bool
func (EvidenceDelivery) MarshalText ¶ added in v0.912.0
func (i EvidenceDelivery) MarshalText() ([]byte, error)
func (EvidenceDelivery) String ¶ added in v0.795.0
func (i EvidenceDelivery) String() string
func (*EvidenceDelivery) UnmarshalText ¶ added in v0.1095.0
func (i *EvidenceDelivery) UnmarshalText(text []byte) error
type EvidenceDeliveryOptions ¶ added in v0.795.0
type EvidenceDeliveryOptions struct { Upload EvidenceDelivery Post EvidenceDelivery }
type FeeType ¶ added in v0.795.0
type FeeType uint8
func ParseFeeType ¶ added in v0.795.0
func (FeeType) IsHardshipFee ¶ added in v0.795.0
func (FeeType) IsRepeatApplicationFee ¶ added in v0.795.0
func (FeeType) MarshalText ¶ added in v0.912.0
func (*FeeType) UnmarshalText ¶ added in v0.1095.0
type FeeTypeOptions ¶ added in v0.795.0
type GetPaymentResponse ¶
type GetPaymentResponse struct { CreatedDate time.Time `json:"created_date"` Amount int `json:"amount"` State State `json:"State"` Description string `json:"description"` Reference string `json:"reference"` Language string `json:"language"` //May be useful but until we define if/what we send in CreatePayment we can't marshal the response // //Metadata struct { // LedgerCode string `json:"ledger_code"` // AnInternalReferenceNumber int `json:"an_internal_reference_number"` //} `json:"metadata"` Email string `json:"email"` CardDetails CardDetails `json:"card_details"` PaymentID string `json:"payment_id"` AuthorisationSummary AuthorisationSummary `json:"authorisation_summary"` RefundSummary RefundSummary `json:"refund_summary"` SettlementSummary SettlementSummary `json:"settlement_summary"` DelayedCapture bool `json:"delayed_capture"` Moto bool `json:"moto"` CorporateCardSurcharge int `json:"corporate_card_surcharge"` TotalAmount int `json:"total_amount"` Fee int `json:"fee"` NetAmount int `json:"net_amount"` PaymentProvider string `json:"payment_provider"` ProviderID string `json:"provider_id"` ReturnURL string `json:"return_url"` }
type PreviousFee ¶ added in v0.795.0
type PreviousFee uint8
const ( PreviousFeeFull PreviousFee = iota + 1 PreviousFeeHalf PreviousFeeExemption PreviousFeeHardship )
func ParsePreviousFee ¶ added in v0.795.0
func ParsePreviousFee(s string) (PreviousFee, error)
func (PreviousFee) Empty ¶ added in v0.795.0
func (i PreviousFee) Empty() bool
func (PreviousFee) IsPreviousFeeExemption ¶ added in v0.795.0
func (i PreviousFee) IsPreviousFeeExemption() bool
func (PreviousFee) IsPreviousFeeFull ¶ added in v0.795.0
func (i PreviousFee) IsPreviousFeeFull() bool
func (PreviousFee) IsPreviousFeeHalf ¶ added in v0.795.0
func (i PreviousFee) IsPreviousFeeHalf() bool
func (PreviousFee) IsPreviousFeeHardship ¶ added in v0.795.0
func (i PreviousFee) IsPreviousFeeHardship() bool
func (PreviousFee) MarshalText ¶ added in v0.912.0
func (i PreviousFee) MarshalText() ([]byte, error)
func (PreviousFee) String ¶ added in v0.795.0
func (i PreviousFee) String() string
func (*PreviousFee) UnmarshalText ¶ added in v0.1095.0
func (i *PreviousFee) UnmarshalText(text []byte) error
type PreviousFeeOptions ¶ added in v0.795.0
type PreviousFeeOptions struct { PreviousFeeFull PreviousFee PreviousFeeHalf PreviousFee PreviousFeeExemption PreviousFee PreviousFeeHardship PreviousFee }
type RefundSummary ¶
type SettlementSummary ¶
type ThreeDSecure ¶
type ThreeDSecure struct {
Required bool `json:"required"`
}
Click to show internal directories.
Click to hide internal directories.