Documentation
¶
Index ¶
- func WireSupportedCurrencies() []currency.Type
- type WireProcessor
- func (wp *WireProcessor) Authorize(ctx context.Context, req processor.PaymentRequest) (*processor.PaymentResult, error)
- func (wp *WireProcessor) Capture(ctx context.Context, transactionID string, amount currency.Cents) (*processor.PaymentResult, error)
- func (wp *WireProcessor) Charge(ctx context.Context, req processor.PaymentRequest) (*processor.PaymentResult, error)
- func (wp *WireProcessor) Configure(wire integration.WireTransfer)
- func (wp *WireProcessor) GetTransaction(ctx context.Context, txID string) (*processor.Transaction, error)
- func (wp *WireProcessor) IsAvailable(ctx context.Context) bool
- func (wp *WireProcessor) Refund(ctx context.Context, req processor.RefundRequest) (*processor.RefundResult, error)
- func (wp *WireProcessor) Type() processor.ProcessorType
- func (wp *WireProcessor) ValidateWebhook(ctx context.Context, payload []byte, signature string) (*processor.WebhookEvent, error)
- func (wp *WireProcessor) WireInstructions() integration.WireTransfer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WireSupportedCurrencies ¶
WireSupportedCurrencies returns fiat currencies supported by wire transfer
Types ¶
type WireProcessor ¶
type WireProcessor struct {
*processor.BaseProcessor
// contains filtered or unexported fields
}
WireProcessor implements the processor.PaymentProcessor interface for bank wire transfers. Wire payments are manually confirmed when the bank transfer is received.
func NewProcessor ¶
func NewProcessor(wire integration.WireTransfer) *WireProcessor
NewProcessor creates a new wire transfer processor
func (*WireProcessor) Authorize ¶
func (wp *WireProcessor) Authorize(ctx context.Context, req processor.PaymentRequest) (*processor.PaymentResult, error)
Authorize creates a pending wire payment (same as Charge for wire)
func (*WireProcessor) Capture ¶
func (wp *WireProcessor) Capture(ctx context.Context, transactionID string, amount currency.Cents) (*processor.PaymentResult, error)
Capture marks a wire payment as confirmed/credited (called when wire arrives)
func (*WireProcessor) Charge ¶
func (wp *WireProcessor) Charge(ctx context.Context, req processor.PaymentRequest) (*processor.PaymentResult, error)
Charge creates a pending wire payment with instructions in metadata
func (*WireProcessor) Configure ¶
func (wp *WireProcessor) Configure(wire integration.WireTransfer)
Configure sets up the processor with wire transfer details
func (*WireProcessor) GetTransaction ¶
func (wp *WireProcessor) GetTransaction(ctx context.Context, txID string) (*processor.Transaction, error)
GetTransaction returns the pending wire status
func (*WireProcessor) IsAvailable ¶
func (wp *WireProcessor) IsAvailable(ctx context.Context) bool
IsAvailable checks if the processor has wire instructions configured
func (*WireProcessor) Refund ¶
func (wp *WireProcessor) Refund(ctx context.Context, req processor.RefundRequest) (*processor.RefundResult, error)
Refund marks a wire payment as refunded
func (*WireProcessor) Type ¶
func (wp *WireProcessor) Type() processor.ProcessorType
Type returns the processor type
func (*WireProcessor) ValidateWebhook ¶
func (wp *WireProcessor) ValidateWebhook(ctx context.Context, payload []byte, signature string) (*processor.WebhookEvent, error)
ValidateWebhook returns error (no webhooks for wire transfers)
func (*WireProcessor) WireInstructions ¶
func (wp *WireProcessor) WireInstructions() integration.WireTransfer
WireInstructions returns the configured wire transfer details