mirror of
https://github.com/hanzoai/commerce.git
synced 2026-10-30 15:08:42 +00:00
Multi-tenant commerce and billing: orders, subscriptions, invoices, plans, usage metering and a credit ledger. One Go binary. MIT OR Apache-2.0. Claude-Session: https://claude.ai/code/session_01SAtaDFm8VDiWrhYHNNtxMw
18 lines
476 B
Go
18 lines
476 B
Go
package square
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/hanzoai/commerce/payment/processor"
|
|
)
|
|
|
|
// Refund processes a refund against a settled Square payment. Partial
|
|
// refunds are supported by setting req.Amount < the original; a zero
|
|
// amount refunds the full charge.
|
|
func (p *Provider) Refund(ctx context.Context, req processor.RefundRequest) (*processor.RefundResult, error) {
|
|
if err := p.checkAvailable(); err != nil {
|
|
return nil, err
|
|
}
|
|
return p.inner.Refund(ctx, req)
|
|
}
|