PaperTiger.MandateHelper (PaperTiger v1.1.2)

Copy Markdown View Source

Builds and stores Mandate objects for successful intent flows.

Summary

Functions

Ensures a PaymentIntent has a stored Mandate when its payment method requires one.

Ensures a SetupIntent has a stored Mandate when its payment method requires one.

Functions

ensure_for_payment_intent(payment_intent, payment_method, params \\ %{})

@spec ensure_for_payment_intent(map(), map() | nil, map()) :: {:ok, String.t() | nil}

Ensures a PaymentIntent has a stored Mandate when its payment method requires one.

ensure_for_setup_intent(setup_intent, payment_method, params \\ %{})

@spec ensure_for_setup_intent(map(), map(), map()) :: {:ok, String.t() | nil}

Ensures a SetupIntent has a stored Mandate when its payment method requires one.