pay_pal v0.0.2 PayPal.Payments.Orders

Documentation for PayPal.Payments.Orders

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

Summary

Functions

Authorize an order

Capture an order

Show an order

Void an order

Functions

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"
}

})

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

})

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)

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)