From 77a3649e500b6804b5cc84c3c5fe286d9764048d Mon Sep 17 00:00:00 2001 From: Andy Brett Date: Fri, 12 Feb 2021 13:41:35 -0800 Subject: [PATCH] documentation --- app/services/process_payment_intent.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/services/process_payment_intent.rb b/app/services/process_payment_intent.rb index 218d1eeff3..5c5085cb55 100644 --- a/app/services/process_payment_intent.rb +++ b/app/services/process_payment_intent.rb @@ -1,5 +1,13 @@ # frozen_string_literal: true +# When directing a customer to Stripe to authorize the payment, we specify a +# redirect_url that Stripe should return them to. When checking out, it's +# /checkout; for admin payments and subscription payemnts it's the order url. +# This class confirms that the payment intent matches what's in our database, +# marks the payment as complete, and removes the cvv_response_message field, +# which we use to indicate that authorization is required. It also completes the +# Order, if appropriate. + class ProcessPaymentIntent def initialize(payment_intent, order) @payment_intent = payment_intent