Skip to content

Commit defe3e0

Browse files
authored
Fix authorize order to return the correct response (#243)
1 parent efc9bbd commit defe3e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

order.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ func (c *Client) UpdateOrder(ctx context.Context, orderID string, op string, pat
9292

9393
// AuthorizeOrder - https://developer.paypal.com/docs/api/orders/v2/#orders_authorize
9494
// Endpoint: POST /v2/checkout/orders/ID/authorize
95-
func (c *Client) AuthorizeOrder(ctx context.Context, orderID string, authorizeOrderRequest AuthorizeOrderRequest) (*Authorization, error) {
96-
auth := &Authorization{}
95+
func (c *Client) AuthorizeOrder(ctx context.Context, orderID string, authorizeOrderRequest AuthorizeOrderRequest) (*AuthorizeOrderResponse, error) {
96+
auth := &AuthorizeOrderResponse{}
9797

9898
req, err := c.NewRequest(ctx, "POST", fmt.Sprintf("%s%s", c.APIBase, "/v2/checkout/orders/"+orderID+"/authorize"), authorizeOrderRequest)
9999
if err != nil {

0 commit comments

Comments
 (0)