forked from go-packages/paypal
Adding PaymentMethod support into ApplicationContext (#237)
This commit is contained in:
parent
5c5393bd47
commit
c9ae5c4190
14
const.go
14
const.go
|
@ -102,3 +102,17 @@ const (
|
||||||
ProductCategorySoftwareOther ProductCategory = "OTHER"
|
ProductCategorySoftwareOther ProductCategory = "OTHER"
|
||||||
ProductCategorySoftwareServices ProductCategory = "SERVICES"
|
ProductCategorySoftwareServices ProductCategory = "SERVICES"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type PayeePreferred string // Doc: https://developer.paypal.com/api/orders/v2/#definition-payment_method
|
||||||
|
const (
|
||||||
|
PayeePreferredUnrestricted PayeePreferred = "UNRESTRICTED"
|
||||||
|
PayeePreferredImmediatePaymentRequired PayeePreferred = "IMMEDIATE_PAYMENT_REQUIRED"
|
||||||
|
)
|
||||||
|
|
||||||
|
type StandardEntryClassCode string // Doc: https://developer.paypal.com/api/orders/v2/#definition-payment_method
|
||||||
|
const (
|
||||||
|
StandardEntryClassCodeTel StandardEntryClassCode="TEL"
|
||||||
|
StandardEntryClassCodeWeb StandardEntryClassCode="WEB"
|
||||||
|
StandardEntryClassCodeCcd StandardEntryClassCode="CCD"
|
||||||
|
StandardEntryClassCodePpd StandardEntryClassCode="PPD"
|
||||||
|
)
|
||||||
|
|
7
types.go
7
types.go
|
@ -198,11 +198,18 @@ type (
|
||||||
Locale string `json:"locale,omitempty"`
|
Locale string `json:"locale,omitempty"`
|
||||||
ShippingPreference ShippingPreference `json:"shipping_preference,omitempty"`
|
ShippingPreference ShippingPreference `json:"shipping_preference,omitempty"`
|
||||||
UserAction UserAction `json:"user_action,omitempty"`
|
UserAction UserAction `json:"user_action,omitempty"`
|
||||||
|
PaymentMethod PaymentMethod `json:"payment_method,omitempty"`
|
||||||
//LandingPage string `json:"landing_page,omitempty"` // not found in documentation
|
//LandingPage string `json:"landing_page,omitempty"` // not found in documentation
|
||||||
ReturnURL string `json:"return_url,omitempty"`
|
ReturnURL string `json:"return_url,omitempty"`
|
||||||
CancelURL string `json:"cancel_url,omitempty"`
|
CancelURL string `json:"cancel_url,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Doc: https://developer.paypal.com/api/orders/v2/#definition-payment_method
|
||||||
|
PaymentMethod struct {
|
||||||
|
PayeePreferred PayeePreferred `json:"payee_preferred,omitempty"`
|
||||||
|
StandardEntryClassCode StandardEntryClassCode `json:"standard_entry_class_code,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
// Authorization struct
|
// Authorization struct
|
||||||
Authorization struct {
|
Authorization struct {
|
||||||
ID string `json:"id,omitempty"`
|
ID string `json:"id,omitempty"`
|
||||||
|
|
Loading…
Reference in New Issue
Block a user