PayPal.Payments.Captures (pay_pal v0.0.7)

Documentation for PayPal.Payments.Captures

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

Summary

Functions

Refund a captured payment

Show a captured payment

Functions

refund(payment_id, params)

@spec refund(String.t(), map()) ::
  {:ok, map() | :not_found | :no_content | nil}
  | {:error, :unauthorised | :bad_network | any()}

Refund a captured payment

docs

Possible returns:

  • {:ok, refund}

  • {:error, refund}

Examples

iex> PayPal.Payments.Captures.refund(payment_id, %{

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

})

show(capture_id)

@spec show(String.t()) ::
  {:ok, map() | :not_found | :no_content}
  | {:error, :unauthorised | :bad_network | any()}

Show a captured payment

docs

Possible returns:

  • {:ok, capture}

  • {:error, reason}

Examples

iex> PayPal.Payments.Captures.show(capture_id)