pay_pal v0.0.5 PayPal.Payments.Orders

Documentation for PayPal.Payments.Orders

https://developer.paypal.com/docs/api/payments/#order

Link to this section Summary

Functions

Authorize an order

Capture an order

Show an order

Void an order

Link to this section Functions

Link to this function authorize(payment_id, params)
authorize(String.t(), map()) :: {atom(), any()}

Authorize an order

docs

Possible returns:

  • {:ok, refund}
  • {:error, refund}

Examples

iex> PayPal.Payments.Orders.authorize(order_id, %{

amount: %{
  total: "1.50",
  currency: "USD"
}

})

Link to this function capture(order_id, params)
capture(String.t(), map()) :: {atom(), any()}

Capture an order

docs

Possible returns:

  • {:ok, capture}
  • {:error, refund}

Examples

iex> PayPal.Payments.Orders.capture(order_id, %{

amount: %{
  total: "1.50",
  currency: "USD"
},
is_final_capture: true

})

Link to this function show(order_id)
show(String.t()) :: {atom(), any()}

Show an order

docs

Possible returns:

  • {:ok, order}
  • {:error, reason}

Examples

iex> PayPal.Payments.Orders.show(order_id)

Link to this function void(order_id)
void(String.t()) :: {atom(), any()}

Void an order

docs

Possible returns:

  • {:ok, order}
  • {:error, reason}

Examples

iex> PayPal.Payments.Orders.void(order_id)