module Workarea decorate Payment::StoreCreditCard, with: :checkoutdotcom do def perform! return true if @credit_card.token.present? response = handle_active_merchant_errors do gateway.verify(@credit_card.to_active_merchant, email: @credit_card.profile.email) end if response.success? @credit_card.token = response.params["source"]["id"] end response.success? end end end