mirror of
https://github.com/plutov/paypal.git
synced 2025-01-23 10:21:03 +01:00
Use create order payer
This commit is contained in:
parent
586d690e8e
commit
1daa788741
4
order.go
4
order.go
|
@ -21,10 +21,10 @@ func (c *Client) GetOrder(orderID string) (*Order, error) {
|
|||
|
||||
// Create Order - Use this call to create an order
|
||||
// Endpoint: POST /v2/checkout/orders
|
||||
func (c *Client) CreateOrder(intent string, purchaseUnits []PurchaseUnitRequest, payer *PayerInfo, appContext *ApplicationContext) (*Order, error) {
|
||||
func (c *Client) CreateOrder(intent string, purchaseUnits []PurchaseUnitRequest, payer *CreateOrderPayer, appContext *ApplicationContext) (*Order, error) {
|
||||
type createOrderRequest struct {
|
||||
Intent string `json:"intent"`
|
||||
Payer *PayerInfo `json:"payer,omitempty"`
|
||||
Payer *CreateOrderPayer `json:"payer,omitempty"`
|
||||
PurchaseUnits []PurchaseUnitRequest `json:"purchase_units"`
|
||||
ApplicationContext *ApplicationContext `json:"application_context,omitempty"`
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user