Documentation
¶
Overview ¶
@Author: wzy @Time: 2022/6/7
Index ¶
- Constants
- type AccessToken
- type AddTrackingNumberReq
- type AddTrackingNumberRsp
- type AdditionalRecipient
- type Address
- type AddressDetails
- type Amount
- type Attachment
- type AuthenticationResult
- type Authorization
- type Bancontact
- type BatchHeader
- type BatchPayout
- type BillingCycles
- type BillingDetail
- type BillingInfo
- type Blik
- type CancelUnclaimedPayoutItemRsp
- type Capture
- type Card
- type Client
- func (c *Client) AddTrackingNumber(ctx context.Context, orderId string, bm gopay.BodyMap) (ppRsp *AddTrackingNumberRsp, err error)
- func (c Client) CancelUnclaimedPayoutItem(ctx context.Context, payoutItemId string) (ppRsp *CancelUnclaimedPayoutItemRsp, err error)
- func (c *Client) CreateBatchPayout(ctx context.Context, bm gopay.BodyMap) (ppRsp *CreateBatchPayoutRsp, err error)
- func (c *Client) CreateBillingPlan(ctx context.Context, bm gopay.BodyMap) (ppRsp *CreateBillingRsp, err error)
- func (c *Client) CreateOrder(ctx context.Context, bm gopay.BodyMap) (ppRsp *CreateOrderRsp, err error)
- func (c *Client) DoPayPalPost(ctx context.Context, bm gopay.BodyMap, path string) (res *http.Response, bs []byte, err error)
- func (c *Client) GetAccessToken() (token *AccessToken, err error)
- func (c *Client) InvoiceCancel(ctx context.Context, invoiceId string, body gopay.BodyMap) (ppRsp *EmptyRsp, err error)
- func (c *Client) InvoiceCreate(ctx context.Context, body gopay.BodyMap) (ppRsp *InvoiceCreateRsp, err error)
- func (c *Client) InvoiceDelete(ctx context.Context, invoiceId string) (ppRsp *EmptyRsp, err error)
- func (c *Client) InvoiceDetail(ctx context.Context, invoiceId string) (ppRsp *InvoiceDetailRsp, err error)
- func (c *Client) InvoiceGenerateQRCode(ctx context.Context, invoiceId string, body gopay.BodyMap) (ppRsp *InvoiceGenerateQRCodeRsp, err error)
- func (c *Client) InvoiceList(ctx context.Context, query gopay.BodyMap) (ppRsp *InvoiceListRsp, err error)
- func (c *Client) InvoiceNumberGenerate(ctx context.Context, invoiceNumber string) (ppRsp *InvoiceNumberGenerateRsp, err error)
- func (c *Client) InvoicePaymentDelete(ctx context.Context, invoiceId, transactionId string) (ppRsp *EmptyRsp, err error)
- func (c *Client) InvoicePaymentRecord(ctx context.Context, invoiceId string, body gopay.BodyMap) (ppRsp *InvoicePaymentRsp, err error)
- func (c *Client) InvoiceRefundDelete(ctx context.Context, invoiceId, transactionId string) (ppRsp *EmptyRsp, err error)
- func (c *Client) InvoiceRefundRecord(ctx context.Context, invoiceId string, body gopay.BodyMap) (ppRsp *InvoiceRefundRsp, err error)
- func (c *Client) InvoiceSearch(ctx context.Context, page, pageSize int, totalRequired bool, ...) (ppRsp *InvoiceSearchRsp, err error)
- func (c *Client) InvoiceSend(ctx context.Context, invoiceId string, body gopay.BodyMap) (ppRsp *InvoiceSendRsp, err error)
- func (c *Client) InvoiceSendRemind(ctx context.Context, invoiceId string, body gopay.BodyMap) (ppRsp *EmptyRsp, err error)
- func (c *Client) InvoiceTemplateCreate(ctx context.Context, body gopay.BodyMap) (ppRsp *InvoiceTemplateCreateRsp, err error)
- func (c *Client) InvoiceTemplateDelete(ctx context.Context, templateId string) (ppRsp *EmptyRsp, err error)
- func (c *Client) InvoiceTemplateList(ctx context.Context, query gopay.BodyMap) (ppRsp *InvoiceTemplateListRsp, err error)
- func (c *Client) InvoiceTemplateUpdate(ctx context.Context, templateId string, body gopay.BodyMap) (ppRsp *InvoiceTemplateUpdateRsp, err error)
- func (c *Client) InvoiceUpdate(ctx context.Context, invoiceId string, sendToInvoicer, sendToRecipient bool, ...) (ppRsp *InvoiceUpdateRsp, err error)
- func (c *Client) OrderAuthorize(ctx context.Context, orderId string, bm gopay.BodyMap) (ppRsp *OrderAuthorizeRsp, err error)
- func (c *Client) OrderCapture(ctx context.Context, orderId string, bm gopay.BodyMap) (ppRsp *OrderCaptureRsp, err error)
- func (c *Client) OrderConfirm(ctx context.Context, orderId string, bm gopay.BodyMap) (ppRsp *OrderConfirmRsp, err error)
- func (c *Client) OrderDetail(ctx context.Context, orderId string, bm gopay.BodyMap) (ppRsp *OrderDetailRsp, err error)
- func (c *Client) PaymentAuthorizeCapture(ctx context.Context, authorizationId string, bm gopay.BodyMap) (ppRsp *PaymentAuthorizeCaptureRsp, err error)
- func (c *Client) PaymentAuthorizeDetail(ctx context.Context, authorizationId string) (ppRsp *PaymentAuthorizeDetailRsp, err error)
- func (c *Client) PaymentAuthorizeVoid(ctx context.Context, authorizationId string) (ppRsp *EmptyRsp, err error)
- func (c *Client) PaymentCaptureDetail(ctx context.Context, captureId string) (ppRsp *PaymentCaptureDetailRsp, err error)
- func (c *Client) PaymentCaptureRefund(ctx context.Context, captureId string, bm gopay.BodyMap) (ppRsp *PaymentCaptureRefundRsp, err error)
- func (c *Client) PaymentReauthorize(ctx context.Context, authorizationId string, bm gopay.BodyMap) (ppRsp *PaymentReauthorizeRsp, err error)
- func (c *Client) PaymentRefundDetail(ctx context.Context, refundId string) (ppRsp *PaymentRefundDetailRsp, err error)
- func (c *Client) SetBodySize(sizeMB int)
- func (c *Client) SetHttpClient(client *xhttp.Client)
- func (c *Client) SetLogger(logger xlog.XLogger)
- func (c *Client) SetProxyUrl(proxyUrlProd, proxyUrlSandbox string)
- func (c *Client) ShowPayoutBatchDetails(ctx context.Context, payoutBatchId string, bm gopay.BodyMap) (ppRsp *PayoutBatchDetailRsp, err error)
- func (c Client) ShowPayoutItemDetails(ctx context.Context, payoutItemId string) (ppRsp *PayoutItemDetailRsp, err error)
- func (c *Client) UpdateOrder(ctx context.Context, orderId string, patchs []*Patch) (ppRsp *EmptyRsp, err error)
- type Configuration
- type ContactInformation
- type CreateBatchPayoutRsp
- type CreateBillingRsp
- type CreateOrderRsp
- type Discount
- type DisplayPreference
- type EmptyRsp
- type Eps
- type ErrorDetail
- type ErrorResponse
- type Errors
- type ExchangeRate
- type FixedPrice
- type Frequency
- type Giropay
- type Ideal
- type Invoice
- type InvoiceCreateRsp
- type InvoiceDetail
- type InvoiceDetailRsp
- type InvoiceGenerateQRCodeRsp
- type InvoiceList
- type InvoiceListRsp
- type InvoiceNumber
- type InvoiceNumberGenerateRsp
- type InvoicePayment
- type InvoicePaymentRsp
- type InvoicePayments
- type InvoiceRefund
- type InvoiceRefundRsp
- type InvoiceRefunds
- type InvoiceSearch
- type InvoiceSearchRsp
- type InvoiceSend
- type InvoiceSendRsp
- type InvoiceTemplate
- type InvoiceTemplateCreateRsp
- type InvoiceTemplateListRsp
- type InvoiceTemplateUpdateRsp
- type InvoiceUpdateRsp
- type Invoicer
- type Item
- type Link
- type Metadata
- type Mybank
- type Name
- type NetAmountBreakdown
- type NetworkTransactionReference
- type Option
- type OrderAuthorizeRsp
- type OrderCaptureRsp
- type OrderConfirmRsp
- type OrderDetail
- type OrderDetailRsp
- type P24
- type PartialPayment
- type Patch
- type Payee
- type Payer
- type PaymentAuthorizeCapture
- type PaymentAuthorizeCaptureRsp
- type PaymentAuthorizeDetail
- type PaymentAuthorizeDetailRsp
- type PaymentCaptureDetailRsp
- type PaymentCaptureRefund
- type PaymentCaptureRefundRsp
- type PaymentDetail
- type PaymentInstruction
- type PaymentItem
- type PaymentPreferences
- type PaymentReauthorizeRsp
- type PaymentRefundDetailRsp
- type PaymentSource
- type Payments
- type PayoutBatchDetail
- type PayoutBatchDetailRsp
- type PayoutCurrencyConversion
- type PayoutItem
- type PayoutItemDetail
- type PayoutItemDetailRsp
- type Phone
- type PhoneDetail
- type PhoneNumber
- type Plans
- type PlatformFee
- type PricingScheme
- type Processor
- type PurchaseUnit
- type PurchaseUnitAddress
- type PurchaseUnitBreakdown
- type QRCodeBase64
- type RecipientInfo
- type Refund
- type RefundDetail
- type SellerPayableBreakdown
- type SellerProtection
- type SellerReceivableBreakdown
- type SenderBatchHeader
- type ShipItem
- type Shipping
- type Sofort
- type StatusDetails
- type TaxInfo
- type Template
- type TemplateInfo
- type TemplateItemSetting
- type TemplateSetting
- type TemplateSubtotalSetting
- type ThreeDSecure
- type Trustly
- type V1Amount
Constants ¶
const ( Success = 0 HeaderAuthorization = "Authorization" // 请求头Auth AuthorizationPrefixBasic = "Basic " AuthorizationPrefixBearer = "Bearer " )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessToken ¶
type AddTrackingNumberReq ¶
type AddTrackingNumberRsp ¶
type AddTrackingNumberRsp struct {
Code int `json:"-"`
Error string `json:"-"`
ErrorResponse *ErrorResponse `json:"-"`
Response *OrderDetail `json:"response,omitempty"`
}
type AdditionalRecipient ¶
type AdditionalRecipient struct {
EmailAddress string `json:"email_address"`
}
type Address ¶
type Address struct {
AddressLine1 string `json:"address_line_1"`
AddressLine2 string `json:"address_line_2"`
AddressLine3 string `json:"address_line_3"`
AddressDetails *AddressDetails `json:"address_details,omitempty"`
AdminArea1 string `json:"admin_area_1"`
AdminArea2 string `json:"admin_area_2"`
AdminArea3 string `json:"admin_area_3"`
AdminArea4 string `json:"admin_area_4"`
PostalCode string `json:"postal_code"`
CountryCode string `json:"country_code"`
}
type AddressDetails ¶
type Amount ¶
type Amount struct {
CurrencyCode string `json:"currency_code"`
Value string `json:"value"`
PurchaseUnitBreakdown PurchaseUnitBreakdown `json:"breakdown"`
}
type Attachment ¶
type AuthenticationResult ¶
type AuthenticationResult struct {
LiabilityShift string `json:"liability_shift"`
ThreeDSecure *ThreeDSecure `json:"three_d_secure,omitempty"`
}
type Authorization ¶
type Authorization struct {
Id string `json:"id,omitempty"`
Status string `json:"status,omitempty"` // CREATED、CAPTURED、DENIED、PARTIALLY_CAPTURED、VOIDED、PENDING
StatusDetails *StatusDetails `json:"status_details,omitempty"`
InvoiceId string `json:"invoice_id,omitempty"`
CustomId string `json:"custom_id,omitempty"`
Links []*Link `json:"links,omitempty"`
Amount *Amount `json:"amount"`
NetworkTransactionReference *NetworkTransactionReference `json:"network_transaction_reference"`
SellerProtection *SellerProtection `json:"seller_protection,omitempty"`
ExpirationTime string `json:"expiration_time,omitempty"`
CreateTime string `json:"create_time,omitempty"`
UpdateTime string `json:"update_time,omitempty"`
ProcessorResponse *Processor `json:"processor_response,omitempty"`
}
type Bancontact ¶
type BatchHeader ¶
type BatchHeader struct {
PayoutBatchId string `json:"payout_batch_id"`
BatchStatus string `json:"batch_status"` // DENIED、PENDING、PROCESSING、SUCCESS、CANCELED
TimeCreated string `json:"time_created,omitempty"`
TimeCompleted string `json:"time_completed,omitempty"`
SenderBatchHeader *SenderBatchHeader `json:"sender_batch_header"`
Amount *V1Amount `json:"amount,omitempty"`
Fees *V1Amount `json:"fees,omitempty"`
}
type BatchPayout ¶
type BatchPayout struct {
BatchHeader *BatchHeader `json:"batch_header"`
Links []*Link `json:"links,omitempty"`
}
type BillingCycles ¶
type BillingCycles struct {
Frequency *Frequency `json:"frequency"`
TenureType string `json:"tenure_type"`
Sequence int `json:"sequence"`
TotalCycles int `json:"total_cycles"`
PricingScheme *PricingScheme `json:"pricing_scheme"`
}
type BillingDetail ¶
type BillingInfo ¶
type BillingInfo struct {
AdditionalInfo string `json:"additional_info"`
EmailAddress string `json:"email_address"`
Language string `json:"language"`
Phones []*PhoneDetail `json:"phones"`
}
type CancelUnclaimedPayoutItemRsp ¶
type CancelUnclaimedPayoutItemRsp struct {
Code int `json:"-"`
Error string `json:"-"`
ErrorResponse *ErrorResponse `json:"-"`
Response *PayoutItemDetail `json:"response,omitempty"`
}
type Capture ¶
type Capture struct {
Id string `json:"id,omitempty"`
Status string `json:"status,omitempty"`
StatusDetails *StatusDetails `json:"status_details,omitempty"`
Amount *Amount `json:"amount,omitempty"`
FinalCapture bool `json:"final_capture,omitempty"`
DisbursementMode string `json:"disbursement_mode,omitempty"`
SellerProtection *SellerProtection `json:"seller_protection,omitempty"`
SellerReceivableBreakdown *SellerReceivableBreakdown `json:"seller_receivable_breakdown,omitempty"`
Links []*Link `json:"links,omitempty"`
CreateTime string `json:"create_time,omitempty"`
UpdateTime string `json:"update_time,omitempty"`
InvoiceId string `json:"invoice_id,omitempty"`
CustomId string `json:"custom_id,omitempty"`
}
type Card ¶
type Card struct {
Name string `json:"name"`
BillingAddress *Address `json:"billing_address,omitempty"`
LastDigits string `json:"last_digits"`
Brand string `json:"brand"`
Type string `json:"type"` // The payment card type:CREDIT、DEBIT、PREPAID、UNKNOWN
AuthenticationResult *AuthenticationResult `json:"authentication_result,omitempty"`
}
type Client ¶
type Client struct {
Clientid string
Secret string
Appid string
AccessToken string
ExpiresIn int
IsProd bool
DebugSwitch gopay.DebugSwitch
// contains filtered or unexported fields
}
Client PayPal支付客户端
func (*Client) AddTrackingNumber ¶
func (c *Client) AddTrackingNumber(ctx context.Context, orderId string, bm gopay.BodyMap) (ppRsp *AddTrackingNumberRsp, err error)
AddTrackingNumber 添加物流单号 Code = 0 is success 文档:https://developer.paypal.com/docs/api/orders/v2/#orders_track_create
func (Client) CancelUnclaimedPayoutItem ¶
func (c Client) CancelUnclaimedPayoutItem(ctx context.Context, payoutItemId string) (ppRsp *CancelUnclaimedPayoutItemRsp, err error)
取消批量支付中收款人无PayPal账号的项目(Cancel Unclaimed Payout Item) Code = 0 is success 文档:https://developer.paypal.com/docs/api/payments.payouts-batch/v1/#payouts-item_cancel
func (*Client) CreateBatchPayout ¶
func (c *Client) CreateBatchPayout(ctx context.Context, bm gopay.BodyMap) (ppRsp *CreateBatchPayoutRsp, err error)
创建批量支出(Create batch payout) Code = 0 is success 文档:https://developer.paypal.com/docs/api/payments.payouts-batch/v1/#payouts_post
func (*Client) CreateBillingPlan ¶
func (c *Client) CreateBillingPlan(ctx context.Context, bm gopay.BodyMap) (ppRsp *CreateBillingRsp, err error)
创建订阅计划(CreateBillingPlan) Code = 0 is success 文档:https://developer.paypal.com/docs/api/subscriptions/v1/#plans_create
func (*Client) CreateOrder ¶
func (c *Client) CreateOrder(ctx context.Context, bm gopay.BodyMap) (ppRsp *CreateOrderRsp, err error)
创建订单(Create order) Code = 0 is success 文档:https://developer.paypal.com/docs/api/orders/v2/#orders_create
func (*Client) DoPayPalPost ¶
func (*Client) GetAccessToken ¶
func (c *Client) GetAccessToken() (token *AccessToken, err error)
获取AccessToken(Get an access token) 文档:https://developer.paypal.com/docs/api/reference/get-an-access-token
func (*Client) InvoiceCancel ¶
func (c *Client) InvoiceCancel(ctx context.Context, invoiceId string, body gopay.BodyMap) (ppRsp *EmptyRsp, err error)
取消已发送发票(Cancel sent invoice) Code = 0 is success 文档:https://developer.paypal.com/docs/api/invoicing/v2/#invoices_cancel
func (*Client) InvoiceCreate ¶
func (c *Client) InvoiceCreate(ctx context.Context, body gopay.BodyMap) (ppRsp *InvoiceCreateRsp, err error)
创建虚拟发票(Create draft invoice) Code = 0 is success 文档:https://developer.paypal.com/docs/api/invoicing/v2/#invoices_create
func (*Client) InvoiceDelete ¶
删除发票(Delete invoice) Code = 0 is success 文档:https://developer.paypal.com/docs/api/invoicing/v2/#invoices_delete
func (*Client) InvoiceDetail ¶
func (c *Client) InvoiceDetail(ctx context.Context, invoiceId string) (ppRsp *InvoiceDetailRsp, err error)
获取发票详情(Show invoice details) Code = 0 is success 文档:https://developer.paypal.com/docs/api/invoicing/v2/#invoices_get
func (*Client) InvoiceGenerateQRCode ¶
func (c *Client) InvoiceGenerateQRCode(ctx context.Context, invoiceId string, body gopay.BodyMap) (ppRsp *InvoiceGenerateQRCodeRsp, err error)
生成发票二维码(Generate QR code) Code = 0 is success 文档:https://developer.paypal.com/docs/api/invoicing/v2/#invoices_generate-qr-code
func (*Client) InvoiceList ¶
func (c *Client) InvoiceList(ctx context.Context, query gopay.BodyMap) (ppRsp *InvoiceListRsp, err error)
发票列表(List invoices) Code = 0 is success 文档:https://developer.paypal.com/docs/api/invoicing/v2/#invoices_list
func (*Client) InvoiceNumberGenerate ¶
func (c *Client) InvoiceNumberGenerate(ctx context.Context, invoiceNumber string) (ppRsp *InvoiceNumberGenerateRsp, err error)
生成下一个发票号码(Generate invoice number) Code = 0 is success 文档:https://developer.paypal.com/docs/api/invoicing/v2/#invoices_generate-next-invoice-number
func (*Client) InvoicePaymentDelete ¶
func (c *Client) InvoicePaymentDelete(ctx context.Context, invoiceId, transactionId string) (ppRsp *EmptyRsp, err error)
发票付款删除(Delete external payment) Code = 0 is success 文档:https://developer.paypal.com/docs/api/invoicing/v2/#invoices_payments-delete
func (*Client) InvoicePaymentRecord ¶
func (c *Client) InvoicePaymentRecord(ctx context.Context, invoiceId string, body gopay.BodyMap) (ppRsp *InvoicePaymentRsp, err error)
发票付款记录(Record payment for invoice) Code = 0 is success 文档:https://developer.paypal.com/docs/api/invoicing/v2/#invoices_payments
func (*Client) InvoiceRefundDelete ¶
func (c *Client) InvoiceRefundDelete(ctx context.Context, invoiceId, transactionId string) (ppRsp *EmptyRsp, err error)
发票退款删除(Delete external refund) Code = 0 is success 文档:https://developer.paypal.com/docs/api/invoicing/v2/#invoices_refunds-delete
func (*Client) InvoiceRefundRecord ¶
func (c *Client) InvoiceRefundRecord(ctx context.Context, invoiceId string, body gopay.BodyMap) (ppRsp *InvoiceRefundRsp, err error)
发票退款记录(Record refund for invoice) Code = 0 is success 文档:https://developer.paypal.com/docs/api/invoicing/v2/#invoices_refunds
func (*Client) InvoiceSearch ¶
func (c *Client) InvoiceSearch(ctx context.Context, page, pageSize int, totalRequired bool, body gopay.BodyMap) (ppRsp *InvoiceSearchRsp, err error)
发票搜索(Search for invoices) Code = 0 is success 文档:https://developer.paypal.com/docs/api/invoicing/v2/#search-invoices_search-invoices
func (*Client) InvoiceSend ¶
func (c *Client) InvoiceSend(ctx context.Context, invoiceId string, body gopay.BodyMap) (ppRsp *InvoiceSendRsp, err error)
发送发票(Send invoice) Code = 0 is success 文档:https://developer.paypal.com/docs/api/invoicing/v2/#invoices_send
func (*Client) InvoiceSendRemind ¶
func (c *Client) InvoiceSendRemind(ctx context.Context, invoiceId string, body gopay.BodyMap) (ppRsp *EmptyRsp, err error)
发送发票提醒(Send invoice reminder) Code = 0 is success 文档:https://developer.paypal.com/docs/api/invoicing/v2/#invoices_remind
func (*Client) InvoiceTemplateCreate ¶
func (c *Client) InvoiceTemplateCreate(ctx context.Context, body gopay.BodyMap) (ppRsp *InvoiceTemplateCreateRsp, err error)
创建发票模板(Create template) Code = 0 is success 文档:https://developer.paypal.com/docs/api/invoicing/v2/#templates_create
func (*Client) InvoiceTemplateDelete ¶
func (c *Client) InvoiceTemplateDelete(ctx context.Context, templateId string) (ppRsp *EmptyRsp, err error)
删除发票模板(Delete template) Code = 0 is success 文档:https://developer.paypal.com/docs/api/invoicing/v2/#templates_delete
func (*Client) InvoiceTemplateList ¶
func (c *Client) InvoiceTemplateList(ctx context.Context, query gopay.BodyMap) (ppRsp *InvoiceTemplateListRsp, err error)
发票模板列表(List templates) Code = 0 is success 文档:https://developer.paypal.com/docs/api/invoicing/v2/#templates_list
func (*Client) InvoiceTemplateUpdate ¶
func (c *Client) InvoiceTemplateUpdate(ctx context.Context, templateId string, body gopay.BodyMap) (ppRsp *InvoiceTemplateUpdateRsp, err error)
更新发票模板(Fully update template) Code = 0 is success 文档:https://developer.paypal.com/docs/api/invoicing/v2/#templates_update
func (*Client) InvoiceUpdate ¶
func (c *Client) InvoiceUpdate(ctx context.Context, invoiceId string, sendToInvoicer, sendToRecipient bool, body gopay.BodyMap) (ppRsp *InvoiceUpdateRsp, err error)
更新发票(Fully update invoice) Code = 0 is success 文档:https://developer.paypal.com/docs/api/invoicing/v2/#invoices_update
func (*Client) OrderAuthorize ¶
func (c *Client) OrderAuthorize(ctx context.Context, orderId string, bm gopay.BodyMap) (ppRsp *OrderAuthorizeRsp, err error)
订单支付授权(Authorize payment for order) Code = 0 is success 文档:https://developer.paypal.com/docs/api/orders/v2/#orders_authorize
func (*Client) OrderCapture ¶
func (c *Client) OrderCapture(ctx context.Context, orderId string, bm gopay.BodyMap) (ppRsp *OrderCaptureRsp, err error)
订单支付捕获(Capture payment for order) Code = 0 is success 文档:https://developer.paypal.com/docs/api/orders/v2/#orders_capture
func (*Client) OrderConfirm ¶
func (c *Client) OrderConfirm(ctx context.Context, orderId string, bm gopay.BodyMap) (ppRsp *OrderConfirmRsp, err error)
订单支付确认(Confirm the Order) Code = 0 is success 文档:https://developer.paypal.com/docs/api/orders/v2/#orders_confirm
func (*Client) OrderDetail ¶
func (c *Client) OrderDetail(ctx context.Context, orderId string, bm gopay.BodyMap) (ppRsp *OrderDetailRsp, err error)
订单详情(Show order details) Code = 0 is success 文档:https://developer.paypal.com/docs/api/orders/v2/#orders_get
func (*Client) PaymentAuthorizeCapture ¶
func (c *Client) PaymentAuthorizeCapture(ctx context.Context, authorizationId string, bm gopay.BodyMap) (ppRsp *PaymentAuthorizeCaptureRsp, err error)
支付授权捕获(Capture authorized payment) Code = 0 is success 文档:https://developer.paypal.com/docs/api/payments/v2/#authorizations_capture
func (*Client) PaymentAuthorizeDetail ¶
func (c *Client) PaymentAuthorizeDetail(ctx context.Context, authorizationId string) (ppRsp *PaymentAuthorizeDetailRsp, err error)
支付授权详情(Show details for authorized payment) Code = 0 is success 文档:https://developer.paypal.com/docs/api/payments/v2/#authorizations_get
func (*Client) PaymentAuthorizeVoid ¶
func (c *Client) PaymentAuthorizeVoid(ctx context.Context, authorizationId string) (ppRsp *EmptyRsp, err error)
作废支付授权(Void authorized payment) Code = 0 is success 文档:https://developer.paypal.com/docs/api/payments/v2/#authorizations_void
func (*Client) PaymentCaptureDetail ¶
func (c *Client) PaymentCaptureDetail(ctx context.Context, captureId string) (ppRsp *PaymentCaptureDetailRsp, err error)
支付捕获详情(Show captured payment details) Code = 0 is success 文档:https://developer.paypal.com/docs/api/payments/v2/#captures_get
func (*Client) PaymentCaptureRefund ¶
func (c *Client) PaymentCaptureRefund(ctx context.Context, captureId string, bm gopay.BodyMap) (ppRsp *PaymentCaptureRefundRsp, err error)
支付捕获退款(Refund captured payment) Code = 0 is success 文档:https://developer.paypal.com/docs/api/payments/v2/#captures_refund
func (*Client) PaymentReauthorize ¶
func (c *Client) PaymentReauthorize(ctx context.Context, authorizationId string, bm gopay.BodyMap) (ppRsp *PaymentReauthorizeRsp, err error)
重新授权支付授权(Reauthorize authorized payment) Note:This request is currently not supported for Partner use cases. 文档:https://developer.paypal.com/docs/api/payments/v2/#authorizations_reauthorize
func (*Client) PaymentRefundDetail ¶
func (c *Client) PaymentRefundDetail(ctx context.Context, refundId string) (ppRsp *PaymentRefundDetailRsp, err error)
支付退款详情(Show refund details) Code = 0 is success 文档:https://developer.paypal.com/docs/api/payments/v2/#refunds_get
func (*Client) SetBodySize ¶
SetBodySize 设置http response body size(MB)
func (*Client) SetHttpClient ¶
SetHttpClient 设置自定义的xhttp.Client
func (*Client) SetProxyUrl ¶
SetProxyUrl 设置代理 Url 使用场景: 1. 大陆直接调用 PayPal 接口响应较慢,可以在第三地例如硅谷部署代理服务器来加速请求
func (*Client) ShowPayoutBatchDetails ¶
func (c *Client) ShowPayoutBatchDetails(ctx context.Context, payoutBatchId string, bm gopay.BodyMap) (ppRsp *PayoutBatchDetailRsp, err error)
批量支出详情(Show payout batch details) Code = 0 is success 文档:https://developer.paypal.com/docs/api/payments.payouts-batch/v1/#payouts_get
func (Client) ShowPayoutItemDetails ¶
func (c Client) ShowPayoutItemDetails(ctx context.Context, payoutItemId string) (ppRsp *PayoutItemDetailRsp, err error)
批量支出项目详情(Show Payout Item Details) Code = 0 is success 文档:https://developer.paypal.com/docs/api/payments.payouts-batch/v1/#payouts-item_get
func (*Client) UpdateOrder ¶
func (c *Client) UpdateOrder(ctx context.Context, orderId string, patchs []*Patch) (ppRsp *EmptyRsp, err error)
更新订单(Update order) Code = 0 is success 文档:https://developer.paypal.com/docs/api/orders/v2/#orders_patch
type Configuration ¶
type Configuration struct {
AllowTip bool `json:"allow_tip"`
PartialPayment *PartialPayment `json:"partial_payment"`
TaxCalculatedAfterDiscount bool `json:"tax_calculated_after_discount"`
TaxInclusive bool `json:"tax_inclusive"`
TemplateId string `json:"template_id"`
}
type ContactInformation ¶
type CreateBatchPayoutRsp ¶
type CreateBatchPayoutRsp struct {
Code int `json:"-"`
Error string `json:"-"`
ErrorResponse *ErrorResponse `json:"-"`
Response *BatchPayout `json:"response,omitempty"`
}
type CreateBillingRsp ¶
type CreateBillingRsp struct {
Code int `json:"-"`
Error string `json:"-"`
ErrorResponse *ErrorResponse `json:"-"`
Response *BillingDetail `json:"response,omitempty"`
}
type CreateOrderRsp ¶
type CreateOrderRsp struct {
Code int `json:"-"`
Error string `json:"-"`
ErrorResponse *ErrorResponse `json:"-"`
Response *OrderDetail `json:"response,omitempty"`
}
type DisplayPreference ¶
type DisplayPreference struct {
Hidden bool `json:"hidden"`
}
type EmptyRsp ¶
type EmptyRsp struct {
Code int `json:"-"`
Error string `json:"-"`
ErrorResponse *ErrorResponse `json:"-"`
}
type ErrorDetail ¶
type ErrorResponse ¶
type ErrorResponse struct {
Name string `json:"name,omitempty"`
Message string `json:"message,omitempty"`
DebugId string `json:"debug_id,omitempty"`
Details []ErrorDetail `json:"details,omitempty"`
Links []Link `json:"links,omitempty"`
}
type ExchangeRate ¶
type FixedPrice ¶
type Invoice ¶
type Invoice struct {
Id string `json:"id"`
ParentId string `json:"parent_id,omitempty"`
Status string `json:"status"`
Detail *InvoiceDetail `json:"detail"`
Invoicer *Invoicer `json:"invoicer"`
Amount *Amount `json:"amount"`
DueAmount *Amount `json:"due_amount"`
AdditionalRecipients []*AdditionalRecipient `json:"additional_recipients,omitempty"`
Configuration *Configuration `json:"configuration,omitempty"`
Gratuity *Amount `json:"gratuity,omitempty"`
Items []*Item `json:"items,omitempty"`
Links []*Link `json:"links,omitempty"`
Payments []*InvoicePayments `json:"payments,omitempty"`
PrimaryRecipients []*RecipientInfo `json:"primary_recipients,omitempty"`
Refunds []*InvoiceRefunds `json:"refunds,omitempty"`
}
type InvoiceCreateRsp ¶
type InvoiceCreateRsp struct {
Code int `json:"-"`
Error string `json:"-"`
ErrorResponse *ErrorResponse `json:"-"`
Response *Invoice `json:"response,omitempty"`
}
type InvoiceDetail ¶
type InvoiceDetail struct {
InvoiceNumber string `json:"invoice_number"`
Reference string `json:"reference"`
TermsAndConditions string `json:"terms_and_conditions,omitempty"`
InvoiceDate string `json:"invoice_date"`
CurrencyCode string `json:"currency_code"`
Note string `json:"note"`
Term string `json:"term"`
Memo string `json:"memo"`
Attachments []*Attachment `json:"attachments"`
PaymentTerm *PaymentItem `json:"payment_term"`
Metadata *Metadata `json:"metadata"`
}
type InvoiceDetailRsp ¶
type InvoiceDetailRsp struct {
Code int `json:"-"`
Error string `json:"-"`
ErrorResponse *ErrorResponse `json:"-"`
Response *Invoice `json:"response,omitempty"`
}
type InvoiceGenerateQRCodeRsp ¶
type InvoiceGenerateQRCodeRsp struct {
Code int `json:"-"`
Error string `json:"-"`
ErrorResponse *ErrorResponse `json:"-"`
Response *QRCodeBase64 `json:"response,omitempty"`
}
type InvoiceList ¶
type InvoiceListRsp ¶
type InvoiceListRsp struct {
Code int `json:"-"`
Error string `json:"-"`
ErrorResponse *ErrorResponse `json:"-"`
Response *InvoiceList `json:"response,omitempty"`
}
type InvoiceNumber ¶
type InvoiceNumber struct {
InvoiceNumber string `json:"invoice_number"`
}
type InvoiceNumberGenerateRsp ¶
type InvoiceNumberGenerateRsp struct {
Code int `json:"-"`
Error string `json:"-"`
ErrorResponse *ErrorResponse `json:"-"`
Response *InvoiceNumber `json:"response,omitempty"`
}
type InvoicePayment ¶
type InvoicePayment struct {
PaymentId string `json:"payment_id"`
}
type InvoicePaymentRsp ¶
type InvoicePaymentRsp struct {
Code int `json:"-"`
Error string `json:"-"`
ErrorResponse *ErrorResponse `json:"-"`
Response *InvoicePayment `json:"response,omitempty"`
}
type InvoicePayments ¶
type InvoicePayments struct {
PaidAmount *Amount `json:"paid_amount"`
Transactions []*PaymentDetail `json:"transactions"`
}
type InvoiceRefund ¶
type InvoiceRefund struct {
RefundId string `json:"refund_id"`
}
type InvoiceRefundRsp ¶
type InvoiceRefundRsp struct {
Code int `json:"-"`
Error string `json:"-"`
ErrorResponse *ErrorResponse `json:"-"`
Response *InvoiceRefund `json:"response,omitempty"`
}
type InvoiceRefunds ¶
type InvoiceRefunds struct {
RefundAmount *Amount `json:"refund_amount"`
Transactions []*RefundDetail `json:"transactions"`
}
type InvoiceSearch ¶
type InvoiceSearchRsp ¶
type InvoiceSearchRsp struct {
Code int `json:"-"`
Error string `json:"-"`
ErrorResponse *ErrorResponse `json:"-"`
Response *InvoiceSearch `json:"response,omitempty"`
}
type InvoiceSend ¶
type InvoiceSend struct {
Links []*Link `json:"links"`
}
type InvoiceSendRsp ¶
type InvoiceSendRsp struct {
Code int `json:"-"`
Error string `json:"-"`
ErrorResponse *ErrorResponse `json:"-"`
Response *InvoiceSend `json:"response,omitempty"`
}
type InvoiceTemplate ¶
type InvoiceTemplate struct {
Addresses []*Address `json:"addresses"`
Emails string `json:"emails"`
Links []*Link `json:"links"`
Phones []*PhoneDetail `json:"phones"`
Templates []*Template `json:"templates"`
}
type InvoiceTemplateCreateRsp ¶
type InvoiceTemplateCreateRsp struct {
Code int `json:"-"`
Error string `json:"-"`
ErrorResponse *ErrorResponse `json:"-"`
Response *Template `json:"response,omitempty"`
}
type InvoiceTemplateListRsp ¶
type InvoiceTemplateListRsp struct {
Code int `json:"-"`
Error string `json:"-"`
ErrorResponse *ErrorResponse `json:"-"`
Response *InvoiceTemplate `json:"response,omitempty"`
}
type InvoiceTemplateUpdateRsp ¶
type InvoiceTemplateUpdateRsp struct {
Code int `json:"-"`
Error string `json:"-"`
ErrorResponse *ErrorResponse `json:"-"`
Response *Template `json:"response,omitempty"`
}
type InvoiceUpdateRsp ¶
type InvoiceUpdateRsp struct {
Code int `json:"-"`
Error string `json:"-"`
ErrorResponse *ErrorResponse `json:"-"`
Response *Invoice `json:"response,omitempty"`
}
type Item ¶
type Item struct {
Id string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
UnitAmount *Amount `json:"unit_amount,omitempty"`
Tax *Amount `json:"tax,omitempty"`
Quantity string `json:"quantity,omitempty"`
Description string `json:"description,omitempty"`
Sku string `json:"sku,omitempty"`
Category string `json:"category,omitempty"`
ItemDate string `json:"item_date,omitempty"`
Discount *Discount `json:"discount,omitempty"`
UnitOfMeasure string `json:"unit_of_measure,omitempty"`
}
type Metadata ¶
type Metadata struct {
CreateTime string `json:"create_time"`
CreatedBy string `json:"created_by,omitempty"`
LastUpdateTime string `json:"last_update_time,omitempty"`
LastUpdatedBy string `json:"last_updated_by,omitempty"`
CancelTime string `json:"cancel_time,omitempty"`
CancelledBy string `json:"cancelled_by,omitempty"`
CreatedByFlow string `json:"created_by_flow,omitempty"`
FirstSentTime string `json:"first_sent_time,omitempty"`
InvoicerViewUrl string `json:"invoicer_view_url,omitempty"`
LastSentBy string `json:"last_sent_by,omitempty"`
LastSentTime string `json:"last_sent_time,omitempty"`
RecipientViewUrl string `json:"recipient_view_url,omitempty"`
}
type Name ¶
type Name struct {
Prefix string `json:"prefix,omitempty"`
GivenName string `json:"given_name,omitempty"`
Surname string `json:"surname,omitempty"`
MiddleName string `json:"middle_name,omitempty"`
Suffix string `json:"suffix,omitempty"`
FullName string `json:"full_name,omitempty"`
AlternateFullName string `json:"alternate_full_name,omitempty"`
}
type NetAmountBreakdown ¶
type NetAmountBreakdown struct {
PayableAmount *Amount `json:"payable_amount,omitempty"`
ConvertedAmount *Amount `json:"converted_amount,omitempty"`
ExchangeRate *ExchangeRate `json:"exchange_rate,omitempty"`
}
type OrderAuthorizeRsp ¶
type OrderAuthorizeRsp struct {
Code int `json:"-"`
Error string `json:"-"`
ErrorResponse *ErrorResponse `json:"-"`
Response *OrderDetail `json:"response,omitempty"`
}
type OrderCaptureRsp ¶
type OrderCaptureRsp struct {
Code int `json:"-"`
Error string `json:"-"`
ErrorResponse *ErrorResponse `json:"-"`
Response *OrderDetail `json:"response,omitempty"`
}
type OrderConfirmRsp ¶
type OrderConfirmRsp struct {
Code int `json:"-"`
Error string `json:"-"`
ErrorResponse *ErrorResponse `json:"-"`
Response *OrderDetail `json:"response,omitempty"`
}
type OrderDetail ¶
type OrderDetail struct {
Id string `json:"id,omitempty"`
Status string `json:"status,omitempty"` // CREATED、SAVED、APPROVED、VOIDED、COMPLETED、PAYER_ACTION_REQUIRED
PaymentSource *PaymentSource `json:"payment_source,omitempty"`
Intent string `json:"intent,omitempty"`
ProcessingInstruction string `json:"processing_instruction,omitempty"`
Payer *Payer `json:"payer,omitempty"`
PurchaseUnits []*PurchaseUnit `json:"purchase_units,omitempty"`
Links []*Link `json:"links,omitempty"`
CreateTime string `json:"create_time,omitempty"`
UpdateTime string `json:"update_time,omitempty"`
}
type OrderDetailRsp ¶
type OrderDetailRsp struct {
Code int `json:"-"`
Error string `json:"-"`
ErrorResponse *ErrorResponse `json:"-"`
Response *OrderDetail `json:"response,omitempty"`
}
type P24 ¶
type P24 struct {
CountryCode string `json:"country_code,omitempty"`
Email string `json:"email,omitempty"`
MethodDescription string `json:"method_description,omitempty"`
MethodId string `json:"method_id,omitempty"`
Name string `json:"name,omitempty"`
PaymentDescriptor string `json:"payment_descriptor,omitempty"`
}
type PartialPayment ¶
type PaymentAuthorizeCapture ¶
type PaymentAuthorizeCapture struct {
Id string `json:"id,omitempty"`
Status string `json:"status,omitempty"` // COMPLETED、DECLINED、PARTIALLY_REFUNDED、PENDING、REFUNDED、FAILED
StatusDetails *StatusDetails `json:"status_details,omitempty"`
Amount *Amount `json:"amount,omitempty"`
InvoiceId string `json:"invoice_id,omitempty"`
CustomId string `json:"custom_id,omitempty"`
FinalCapture bool `json:"final_capture,omitempty"`
SellerProtection *SellerProtection `json:"seller_protection,omitempty"`
SellerReceivableBreakdown *SellerReceivableBreakdown `json:"seller_receivable_breakdown,omitempty"`
DisbursementMode string `json:"disbursement_mode,omitempty"`
Links []*Link `json:"links,omitempty"`
ProcessorResponse *Processor `json:"processor_response,omitempty"`
CreateTime string `json:"create_time,omitempty"`
UpdateTime string `json:"update_time,omitempty"`
}
type PaymentAuthorizeCaptureRsp ¶
type PaymentAuthorizeCaptureRsp struct {
Code int `json:"-"`
Error string `json:"-"`
ErrorResponse *ErrorResponse `json:"-"`
Response *PaymentAuthorizeCapture `json:"response,omitempty"`
}
type PaymentAuthorizeDetail ¶
type PaymentAuthorizeDetail struct {
Id string `json:"id,omitempty"`
Status string `json:"status,omitempty"` // CREATED、CAPTURED、DENIED、EXPIRED、PARTIALLY_CAPTURED、PARTIALLY_CREATED、VOIDED、PENDING
StatusDetails *StatusDetails `json:"status_details,omitempty"`
Amount *Amount `json:"amount,omitempty"`
InvoiceId string `json:"invoice_id,omitempty"`
CustomId string `json:"custom_id,omitempty"`
SellerProtection *SellerProtection `json:"seller_protection,omitempty"`
Links []*Link `json:"links,omitempty"`
ExpirationTime string `json:"expiration_time,omitempty"`
CreateTime string `json:"create_time,omitempty"`
UpdateTime string `json:"update_time,omitempty"`
}
type PaymentAuthorizeDetailRsp ¶
type PaymentAuthorizeDetailRsp struct {
Code int `json:"-"`
Error string `json:"-"`
ErrorResponse *ErrorResponse `json:"-"`
Response *PaymentAuthorizeDetail `json:"response,omitempty"`
}
type PaymentCaptureDetailRsp ¶
type PaymentCaptureDetailRsp struct {
Code int `json:"-"`
Error string `json:"-"`
ErrorResponse *ErrorResponse `json:"-"`
Response *PaymentAuthorizeCapture `json:"response,omitempty"`
}
type PaymentCaptureRefund ¶
type PaymentCaptureRefund struct {
Id string `json:"id,omitempty"`
Status string `json:"status,omitempty"` // CANCELLED、PENDING、COMPLETED
StatusDetails *StatusDetails `json:"status_details,omitempty"`
Amount *Amount `json:"amount,omitempty"`
InvoiceId string `json:"invoice_id,omitempty"`
NoteToPayer string `json:"note_to_payer,omitempty"`
SellerPayableBreakdown *SellerPayableBreakdown `json:"seller_payable_breakdown,omitempty"`
Links []*Link `json:"links,omitempty"`
CreateTime string `json:"create_time,omitempty"`
UpdateTime string `json:"update_time,omitempty"`
}
type PaymentCaptureRefundRsp ¶
type PaymentCaptureRefundRsp struct {
Code int `json:"-"`
Error string `json:"-"`
ErrorResponse *ErrorResponse `json:"-"`
Response *PaymentCaptureRefund `json:"response,omitempty"`
}
type PaymentDetail ¶
type PaymentInstruction ¶
type PaymentInstruction struct {
PlatformFees []*PlatformFee `json:"platform_fees,omitempty"`
DisbursementMode string `json:"disbursement_mode,omitempty"`
PayeePricingTierId string `json:"payee_pricing_tier_id,omitempty"`
}
type PaymentItem ¶
type PaymentPreferences ¶
type PaymentReauthorizeRsp ¶
type PaymentReauthorizeRsp struct {
}
type PaymentRefundDetailRsp ¶
type PaymentRefundDetailRsp struct {
Code int `json:"-"`
Error string `json:"-"`
ErrorResponse *ErrorResponse `json:"-"`
Response *PaymentCaptureRefund `json:"response,omitempty"`
}
type PaymentSource ¶
type PaymentSource struct {
Bancontact *Bancontact `json:"bancontact,omitempty"`
Blik *Blik `json:"blik,omitempty"`
Card *Card `json:"card,omitempty"`
Eps *Eps `json:"eps,omitempty"`
Giropay *Giropay `json:"giropay,omitempty"`
Ideal *Ideal `json:"ideal,omitempty"`
Mybank *Mybank `json:"mybank,omitempty"`
P24 *P24 `json:"p24,omitempty"`
Sofort *Sofort `json:"sofort,omitempty"`
Trustly *Trustly `json:"trustly,omitempty"`
}
type Payments ¶
type Payments struct {
Authorizations []*Authorization `json:"authorizations,omitempty"`
Captures []*Capture `json:"captures,omitempty"`
Refunds []*Refund `json:"refunds,omitempty"`
}
type PayoutBatchDetail ¶
type PayoutBatchDetail struct {
BatchHeader *BatchHeader `json:"batch_header"`
Items []*PayoutItemDetail `json:"items"`
Links []*Link `json:"links"`
TotalItems int64 `json:"total_items,omitempty"`
TotalPage int64 `json:"total_page,omitempty"`
}
type PayoutBatchDetailRsp ¶
type PayoutBatchDetailRsp struct {
Code int `json:"-"`
Error string `json:"-"`
ErrorResponse *ErrorResponse `json:"-"`
Response *PayoutBatchDetail `json:"response,omitempty"`
}
type PayoutItem ¶
type PayoutItemDetail ¶
type PayoutItemDetail struct {
ActivityId string `json:"activity_id,omitempty"`
CurrencyConversion *PayoutCurrencyConversion `json:"currency_conversion,omitempty"`
Errors *Errors `json:"errors,omitempty"`
Links []*Link `json:"links,omitempty"`
PayoutBatchId string `json:"payout_batch_id"`
PayoutItem *PayoutItem `json:"payout_item"`
PayoutItemFee *V1Amount `json:"payout_item_fee"`
PayoutItemId string `json:"payout_item_id"`
SenderBatchId string `json:"sender_batch_id,omitempty"`
TimeProcessed string `json:"time_processed"`
TransactionId string `json:"transaction_id"`
TransactionStatus string `json:"transaction_status"` // SUCCESS、FAILED、PENDING、UNCLAIMED、RETURNED、ONHOLD、BLOCKED、REFUNDED、REVERSED
}
type PayoutItemDetailRsp ¶
type PayoutItemDetailRsp struct {
Code int `json:"-"`
Error string `json:"-"`
ErrorResponse *ErrorResponse `json:"-"`
Response *PayoutItemDetail `json:"response,omitempty"`
}
type Phone ¶
type Phone struct {
PhoneType string `json:"phone_type"`
PhoneNumber *PhoneNumber `json:"phone_number"`
}
type PhoneDetail ¶
type PhoneNumber ¶
type PhoneNumber struct {
NationalNumber string `json:"national_number"`
}
type Plans ¶
type Plans struct {
ProductId string `json:"product_id"`
Name string `json:"name"`
Description string `json:"description"`
BillingCycles []*BillingCycles `json:"billing_cycles"`
PaymentDefinitions *PaymentPreferences `json:"payment_preferences"`
}
type PlatformFee ¶
type PricingScheme ¶
type PricingScheme struct {
FixedPrice *FixedPrice `json:"fixed_price"`
}
type PurchaseUnit ¶
type PurchaseUnit struct {
Id string `json:"id,omitempty"`
ReferenceId string `json:"reference_id,omitempty"`
Amount *Amount `json:"amount,omitempty"`
Payee *Payee `json:"payee,omitempty"`
PaymentInstruction *PaymentInstruction `json:"payment_instruction,omitempty"`
Description string `json:"description,omitempty"`
CustomId string `json:"custom_id,omitempty"`
InvoiceId string `json:"invoice_id,omitempty"`
SoftDescriptor string `json:"soft_descriptor,omitempty"`
Items []*Item `json:"items,omitempty"`
Shipping *Shipping `json:"shipping,omitempty"`
Payments *Payments `json:"payments,omitempty"`
}
type PurchaseUnitAddress ¶
type PurchaseUnitBreakdown ¶
type PurchaseUnitBreakdown struct {
//item_total
ItemTotal *FixedPrice `json:"item_total,omitempty"`
// shipping
Shipping *FixedPrice `json:"shipping,omitempty"`
// handling
Handling *FixedPrice `json:"handling,omitempty"`
// tax_total
TaxTotal *FixedPrice `json:"tax_total,omitempty"`
// insurance
Insurance *FixedPrice `json:"insurance,omitempty"`
// shipping_discount
ShippingDiscount *FixedPrice `json:"shipping_discount,omitempty"`
// discount
Discount *FixedPrice `json:"discount,omitempty"`
}
type QRCodeBase64 ¶
type QRCodeBase64 struct {
Base64Image string
}
type RecipientInfo ¶
type RecipientInfo struct {
BillingInfo *BillingInfo `json:"billing_info"`
ShippingInfo *ContactInformation `json:"shipping_info"`
}
type Refund ¶
type Refund struct {
Id string `json:"id,omitempty"`
Status string `json:"status,omitempty"`
StatusDetails *StatusDetails `json:"status_details,omitempty"`
InvoiceId string `json:"invoice_id,omitempty"`
CustomId string `json:"custom_id,omitempty"`
AcquirerReferenceNumber string `json:"acquirer_reference_number,omitempty"`
NoteToPayer string `json:"note_to_payer,omitempty"`
SellerPayableBreakdown *SellerPayableBreakdown `json:"seller_payable_breakdown,omitempty"`
Links []*Link `json:"links,omitempty"`
Amount *Amount `json:"amount,omitempty"`
Payer *Payee `json:"payer,omitempty"`
CreateTime string `json:"create_time,omitempty"`
UpdateTime string `json:"update_time,omitempty"`
}
type RefundDetail ¶
type SellerPayableBreakdown ¶
type SellerPayableBreakdown struct {
GrossAmount *Amount `json:"gross_amount"`
PaypalFee *Amount `json:"paypal_fee,omitempty"`
PaypalFeeInReceivableCurrency *Amount `json:"paypal_fee_in_receivable_currency,omitempty"`
NetAmount *Amount `json:"net_amount,omitempty"`
NetAmountInReceivableCurrency *Amount `json:"net_amount_in_receivable_currency,omitempty"`
PlatformFees []*PlatformFee `json:"platform_fees,omitempty"`
NetAmountBreakdown []*NetAmountBreakdown `json:"net_amount_breakdown,omitempty"`
TotalRefundedAmount *Amount `json:"total_refunded_amount,omitempty"`
}
type SellerProtection ¶
type SellerReceivableBreakdown ¶
type SellerReceivableBreakdown struct {
GrossAmount *Amount `json:"gross_amount"`
PaypalFee *Amount `json:"paypal_fee,omitempty"`
PaypalFeeInReceivableCurrency *Amount `json:"paypal_fee_in_receivable_currency,omitempty"`
NetAmount *Amount `json:"net_amount,omitempty"`
ReceivableAmount *Amount `json:"receivable_amount,omitempty"`
ExchangeRate *ExchangeRate `json:"exchange_rate,omitempty"`
PlatformFees []*PlatformFee `json:"platform_fees,omitempty"`
}
type SenderBatchHeader ¶
type Shipping ¶
type Shipping struct {
Name *Name `json:"name,omitempty"`
Type string `json:"type,omitempty"` // SHIPPING、PICKUP_IN_PERSON
Address *PurchaseUnitAddress `json:"address,omitempty"`
}
type StatusDetails ¶
type StatusDetails struct {
Reason string `json:"reason"`
}
type Template ¶
type Template struct {
Id string `json:"id"`
Name string `json:"name"`
DefaultTemplate bool `json:"default_template"`
StandardTemplate bool `json:"standard_template"`
Links []*Link `json:"links"`
Settings *TemplateSetting `json:"settings"`
TemplateInfo *TemplateInfo `json:"template_info"`
UnitOfMeasure string `json:"unit_of_measure"`
}
type TemplateInfo ¶
type TemplateInfo struct {
AdditionalRecipients []*AdditionalRecipient `json:"additional_recipients,omitempty"`
Amount *Amount `json:"amount"`
Configuration *Configuration `json:"configuration,omitempty"`
Detail *InvoiceDetail `json:"detail"`
DueAmount *Amount `json:"due_amount"`
Invoicer *Invoicer `json:"invoicer"`
Items []*Item `json:"items,omitempty"`
PrimaryRecipients []*RecipientInfo `json:"primary_recipients,omitempty"`
}
type TemplateItemSetting ¶
type TemplateItemSetting struct {
FieldName string `json:"field_name"`
DisplayPreference *DisplayPreference `json:"display_preference"`
}
type TemplateSetting ¶
type TemplateSetting struct {
TemplateItemSettings []*TemplateItemSetting `json:"template_item_settings"`
TemplateSubtotalSettings []*TemplateSubtotalSetting `json:"template_subtotal_settings"`
}
type TemplateSubtotalSetting ¶
type TemplateSubtotalSetting struct {
FieldName string `json:"field_name"`
DisplayPreference *DisplayPreference `json:"display_preference"`
}