From 192b24a0300a95a541718ee55e657c82bdcffb8f Mon Sep 17 00:00:00 2001 From: Nick Kezhaya Date: Fri, 18 Oct 2019 18:01:34 -0500 Subject: [PATCH] Accept capture_method param --- lib/stripe_mock/api/payment_intent.ex | 1 + .../controllers/payment_intent_controller_test.exs | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/stripe_mock/api/payment_intent.ex b/lib/stripe_mock/api/payment_intent.ex index 35623ff..91512dc 100644 --- a/lib/stripe_mock/api/payment_intent.ex +++ b/lib/stripe_mock/api/payment_intent.ex @@ -26,6 +26,7 @@ defmodule StripeMock.API.PaymentIntent do payment_intent |> cast(attrs, [ :amount, + :capture_method, :confirm, :confirmation_method, :currency, diff --git a/test/stripe_mock_web/controllers/payment_intent_controller_test.exs b/test/stripe_mock_web/controllers/payment_intent_controller_test.exs index bf508bc..f019124 100644 --- a/test/stripe_mock_web/controllers/payment_intent_controller_test.exs +++ b/test/stripe_mock_web/controllers/payment_intent_controller_test.exs @@ -32,6 +32,8 @@ defmodule StripeMockWeb.PaymentIntentControllerTest do assert %{ "id" => id, "amount" => 5000, + "capture_method" => "manual", + "confirmation_method" => "manual", "currency" => "some currency", "customer" => _, "description" => "some description", @@ -119,7 +121,8 @@ defmodule StripeMockWeb.PaymentIntentControllerTest do def create_attrs() do %{ amount: 5000, - capture: true, + capture_method: "manual", + confirmation_method: "manual", currency: "some currency", description: "some description", metadata: %{},