Documentation ¶
Index ¶
- type BillingAmount
- type BillingInformation
- type CardInformation
- type ClientReferenceInformation
- type CybersourceClient
- func (client *CybersourceClient) Authorize(request *sleet.AuthorizationRequest) (*sleet.AuthorizationResponse, error)
- func (client *CybersourceClient) Capture(request *sleet.CaptureRequest) (*sleet.CaptureResponse, error)
- func (client *CybersourceClient) Refund(request *sleet.RefundRequest) (*sleet.RefundResponse, error)
- func (client *CybersourceClient) Void(request *sleet.VoidRequest) (*sleet.VoidResponse, error)
- type Link
- type Links
- type OrderInformation
- type PaymentInformation
- type ProcessingInformation
- type ProcessorInformation
- type Request
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BillingAmount ¶
type BillingInformation ¶
type BillingInformation struct { FirstName string `json:"firstName"` LastName string `json:"lastName"` Address1 string `json:"address1"` PostalCode string `json:"postalCode"` Locality string `json:"locality"` AdminArea string `json:"administrativeArea"` Country string `json:"country"` Phone string `json:"phoneNumber"` Company string `json:"company"` Email string `json:"email"` }
type CardInformation ¶
type CybersourceClient ¶
type CybersourceClient struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(merchantID string, apiKey string, sharedSecretKey string) *CybersourceClient
func NewWithHttpClient ¶
func (*CybersourceClient) Authorize ¶
func (client *CybersourceClient) Authorize(request *sleet.AuthorizationRequest) (*sleet.AuthorizationResponse, error)
func (*CybersourceClient) Capture ¶
func (client *CybersourceClient) Capture(request *sleet.CaptureRequest) (*sleet.CaptureResponse, error)
func (*CybersourceClient) Refund ¶
func (client *CybersourceClient) Refund(request *sleet.RefundRequest) (*sleet.RefundResponse, error)
func (*CybersourceClient) Void ¶
func (client *CybersourceClient) Void(request *sleet.VoidRequest) (*sleet.VoidResponse, error)
type OrderInformation ¶
type OrderInformation struct { BillTo BillingInformation `json:"billTo"` BillingAmount BillingAmount `json:"amountDetails"` }
type PaymentInformation ¶
type PaymentInformation struct {
Card CardInformation `json:"card"`
}
type ProcessingInformation ¶
type ProcessorInformation ¶
type Request ¶
type Request struct { ClientReferenceInformation *ClientReferenceInformation `json:"clientReferenceInformation,omitempty"` ProcessingInformation *ProcessingInformation `json:"processingInformation,omitempty"` OrderInformation *OrderInformation `json:"orderInformation,omitempty"` PaymentInformation *PaymentInformation `json:"paymentInformation,omitempty"` }
Should we just combine these to one Request and have pointers?
type Response ¶
type Response struct { SubmitTimeUTC string `json:"submitTimeUtc"` Status string `json:"status"` // TODO: Make into enum ClientReferenceInformation *ClientReferenceInformation `json:"clientReferenceInformation,omitempty"` ID *string `json:"id,omitempty"` OrderInformation *OrderInformation `json:"orderInformation,omitempty"` ReconciliationID *string `json:"reconciliationId,omitempty"` Links *Links `json:"_links,omitempty"` ErrorReason *string `json:"reason,omitempty"` ErrorMessage *string `json:"message,omitempty"` ProcessorInformation *ProcessorInformation `json:"processorInformation,omitempty"` }
Click to show internal directories.
Click to hide internal directories.