forked from go-packages/paypal
new types
This commit is contained in:
parent
0277b266bf
commit
71e0a81e64
8
payment.go
Normal file
8
payment.go
Normal file
|
@ -0,0 +1,8 @@
|
|||
package paypalsdk
|
||||
|
||||
import ()
|
||||
|
||||
// CreateDirectCreditCardPatment sends request with payment
|
||||
func CreateDirectCreditCardPatment(cc CreditCrad, amount Amount) error {
|
||||
return nil
|
||||
}
|
21
types.go
21
types.go
|
@ -1,11 +1,10 @@
|
|||
package paypalsdk
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"fmt"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
|
||||
const (
|
||||
// APIBaseSandBox points to the sandbox (for testing) version of the API
|
||||
APIBaseSandBox = "https://api.sandbox.paypal.com"
|
||||
|
@ -51,11 +50,27 @@ type (
|
|||
Details []ErrorDetail `json:"details"`
|
||||
}
|
||||
|
||||
// ErrorDetails map to error_details object
|
||||
// ErrorDetail map to error_details object
|
||||
ErrorDetail struct {
|
||||
Field string `json:"field"`
|
||||
Issue string `json:"issue"`
|
||||
}
|
||||
|
||||
// CreditCrad - All info about customer's CC
|
||||
CreditCrad struct {
|
||||
Type string
|
||||
Number string
|
||||
ExpireYear int
|
||||
ExpireMonth int
|
||||
FirstName string
|
||||
LastName string
|
||||
}
|
||||
|
||||
// Amount to pay
|
||||
Amount struct {
|
||||
Currency string
|
||||
Amount float32
|
||||
}
|
||||
)
|
||||
|
||||
// Error method implementation for ErrorResponse struct
|
||||
|
|
Loading…
Reference in New Issue
Block a user