SwedbankpayCheckout.Client.Psp.PaymentOrders (swedbankpay_checkout v0.2.0) View Source
payment order methods, require a Tesla.Env.client()
, see SwedbankpayCheckout.create_client/4
.
Link to this section Summary
Functions
Perform a cancellation, takes as input the response from SwedbankpayCheckout.Client.Psp.PaymentOrders.get_payment_order/2
, and the actual request body.
Perform a capture, takes as input the response from SwedbankpayCheckout.Client.Psp.PaymentOrders.get_payment_order/2
, and the actual request body.
Create a payment order, for displaying the payment menu view.
Get a payment order, the payment_order_id should be the full id, with paths, not truncated to the UUID
Perform a reversal, takes as input the response from SwedbankpayCheckout.Client.Psp.PaymentOrders.get_payment_order/2
, and the actual request body.
Link to this section Functions
Specs
cancel_payment_order( Tesla.Env.client(), SwedbankpayCheckout.Client.Psp.PaymentOrders.OrderResponse.t(), SwedbankpayCheckout.Client.Psp.PaymentOrders.CancelRequest.t() ) :: {:ok, SwedbankpayCheckout.Client.Psp.PaymentOrders.CancelResponse.t()} | {:error, Tesla.Env.t()} | {:error, {String.t(), Tesla.Env.t()}}
Perform a cancellation, takes as input the response from SwedbankpayCheckout.Client.Psp.PaymentOrders.get_payment_order/2
, and the actual request body.
Swedbank does no recommend assuming any structure for these urls, as such we require the both the operations and payment_order fields of PaymentOrders.PostResponse.t()
This function will return an error if the action is invalid, for example if :capture is called on a payment type that isn't two-step (Vipps or Swish) or if the action to operation translation in this function is out of date
Specs
capture_payment_order( Tesla.Env.client(), SwedbankpayCheckout.Client.Psp.PaymentOrders.OrderResponse.t(), SwedbankpayCheckout.Client.Psp.PaymentOrders.CaptureRequest.t() ) :: {:ok, SwedbankpayCheckout.Client.Psp.PaymentOrders.CaptureResponse.t()} | {:error, Tesla.Env.t()} | {:error, {String.t(), Tesla.Env.t()}}
Perform a capture, takes as input the response from SwedbankpayCheckout.Client.Psp.PaymentOrders.get_payment_order/2
, and the actual request body.
Swedbank does no recommend assuming any structure for these urls, as such we require the both the operations and payment_order fields of PaymentOrders.PostResponse.t()
This function will return an error if the action is invalid, for example if :capture is called on a payment type that isn't two-step (Vipps or Swish) or if the action to operation translation in this function is out of date
Specs
create_payment_order( Tesla.Env.client(), SwedbankpayCheckout.Client.Psp.PaymentOrders.PostRequest.t() ) :: {:ok, SwedbankpayCheckout.Client.Psp.PaymentOrders.OrderResponse.t()} | {:error, Tesla.Env.t()} | {:error, {String.t(), Tesla.Env.t()}}
Create a payment order, for displaying the payment menu view.
Specs
get_payment_order(Tesla.Env.client(), String.t()) :: {:ok, SwedbankpayCheckout.Client.Psp.PaymentOrders.OrderResponse.t()} | {:error, Tesla.Env.t()} | {:error, {String.t(), Tesla.Env.t()}}
Get a payment order, the payment_order_id should be the full id, with paths, not truncated to the UUID
Specs
reverse_payment_order( Tesla.Env.client(), SwedbankpayCheckout.Client.Psp.PaymentOrders.OrderResponse.t(), SwedbankpayCheckout.Client.Psp.PaymentOrders.ReverseRequest.t() ) :: {:ok, SwedbankpayCheckout.Client.Psp.PaymentOrders.ReverseResponse.t()} | {:error, Tesla.Env.t()} | {:error, {String.t(), Tesla.Env.t()}}
Perform a reversal, takes as input the response from SwedbankpayCheckout.Client.Psp.PaymentOrders.get_payment_order/2
, and the actual request body.
Swedbank does no recommend assuming any structure for these urls, as such we require the both the operations and payment_order fields of PaymentOrders.PostResponse.t()
This function will return an error if the action is invalid, for example if :capture is called on a payment type that isn't two-step (Vipps or Swish) or if the action to operation translation in this function is out of date