Versions in this module Expand all Collapse all v1 v1.1.4 Dec 16, 2018 Changes in this version + const APIBaseLive + const APIBaseSandBox + const AddrOverrideFromCall + const AddrOverrideFromFile + const AllowedPaymentImmediatePay + const AllowedPaymentInstantFundingSource + const AllowedPaymentUnrestricted + const LandingPageTypeBilling + const LandingPageTypeLogin + const NoShippingBuyerAccount + const NoShippingDisplay + const NoShippingHide + const RequestNewTokenBeforeExpiresIn + type Address struct + City string + CountryCode string + Line1 string + Line2 string + Phone string + PostalCode string + State string + type AgreementDetails struct + CyclesCompleted int + CyclesRemaining int + FailedPaymentCount int + FinalPaymentDate time.Time + LastPaymentAmount AmountPayout + LastPaymentDate time.Time + NextBillingDate time.Time + OutstandingBalance AmountPayout + type Amount struct + Currency string + Details Details + Total string + type AmountPayout struct + Currency string + Value string + type ApplicationContext struct + BrandName string + LandingPage string + Locale string + ShippingPreference string + UserAction string + type Authorization struct + Amount *Amount + ClearingTime string + CreateTime *time.Time + ID string + Links []Link + ParentPayment string + ProtectionEligibility string + ProtectionEligibilityType string + State string + UpdateTime *time.Time + ValidUntil *time.Time + type BatchHeader struct + Amount *AmountPayout + BatchStatus string + Fees *AmountPayout + PayoutBatchID string + SenderBatchHeader *SenderBatchHeader + TimeCompleted *time.Time + TimeCreated *time.Time + type BillingAgreement struct + Description string + Name string + Payer Payer + Plan BillingPlan + ShippingAddress *ShippingAddress + StartDate JSONTime + type BillingPlan struct + Description string + ID string + MerchantPreferences *MerchantPreferences + Name string + PaymentDefinitions []PaymentDefinition + Type string + type Capture struct + Amount *Amount + CreateTime *time.Time + ID string + IsFinalCapture bool + Links []Link + ParentPayment string + State string + UpdateTime *time.Time + type ChargeModel struct + Amount AmountPayout + Type string + type Client struct + APIBase string + Client *http.Client + ClientID string + Log io.Writer + Secret string + Token *TokenResponse + func NewClient(clientID string, secret string, APIBase string) (*Client, error) + func (c *Client) ActivatePlan(planID string) error + func (c *Client) AuthorizeOrder(orderID string, amount *Amount) (*Authorization, error) + func (c *Client) CancelPayoutItem(payoutItemID string) (*PayoutItemResponse, error) + func (c *Client) CaptureAuthorization(authID string, a *Amount, isFinalCapture bool) (*Capture, error) + func (c *Client) CaptureOrder(orderID string, amount *Amount, isFinalCapture bool, currency *Currency) (*Capture, error) + func (c *Client) CreateBillingAgreement(a BillingAgreement) (*CreateAgreementResp, error) + func (c *Client) CreateBillingPlan(plan BillingPlan) (*CreateBillingResp, error) + func (c *Client) CreateDirectPaypalPayment(amount Amount, redirectURI string, cancelURI string, description string) (*PaymentResponse, error) + func (c *Client) CreatePayment(p Payment) (*CreatePaymentResp, error) + func (c *Client) CreateSinglePayout(p Payout) (*PayoutResponse, error) + func (c *Client) CreateWebProfile(wp WebProfile) (*WebProfile, error) + func (c *Client) DeleteCreditCard(id string) error + func (c *Client) DeleteWebProfile(profileID string) error + func (c *Client) ExecuteApprovedAgreement(token string) (*ExecuteAgreementResponse, error) + func (c *Client) ExecuteApprovedPayment(paymentID string, payerID string) (*ExecuteResponse, error) + func (c *Client) GetAccessToken() (*TokenResponse, error) + func (c *Client) GetAuthorization(authID string) (*Authorization, error) + func (c *Client) GetCreditCard(id string) (*CreditCard, error) + func (c *Client) GetCreditCards(ccf *CreditCardsFilter) (*CreditCards, error) + func (c *Client) GetOrder(orderID string) (*Order, error) + func (c *Client) GetPayment(paymentID string) (*Payment, error) + func (c *Client) GetPayments() ([]Payment, error) + func (c *Client) GetPayout(payoutBatchID string) (*PayoutResponse, error) + func (c *Client) GetPayoutItem(payoutItemID string) (*PayoutItemResponse, error) + func (c *Client) GetRefund(refundID string) (*Refund, error) + func (c *Client) GetSale(saleID string) (*Sale, error) + func (c *Client) GetUserInfo(schema string) (*UserInfo, error) + func (c *Client) GetWebProfile(profileID string) (*WebProfile, error) + func (c *Client) GetWebProfiles() ([]WebProfile, error) + func (c *Client) GrantNewAccessTokenFromAuthCode(code string, redirectURI string) (*TokenResponse, error) + func (c *Client) GrantNewAccessTokenFromRefreshToken(refreshToken string) (*TokenResponse, error) + func (c *Client) NewRequest(method, url string, payload interface{}) (*http.Request, error) + func (c *Client) PatchCreditCard(id string, ccf []CreditCardField) (*CreditCard, error) + func (c *Client) PatchPayment(paymentID string, p []PaymentPatch) (*Payment, error) + func (c *Client) ReauthorizeAuthorization(authID string, a *Amount) (*Authorization, error) + func (c *Client) RefundSale(saleID string, a *Amount) (*Refund, error) + func (c *Client) Send(req *http.Request, v interface{}) error + func (c *Client) SendWithAuth(req *http.Request, v interface{}) error + func (c *Client) SendWithBasicAuth(req *http.Request, v interface{}) error + func (c *Client) SetAccessToken(token string) + func (c *Client) SetHTTPClient(client *http.Client) + func (c *Client) SetLog(log io.Writer) + func (c *Client) SetWebProfile(wp WebProfile) error + func (c *Client) StoreCreditCard(cc CreditCard) (*CreditCard, error) + func (c *Client) VoidAuthorization(authID string) (*Authorization, error) + func (c *Client) VoidOrder(orderID string) (*Order, error) + type CreateAgreementResp struct + Description string + Links []Link + Name string + Plan BillingPlan + StartTime time.Time + type CreateBillingResp struct + CreateTime time.Time + ID string + Links []Link + MerchantPreferences MerchantPreferences + PaymentDefinitions []PaymentDefinition + State string + UpdateTime time.Time + type CreatePaymentResp struct + Links []Link + type CreditCard struct + BillingAddress *Address + CVV2 string + ExpireMonth string + ExpireYear string + ExternalCustomerID string + FirstName string + ID string + LastName string + Number string + PayerID string + State string + Type string + ValidUntil string + type CreditCardField struct + Operation string + Path string + Value string + type CreditCardToken struct + CreditCardID string + ExpireMonth string + ExpireYear string + Last4 string + PayerID string + type CreditCards struct + Items []CreditCard + Links []Link + TotalItems int + TotalPages int + type CreditCardsFilter struct + Page int + PageSize int + type Currency struct + Currency string + Value string + type Details struct + GiftWrap string + HandlingFee string + Insurance string + Shipping string + ShippingDiscount string + Subtotal string + Tax string + type ErrorResponse struct + DebugID string + Details []ErrorResponseDetail + InformationLink string + Message string + Name string + Response *http.Response + func (r *ErrorResponse) Error() string + type ErrorResponseDetail struct + Field string + Issue string + Links []Link + type ExecuteAgreementResponse struct + AgreementDetails AgreementDetails + Description string + ID string + Links []Link + Payer Payer + Plan BillingPlan + ShippingAddress ShippingAddress + StartDate time.Time + State string + type ExecuteResponse struct + ID string + Links []Link + Payer PaymentPayer + State string + Transactions []Transaction + type FlowConfig struct + BankTXNPendingURL string + LandingPageType string + UserAction string + type FundingInstrument struct + CreditCard *CreditCard + CreditCardToken *CreditCardToken + type InputFields struct + AddressOverride uint + AllowNote bool + NoShipping uint + type Item struct + Currency string + Description string + Name string + Price string + Quantity uint32 + SKU string + Tax string + type ItemList struct + Items []Item + ShippingAddress *ShippingAddress + type JSONTime time.Time + func (t JSONTime) MarshalJSON() ([]byte, error) + type Link struct + Enctype string + Href string + Method string + Rel string + type ListPaymentsResp struct + Payments []Payment + type MerchantPreferences struct + AutoBillAmount string + CancelURL string + InitialFailAmountAction string + MaxFailAttempts string + ReturnURL string + SetupFee *AmountPayout + type Order struct + Amount *Amount + CreateTime *time.Time + ID string + Links []Link + ParentPayment string + PendingReason string + State string + UpdateTime *time.Time + type Payee struct + Email string + type Payer struct + FundingInstruments []FundingInstrument + PayerInfo *PayerInfo + PaymentMethod string + Status string + type PayerInfo struct + CountryCode string + Email string + FirstName string + LastName string + PayerID string + Phone string + ShippingAddress *ShippingAddress + TaxID string + TaxIDType string + type Payment struct + ApplicationContext *ApplicationContext + CreateTime *time.Time + ExperienceProfileID string + ID string + Intent string + Payer *Payer + RedirectURLs *RedirectURLs + State string + Transactions []Transaction + UpdateTime *time.Time + type PaymentDefinition struct + Amount AmountPayout + ChargeModels []ChargeModel + Cycles string + Frequency string + FrequencyInterval string + ID string + Name string + Type string + type PaymentOptions struct + AllowedPaymentMethod string + type PaymentPatch struct + Operation string + Path string + Value interface{} + type PaymentPayer struct + PayerInfo *PayerInfo + PaymentMethod string + Status string + type PaymentResponse struct + ID string + Intent string + Links []Link + Payer Payer + State string + Transactions []Transaction + type Payout struct + Items []PayoutItem + SenderBatchHeader *SenderBatchHeader + type PayoutItem struct + Amount *AmountPayout + Note string + Receiver string + RecipientType string + SenderItemID string + type PayoutItemResponse struct + Error ErrorResponse + Links []Link + PayoutBatchID string + PayoutItem *PayoutItem + PayoutItemFee *AmountPayout + PayoutItemID string + TimeProcessed *time.Time + TransactionID string + TransactionStatus string + type PayoutResponse struct + BatchHeader *BatchHeader + Items []PayoutItemResponse + Links []Link + type Presentation struct + BrandName string + LocaleCode string + LogoImage string + type RedirectURLs struct + CancelURL string + ReturnURL string + type Refund struct + Amount *Amount + CaptureID string + CreateTime *time.Time + ID string + ParentPayment string + State string + UpdateTime *time.Time + type Related struct + Authorization *Authorization + Capture *Capture + Order *Order + Refund *Refund + Sale *Sale + type Sale struct + Amount *Amount + ClearingTime string + CreateTime *time.Time + Description string + ID string + Links []Link + ParentPayment string + PaymentMode string + PendingReason string + ProtectionEligibility string + ProtectionEligibilityType string + ReasonCode string + State string + TransactionFee *Currency + UpdateTime *time.Time + type SenderBatchHeader struct + EmailSubject string + SenderBatchID string + type ShippingAddress struct + City string + CountryCode string + Line1 string + Line2 string + Phone string + PostalCode string + RecipientName string + State string + Type string + type TokenResponse struct + ExpiresIn expirationTime + RefreshToken string + Token string + Type string + type Transaction struct + Amount *Amount + Custom string + Description string + InvoiceNumber string + ItemList *ItemList + NotifyURL string + OrderURL string + Payee *Payee + PaymentOptions *PaymentOptions + RelatedResources []Related + SoftDescriptor string + type UserInfo struct + AccountType string + Address *Address + AgeRange string + BirthDate string + Email string + FamilyName string + Gender string + GivenName string + ID string + Locale string + Name string + PayerID string + Phone string + Verified bool + VerifiedAccount bool + ZoneInfo string + type WebProfile struct + FlowConfig FlowConfig + ID string + InputFields InputFields + Name string + Presentation Presentation Incompatible versions in this module v2.0.5+incompatible Aug 21, 2019