provider

package
v0.0.0-...-92726a5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGetProviderFactory

func NewGetProviderFactory() service.GetProviderService

func NewPaypalProvider

func NewPaypalProvider(stripProvider PaypalProvider) service.OrderProviderService

func NewStripeProvider

func NewStripeProvider(stripProvider StripeProvider) service.OrderProviderService

Types

type PaypalProvider

type PaypalProvider interface {
	CreateOrder(ctx context.Context, intent string, purchaseUnits []paypal.PurchaseUnitRequest, payer *paypal.CreateOrderPayer, appContext *paypal.ApplicationContext) (*paypal.Order, error)
	CaptureOrder(ctx context.Context, orderID string, captureOrderRequest paypal.CaptureOrderRequest) (*paypal.CaptureOrderResponse, error)
	RefundCapture(ctx context.Context, captureID string, refundCaptureRequest paypal.RefundCaptureRequest) (*paypal.RefundResponse, error)
}

type StripeProvider

type StripeProvider interface {
	NewPaymentIntent(params *stripe.PaymentIntentParams) (*stripe.PaymentIntent, error)
	Capture(id string, params *stripe.PaymentIntentCaptureParams) (*stripe.PaymentIntent, error)
	NewRefund(params *stripe.RefundParams) (*stripe.Refund, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL