Documentation ¶
Index ¶
- Constants
- type BadResponse
- type Client
- func (c *Client) CancelOrder(ctx context.Context, orderID string) error
- func (c *Client) CreateOrder(ctx context.Context, params *orders.CreateOrderParams) (*orders.CreateOrderResponse, error)
- func (c *Client) CreatePartnerReferral(ctx context.Context, params *merchant.CreatePartnerReferralParams) (*merchant.CreatePartnerReferralResponse, error)
- func (c *Client) FinalizeDisbursement(ctx context.Context, responsePreference orders.ResponsePreferenceData, ...) (*orders.FinalizeDisbursementResponse, error)
- func (c *Client) GetOrderDetails(ctx context.Context, orderID string) (*orders.CreateOrderResponse, error)
- func (c *Client) GetPartnerReferral(ctx context.Context, partnerReferralID string) (*merchant.GetPartnerReferralResponse, error)
- func (c *Client) PayOrder(ctx context.Context, orderID string, ...) (*orders.PayOrderResponse, error)
- func (c *Client) RequestRefund(ctx context.Context, captureID, clientID, payerID string, ...) (*orders.RequestRefundResponse, error)
- func (c *Client) SaveTransactionContext(ctx context.Context, merchantID, trackingID string, ...) error
- func (c *Client) ShowAccountTracking(ctx context.Context, partnerID, trackingID string) (*merchant.MerchantDetailsData, error)
- func (c *Client) ShowMerchantStatus(ctx context.Context, partnerID, merchantID string, fields []string) (*merchant.MerchantDetailsData, error)
Constants ¶
View Source
const ( Sandbox = "https://api.sandbox.paypal.com" Live = "https://api.paypal.com" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BadResponse ¶
func (*BadResponse) Error ¶
func (b *BadResponse) Error() string
type Client ¶
type Client struct { BNCode string // contains filtered or unexported fields }
func NewClient ¶
NewClient creates a new Paypal marketplace client. clientID and clientSecret are provided by Paypal. apiBase should be either market.Sandbox or market.Live
func (*Client) CancelOrder ¶
func (*Client) CreateOrder ¶
func (c *Client) CreateOrder(ctx context.Context, params *orders.CreateOrderParams) (*orders.CreateOrderResponse, error)
func (*Client) CreatePartnerReferral ¶
func (c *Client) CreatePartnerReferral(ctx context.Context, params *merchant.CreatePartnerReferralParams) (*merchant.CreatePartnerReferralResponse, error)
CreatePartnerReferral is used to connect a user's Paypal account with your platform. It is used in both the connected and the managed paths.
func (*Client) FinalizeDisbursement ¶
func (c *Client) FinalizeDisbursement(ctx context.Context, responsePreference orders.ResponsePreferenceData, transactionID string) (*orders.FinalizeDisbursementResponse, error)
func (*Client) GetOrderDetails ¶
func (*Client) GetPartnerReferral ¶
func (*Client) PayOrder ¶
func (c *Client) PayOrder(ctx context.Context, orderID string, disbursementMode orders.DisbursementModeData) (*orders.PayOrderResponse, error)
func (*Client) RequestRefund ¶
func (c *Client) RequestRefund(ctx context.Context, captureID, clientID, payerID string, params *orders.RequestRefundParams) (*orders.RequestRefundResponse, error)
func (*Client) SaveTransactionContext ¶
func (*Client) ShowAccountTracking ¶
func (*Client) ShowMerchantStatus ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.