File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,11 +49,14 @@ defmodule Accrue.Checkout.LocalSession do
4949 status price_id
5050 ] a
5151
52+ @ processors [ "braintree" ]
53+
5254 @ spec changeset ( t ( ) , map ( ) ) :: Ecto.Changeset . t ( )
5355 def changeset ( session , attrs \\ % { } ) do
5456 session
5557 |> cast ( attrs , @ cast_fields )
5658 |> validate_required ( @ required_fields )
59+ |> validate_inclusion ( :processor , @ processors , message: "must be braintree" )
5760 |> foreign_key_constraint ( :customer_id )
5861 |> unique_constraint ( :session_token )
5962 |> unique_constraint ( :operation_id )
Original file line number Diff line number Diff line change @@ -167,8 +167,10 @@ defmodule Accrue.Config do
167167 type: { :or , [ :string , nil ] } ,
168168 default: nil ,
169169 doc:
170- "Optional absolute base URL (for example `https://app.example.com`) " <>
171- "required for returned local portal checkout and billing-portal URLs."
170+ "Absolute base URL (for example `https://app.example.com`) used to " <>
171+ "generate returned local portal checkout and billing-portal URLs. " <>
172+ "Leave unset only when those local portal URLs are not in use; " <>
173+ "`portal_url/1` raises instead of falling back to a relative path."
172174 ] ,
173175 braintree_client_token_generator: [
174176 type: :atom ,
You can’t perform that action at this time.
0 commit comments