mirror of
https://github.com/plutov/paypal.git
synced 2025-01-23 10:21:03 +01:00
Merge pull request #53 from soyersoyer/master
Add allowed_payment_method option
This commit is contained in:
commit
acdf616064
28
types.go
28
types.go
|
@ -44,6 +44,15 @@ const (
|
||||||
LandingPageTypeLogin string = "Login"
|
LandingPageTypeLogin string = "Login"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Possible value for `allowed_payment_method` in PaymentOptions
|
||||||
|
//
|
||||||
|
// https://developer.paypal.com/docs/api/payments/#definition-payment_options
|
||||||
|
const (
|
||||||
|
AllowedPaymentUnrestricted string = "UNRESTRICTED"
|
||||||
|
AllowedPaymentInstantFundingSource string = "INSTANT_FUNDING_SOURCE"
|
||||||
|
AllowedPaymentImmediatePay string = "IMMEDIATE_PAY"
|
||||||
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
// JSONTime overrides MarshalJson method to format in ISO8601
|
// JSONTime overrides MarshalJson method to format in ISO8601
|
||||||
JSONTime time.Time
|
JSONTime time.Time
|
||||||
|
@ -360,6 +369,10 @@ type (
|
||||||
ChargeModels []ChargeModel `json:"charge_models,omitempty"`
|
ChargeModels []ChargeModel `json:"charge_models,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PaymentOptions struct {
|
||||||
|
AllowedPaymentMethod string `json:"allowed_payment_method,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
// PaymentPatch PATCH /v1/payments/payment/{payment_id)
|
// PaymentPatch PATCH /v1/payments/payment/{payment_id)
|
||||||
PaymentPatch struct {
|
PaymentPatch struct {
|
||||||
Operation string `json:"op"`
|
Operation string `json:"op"`
|
||||||
|
@ -490,13 +503,14 @@ type (
|
||||||
|
|
||||||
// Transaction struct
|
// Transaction struct
|
||||||
Transaction struct {
|
Transaction struct {
|
||||||
Amount *Amount `json:"amount"`
|
Amount *Amount `json:"amount"`
|
||||||
Description string `json:"description,omitempty"`
|
Description string `json:"description,omitempty"`
|
||||||
ItemList *ItemList `json:"item_list,omitempty"`
|
ItemList *ItemList `json:"item_list,omitempty"`
|
||||||
InvoiceNumber string `json:"invoice_number,omitempty"`
|
InvoiceNumber string `json:"invoice_number,omitempty"`
|
||||||
Custom string `json:"custom,omitempty"`
|
Custom string `json:"custom,omitempty"`
|
||||||
SoftDescriptor string `json:"soft_descriptor,omitempty"`
|
SoftDescriptor string `json:"soft_descriptor,omitempty"`
|
||||||
RelatedResources []Related `json:"related_resources,omitempty"`
|
RelatedResources []Related `json:"related_resources,omitempty"`
|
||||||
|
PaymentOptions *PaymentOptions `json:"payment_options,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// UserInfo struct
|
// UserInfo struct
|
||||||
|
|
Loading…
Reference in New Issue
Block a user