Stop storing 3DS ID

Stephen Paul Weber created

It can't be used after vault time anyway.

Change summary

lib/three_d_secure_repo.rb | 33 +--------------------------------
1 file changed, 1 insertion(+), 32 deletions(-)

Detailed changes

lib/three_d_secure_repo.rb 🔗

@@ -3,23 +3,7 @@
 class ThreeDSecureRepo
 	class Failed < StandardError; end
 
-	def initialize(redis: REDIS)
-		@redis = redis
-	end
-
-	def find(customer_id, token)
-		redis(:hget, customer_id, token)
-	end
-
-	def put(customer_id, token, authid)
-		if !authid || authid.empty?
-			redis(:hdel, customer_id, token)
-		else
-			redis(:hset, customer_id, token, authid)
-		end
-	end
-
-	def put_from_payment_method(customer_id, method)
+	def put_from_payment_method(_customer_id, method)
 		return unless method.verification # Already vaulted
 
 		three_d = method.verification.three_d_secure_info
@@ -27,20 +11,5 @@ class ThreeDSecureRepo
 		   (three_d.liability_shift_possible && !three_d.liability_shifted)
 			raise Failed, method.token
 		end
-
-		put(
-			customer_id, method.token,
-			three_d.three_d_secure_authentication_id
-		)
-	end
-
-protected
-
-	def redis(action, customer_id, *args)
-		@redis.public_send(
-			action,
-			"jmp_customer_three_d_secure_authentication_id-#{customer_id}",
-			*args
-		)
 	end
 end