{"id":288,"date":"2017-11-30T22:31:49","date_gmt":"2017-11-30T22:31:49","guid":{"rendered":"http:\/\/www.evermoretechnologies.com\/blog\/?p=288"},"modified":"2017-11-30T22:31:49","modified_gmt":"2017-11-30T22:31:49","slug":"get-authorize-net-information-from-a-magento-1-database","status":"publish","type":"post","link":"https:\/\/www.evermoretechnologies.com\/blog\/2017\/11\/get-authorize-net-information-from-a-magento-1-database\/","title":{"rendered":"Get Authorize.net information from a Magento 1 database"},"content":{"rendered":"<p>Magento encrypts the sensitive information that it stores in the database.<\/p>\n<p>That&#8217;s great for security, but it means if you need information that only exists as encrypted in the database, it can be hard to get to.<\/p>\n<p>To get the data out of there, you need to have access to the file system that runs the magento store.<\/p>\n<p>Step 1, get the data from the database.\u00a0 It&#8217;s stored in core_config_data.\u00a0 You can get to it through a MySQL CLI or phpmyadmin, Navicat, etc.\u00a0 The below example is to get the authorize.net api login id and transaction key.\u00a0 The same logic will work for any encrypted value in the database.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\">SELECT value FROM core_config_data WHERE path IN (\"payment\/authorizenet\/login\", \"payment\/authorizenet\/trans_key\");<\/pre>\n<p>Then take the values from that and put them into a file.\u00a0 The easiest way is to create a file called decrypt.php and put it at the root of the web server.\u00a0 Place this code in that file, load the page at: http:\/\/www.mystore.com\/decrypt.php and read the values.\u00a0 Then delete the file immediately.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&lt;?php\r\n\r\nrequire_once('app\/Mage.php');\r\nMage::app();\r\n\r\necho 'API Login ID: ' . Mage::helper('core')-&gt;decrypt('login id from database');\r\necho '&lt;br \/&gt;';\r\necho 'API Transaction Key: ' . Mage::helper('core')-&gt;decrypt('transaction key from database');<\/pre>\n<p>Load the page and you&#8217;ll see the values.<\/p>\n<p>Remember to delete the file after you&#8217;re done.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Magento encrypts the sensitive information that it stores in the database. That&#8217;s great for security, but it means if you need information that only exists as encrypted in the database,&#8230; <a href=\"https:\/\/www.evermoretechnologies.com\/blog\/2017\/11\/get-authorize-net-information-from-a-magento-1-database\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[22,37],"tags":[],"_links":{"self":[{"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/288"}],"collection":[{"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/comments?post=288"}],"version-history":[{"count":2,"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/288\/revisions"}],"predecessor-version":[{"id":290,"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/288\/revisions\/290"}],"wp:attachment":[{"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/media?parent=288"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/categories?post=288"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/tags?post=288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}