Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make work with latest stripity stripe #3

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/bankroll/controllers/billing_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ defmodule Bankroll.Controllers.BillingController do

def setup_intent_url(conn, _params) do
{:ok, intent} =
Stripe.Session.create(%{
Stripe.Checkout.Session.create(%{
customer: conn.assigns.customer.stripe_id,
mode: "setup",
success_url: "#{billing_url(conn)}?session_id={CHECKOUT_SESSION_ID}",
Expand Down Expand Up @@ -141,7 +141,8 @@ defmodule Bankroll.Controllers.BillingController do
end

defp handle_checkout_session(conn, session_id) do
result = Stripe.Session.retrieve(session_id, expand: ["setup_intent", "subscription"])
result =
Stripe.Checkout.Session.retrieve(session_id, expand: ["setup_intent", "subscription"])

case result do
{:ok, %{status: "complete", mode: "setup"} = intent} ->
Expand Down
7 changes: 5 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@ defmodule Bankroll.MixProject do
{:ecto_sql, "~> 3.6"},
{:phoenix, "~> 1.7.2"},
{:plug, "~> 1.14"},
{:stripity_stripe, "~> 2.17"},
{:stripity_stripe, github: "beam-community/stripity-stripe", override: true},
{:phoenix_live_view, "~> 0.20"},
{:bling, "~> 0.4.0"}
{:bling,
github: "peaceful-james/bling",
branch: "make-work-with-latest-stripity-stripe",
override: true}
Comment on lines +39 to +42
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably change

]
end
end
Loading