From fdedfcb0838f1f360b097e5fa4cba30122378987 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 26 Apr 2022 15:02:17 -0500 Subject: [PATCH] Stop storing 3DS ID It can't be used after vault time anyway. --- lib/three_d_secure_repo.rb | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/lib/three_d_secure_repo.rb b/lib/three_d_secure_repo.rb index e66a9dc..c71ebec 100644 --- a/lib/three_d_secure_repo.rb +++ b/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 -- 2.34.2