PayPal.Payments.Authorizations (pay_pal v0.0.7)
Documentation for PayPal.Payments.Authorizations
https://developer.paypal.com/docs/api/payments/#authorization
Summary
Functions
Capture an authorization
Reauthorize a payment
Show an authorization
Void an authorization
Functions
@spec capture(String.t(), map()) :: {:ok, map() | :not_found | :no_content | nil} | {:error, :unauthorised | :bad_network | any()}
Capture an authorization
Possible returns:
{:ok, capture}
{:error, reason}
Examples
iex> PayPal.Payments.Authorizations.capture(authorization_id, %{
amount: %{
currency: "USD",
amount: "4.54"
},
is_final_capture: true
})
@spec reauthorize(String.t(), map()) :: {:ok, map() | :not_found | :no_content | nil} | {:error, :unauthorised | :bad_network | any()}
Reauthorize a payment
Possible returns:
{:ok, authorization}
{:error, reason}
Examples
iex> PayPal.Payments.Authorizations.capture(authorization_id, %{
amount: %{
currency: "USD",
amount: "4.54"
}
})
@spec show(String.t()) :: {:ok, map() | :not_found | :no_content} | {:error, :unauthorised | :bad_network | any()}
Show an authorization
Possible returns:
{:ok, authorization}
{:error, reason}
Examples
iex> PayPal.Payments.Authorizations.show(authorization_id)
@spec void(String.t()) :: {:ok, map() | :not_found | :no_content | nil} | {:error, :unauthorised | :bad_network | any()}
Void an authorization
Possible returns:
{:ok, authorization}
{:error, reason}
Examples
iex> PayPal.Payments.Authorizations.void(authorization_id)