diff --git a/lib/cybersource_rest_client/utilities/flex/transient_token_utility.rb b/lib/cybersource_rest_client/utilities/flex/transient_token_utility.rb new file mode 100644 index 00000000..59a84478 --- /dev/null +++ b/lib/cybersource_rest_client/utilities/flex/transient_token_utility.rb @@ -0,0 +1,14 @@ +module CyberSource + class TransientTokenUtility + def parseToken(jwt) + split_contents = jwt.split(",") + if split_contents.length > 0 + encoded_string = split_contents[1] + decoded_string = Base64.decode64(unescaped) + transient_token_model = JSON.parse(decoded_string) + end + rescue StandardError => err + puts err.message + end + end +end \ No newline at end of file