Documentation
¶
Index ¶
- Constants
- func SumPayPalDigitalGoodAmounts(goods *[]PayPalDigitalGood) (sum float64)
- type Action
- type ExpressCheckoutSingleArgs
- type PayPalClient
- func NewClient(username, password, signature string, usesSandbox bool, client *http.Client) *PayPalClient
- func NewDefaultClient(username, password, signature string, usesSandbox bool) *PayPalClient
- func NewDefaultClientEndpoint(username, password, signature, endpoint string, usesSandbox bool) *PayPalClient
- func (pClient *PayPalClient) BillOutstandingAmount(profileId string) (*PayPalResponse, error)
- func (pClient *PayPalClient) CreateRecurringPaymentsProfile(token string, params map[string]string) (*PayPalResponse, error)
- func (pClient *PayPalClient) DoExpressCheckoutPayment(token, payerId, paymentType, currencyCode string, finalPaymentAmount float64) (*PayPalResponse, error)
- func (pClient *PayPalClient) DoExpressCheckoutSale(token, payerId, currencyCode string, finalPaymentAmount float64) (*PayPalResponse, error)
- func (pClient *PayPalClient) GetExpressCheckoutDetails(token string) (*PayPalResponse, error)
- func (pClient *PayPalClient) GetRecurringPaymentsProfileDetails(profileId string) (*PayPalResponse, error)
- func (pClient *PayPalClient) ManageRecurringPaymentsProfileStatus(profileId string, action Action) (*PayPalResponse, error)
- func (pClient *PayPalClient) PerformRequest(values url.Values) (*PayPalResponse, error)
- func (pClient *PayPalClient) ProfileTransactionSearch(profileId string, startDate time.Time) (*PayPalResponse, error)
- func (pClient *PayPalClient) SetExpressCheckoutDigitalGoods(paymentAmount float64, currencyCode string, returnURL, cancelURL string, ...) (*PayPalResponse, error)
- func (pClient *PayPalClient) SetExpressCheckoutSingle(args *ExpressCheckoutSingleArgs) (*PayPalResponse, error)
- func (pClient *PayPalClient) UpdateRecurringPaymentsProfile(profileId string, params map[string]string) (*PayPalResponse, error)
- type PayPalDigitalGood
- type PayPalError
- type PayPalResponse
Constants ¶
View Source
const ( NVP_SANDBOX_URL = "https://api-3t.sandbox.paypal.com/nvp" NVP_PRODUCTION_URL = "https://api-3t.paypal.com/nvp" CHECKOUT_SANDBOX_URL = "https://www.sandbox.paypal.com/cgi-bin/webscr" CHECKOUT_PRODUCTION_URL = "https://www.paypal.com/cgi-bin/webscr" NVP_VERSION = "84" )
Variables ¶
This section is empty.
Functions ¶
func SumPayPalDigitalGoodAmounts ¶
func SumPayPalDigitalGoodAmounts(goods *[]PayPalDigitalGood) (sum float64)
Types ¶
type ExpressCheckoutSingleArgs ¶
type ExpressCheckoutSingleArgs struct {
Amount float64
CurrencyCode, ReturnURL, CancelURL string
Recurring bool
Item *PayPalDigitalGood
}
func NewExpressCheckoutSingleArgs ¶
func NewExpressCheckoutSingleArgs() *ExpressCheckoutSingleArgs
type PayPalClient ¶
type PayPalClient struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(username, password, signature string, usesSandbox bool, client *http.Client) *PayPalClient
func NewDefaultClient ¶
func NewDefaultClient(username, password, signature string, usesSandbox bool) *PayPalClient
func NewDefaultClientEndpoint ¶
func NewDefaultClientEndpoint(username, password, signature, endpoint string, usesSandbox bool) *PayPalClient
func (*PayPalClient) BillOutstandingAmount ¶
func (pClient *PayPalClient) BillOutstandingAmount(profileId string) (*PayPalResponse, error)
func (*PayPalClient) CreateRecurringPaymentsProfile ¶
func (pClient *PayPalClient) CreateRecurringPaymentsProfile(token string, params map[string]string) (*PayPalResponse, error)
func (*PayPalClient) DoExpressCheckoutPayment ¶
func (pClient *PayPalClient) DoExpressCheckoutPayment(token, payerId, paymentType, currencyCode string, finalPaymentAmount float64) (*PayPalResponse, error)
paymentType can be "Sale" or "Authorization" or "Order" (ship later)
func (*PayPalClient) DoExpressCheckoutSale ¶
func (pClient *PayPalClient) DoExpressCheckoutSale(token, payerId, currencyCode string, finalPaymentAmount float64) (*PayPalResponse, error)
Convenience function for Sale (Charge)
func (*PayPalClient) GetExpressCheckoutDetails ¶
func (pClient *PayPalClient) GetExpressCheckoutDetails(token string) (*PayPalResponse, error)
func (*PayPalClient) GetRecurringPaymentsProfileDetails ¶
func (pClient *PayPalClient) GetRecurringPaymentsProfileDetails(profileId string) (*PayPalResponse, error)
func (*PayPalClient) ManageRecurringPaymentsProfileStatus ¶
func (pClient *PayPalClient) ManageRecurringPaymentsProfileStatus(profileId string, action Action) (*PayPalResponse, error)
func (*PayPalClient) PerformRequest ¶
func (pClient *PayPalClient) PerformRequest(values url.Values) (*PayPalResponse, error)
func (*PayPalClient) ProfileTransactionSearch ¶
func (pClient *PayPalClient) ProfileTransactionSearch(profileId string, startDate time.Time) (*PayPalResponse, error)
func (*PayPalClient) SetExpressCheckoutDigitalGoods ¶
func (pClient *PayPalClient) SetExpressCheckoutDigitalGoods(paymentAmount float64, currencyCode string, returnURL, cancelURL string, goods []PayPalDigitalGood) (*PayPalResponse, error)
func (*PayPalClient) SetExpressCheckoutSingle ¶
func (pClient *PayPalClient) SetExpressCheckoutSingle(args *ExpressCheckoutSingleArgs) (*PayPalResponse, error)
func (*PayPalClient) UpdateRecurringPaymentsProfile ¶
func (pClient *PayPalClient) UpdateRecurringPaymentsProfile(profileId string, params map[string]string) (*PayPalResponse, error)
type PayPalDigitalGood ¶
func NewDigitalGood ¶
func NewDigitalGood(name string, amount float64) *PayPalDigitalGood
type PayPalError ¶
type PayPalError struct {
Ack string
ErrorCode string
ShortMessage string
LongMessage string
SeverityCode string
}
func (*PayPalError) Error ¶
func (e *PayPalError) Error() string
type PayPalResponse ¶
type PayPalResponse struct {
Ack string
CorrelationId string
Timestamp string
Version string
Build string
Values url.Values
// contains filtered or unexported fields
}
func (*PayPalResponse) CheckoutUrl ¶
func (r *PayPalResponse) CheckoutUrl() string
Click to show internal directories.
Click to hide internal directories.
