PayPal.Payments.Sales (pay_pal v0.0.7)

Documentation for PayPal.Payments.Sales

A sale is a completed payment.

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

Summary

Functions

Refund a sale

Show a sale

Functions

refund(sale_id, params)

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

Refund a sale

docs

Possible returns:

  • {:ok, sale}

  • {:error, refund}

Examples

iex> PayPal.Payments.Sales.refund(sale_id, %{

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

})

show(sale_id)

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

Show a sale

docs

Possible returns:

  • {:ok, sale}

  • {:error, reason}

Examples

iex> PayPal.Payments.Sales.show(sale_id)