<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Python SDK Returns Null For All Queries in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Python-SDK-Returns-Null-For-All-Queries/m-p/59356#M33948</link>
    <description>&lt;P&gt;Yes I'm on a mac.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to&amp;nbsp;get a newer OpenSSL installation separate from the system's.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's a complete hack, but it works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;</description>
    <pubDate>Sat, 12 Aug 2017 18:34:00 GMT</pubDate>
    <dc:creator>normana10</dc:creator>
    <dc:date>2017-08-12T18:34:00Z</dc:date>
    <item>
      <title>Python SDK Returns Null For All Queries</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Python-SDK-Returns-Null-For-All-Queries/m-p/59288#M33883</link>
      <description>&lt;P&gt;So I just created a sandbox account and got my API ID and KEY&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I went to the following link and followed it's instrucitons:&amp;nbsp;&lt;A href="https://developer.authorize.net/hello_world/" target="_blank"&gt;https://developer.authorize.net/hello_world/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I installed the python SDK module with:&lt;/P&gt;&lt;PRE&gt;pip install authorizenet&lt;/PRE&gt;&lt;P&gt;Then ran the code given verbatim, changing my API ID and KEY of course&lt;/P&gt;&lt;PRE&gt;from authorizenet import apicontractsv1
from authorizenet.apicontrollers import*
from decimal import*
 
merchantAuth = apicontractsv1.merchantAuthenticationType()
merchantAuth.name ='REPLACED WITH MY ID'
merchantAuth.transactionKey ='REPLACED WITH MY KEY'
 
creditCard = apicontractsv1.creditCardType()
creditCard.cardNumber ="4111111111111111"
creditCard.expirationDate ="2020-12"
 
payment = apicontractsv1.paymentType()
payment.creditCard = creditCard
 
transactionrequest = apicontractsv1.transactionRequestType()
transactionrequest.transactionType ="authCaptureTransaction"
transactionrequest.amount = Decimal ('1.55')
transactionrequest.payment = payment
 
 
createtransactionrequest = apicontractsv1.createTransactionRequest()
createtransactionrequest.merchantAuthentication = merchantAuth
createtransactionrequest.refId ="MerchantID-0001"
 
createtransactionrequest.transactionRequest = transactionrequest
createtransactioncontroller = createTransactionController(createtransactionrequest)
createtransactioncontroller.execute()
 
response = createtransactioncontroller.getresponse()
 
if (response.messages.resultCode=="Ok"):
       print"Transaction ID : %s"% response.transactionResponse.transId
else:
       print"response code: %s"% response.messages.resultCode&lt;/PRE&gt;&lt;P&gt;But&amp;nbsp;the error I get is:&lt;/P&gt;&lt;PRE&gt;     if (response.messages.resultCode=="Ok"):
AttributeError: 'NoneType' object has no attribute 'messages'&lt;/PRE&gt;&lt;P&gt;This happens no matter what I try to query. Like if I try to get a list of all unsettled transactions, the&amp;nbsp;Library returns Null.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2017 00:33:20 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Python-SDK-Returns-Null-For-All-Queries/m-p/59288#M33883</guid>
      <dc:creator>normana10</dc:creator>
      <dc:date>2017-08-10T00:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: Python SDK Returns Null For All Queries</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Python-SDK-Returns-Null-For-All-Queries/m-p/59292#M33887</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/22151"&gt;@normana10&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What version of Python are you running?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2017 01:19:22 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Python-SDK-Returns-Null-For-All-Queries/m-p/59292#M33887</guid>
      <dc:creator>Aaron</dc:creator>
      <dc:date>2017-08-10T01:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: Python SDK Returns Null For All Queries</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Python-SDK-Returns-Null-For-All-Queries/m-p/59293#M33888</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Python 2.7.10&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2017 01:45:35 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Python-SDK-Returns-Null-For-All-Queries/m-p/59293#M33888</guid>
      <dc:creator>normana10</dc:creator>
      <dc:date>2017-08-10T01:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: Python SDK Returns Null For All Queries</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Python-SDK-Returns-Null-For-All-Queries/m-p/59294#M33889</link>
      <description>&lt;P&gt;Can you also find out what version of the SSL library (like OpenSSL) that you're using?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suspect your setup doesn't support TLS 1.2, which is required for communication with our sandbox environment, but we can tell for sure with a couple of more tests.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For starters, check the openSSL version:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;import ssl
ssl.OPENSSL_VERSION&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then actually do a test to a site that will tell you what version of TLS you can connect with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;import json, urllib2
print json.load(urllib2.urlopen('https://www.howsmyssl.com/a/check'))['tls_version']"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2017 02:03:49 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Python-SDK-Returns-Null-For-All-Queries/m-p/59294#M33889</guid>
      <dc:creator>Aaron</dc:creator>
      <dc:date>2017-08-10T02:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: Python SDK Returns Null For All Queries</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Python-SDK-Returns-Null-For-All-Queries/m-p/59295#M33890</link>
      <description>&lt;P&gt;I see&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's&amp;nbsp;my OpenSSL Version:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;OpenSSL 0.9.8zh 14 Jan 2016&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And here's what I get from howsmyssl:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;TLS 1.0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2017 02:14:02 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Python-SDK-Returns-Null-For-All-Queries/m-p/59295#M33890</guid>
      <dc:creator>normana10</dc:creator>
      <dc:date>2017-08-10T02:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: Python SDK Returns Null For All Queries</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Python-SDK-Returns-Null-For-All-Queries/m-p/59297#M33892</link>
      <description>&lt;P&gt;You'll definitely need to upgrade that OpenSSL version to be able to connect to our system. In case you weren't aware, PCI-DSS requirements specify that no card transactions use older TLS implementations after next summer. Our sandbox already requires TLS 1.2, and our production systems will require it in February 2018.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From reading that python and OpenSSL version, I'm guessing MacOS X? If so, Apple still ships this old insecure version of OpenSSL, but doesn't update it because some of their components are still linked to it, and newer versions of OpenSSL aren't API&amp;nbsp;compatible. You could try upgrading the system supplied binary in /usr/bin directly, but you'd have to deal with SIP and possibly breaking other components. You're better off leaving it in place and using something like &lt;A href="https://community.developer.cybersource.com/brew.sh" target="_self"&gt;Homebrew&lt;/A&gt; to install a newer version (and install a newer Python too to link to the newer version).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're not on MacOS X, you'll find similar instructions elsewhere on the net. As crypto libraries evolve and weaknesses are found, every programmer who deals with internet applications will hit this same or similar situation at some point. We call out this exact thing on the readme for &lt;A href="https://github.com/AuthorizeNet/sdk-python" target="_self"&gt;our Python SDK&lt;/A&gt;, but the "Hello World" page has you installing the SDK without necessarily seeing that.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2017 03:48:29 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Python-SDK-Returns-Null-For-All-Queries/m-p/59297#M33892</guid>
      <dc:creator>Aaron</dc:creator>
      <dc:date>2017-08-10T03:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: Python SDK Returns Null For All Queries</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Python-SDK-Returns-Null-For-All-Queries/m-p/59356#M33948</link>
      <description>&lt;P&gt;Yes I'm on a mac.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to&amp;nbsp;get a newer OpenSSL installation separate from the system's.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's a complete hack, but it works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;</description>
      <pubDate>Sat, 12 Aug 2017 18:34:00 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Python-SDK-Returns-Null-For-All-Queries/m-p/59356#M33948</guid>
      <dc:creator>normana10</dc:creator>
      <dc:date>2017-08-12T18:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: Python SDK Returns Null For All Queries</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Python-SDK-Returns-Null-For-All-Queries/m-p/59359#M33951</link>
      <description>&lt;P&gt;Just for future reference, I'm also on a Mac and am developing in a virtualenv. I got around the problem with this tip:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/31811949/pip-install-requestssecurity-vs-pip-install-requests-difference" target="_blank"&gt;https://stackoverflow.com/questions/31811949/pip-install-requestssecurity-vs-pip-install-requests-difference&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;More specificially, I got the authorize.net python library to work &lt;EM&gt;in my code&amp;nbsp;&lt;/EM&gt;by upgrading requests with the the security argument:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;pip install requests[security]&lt;/PRE&gt;</description>
      <pubDate>Sun, 13 Aug 2017 00:40:35 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Python-SDK-Returns-Null-For-All-Queries/m-p/59359#M33951</guid>
      <dc:creator>leehinde</dc:creator>
      <dc:date>2017-08-13T00:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: Python SDK Returns Null For All Queries</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Python-SDK-Returns-Null-For-All-Queries/m-p/64175#M38144</link>
      <description>&lt;P&gt;I am facing the issue as above. I sent amount, customer profile and the invoice&amp;nbsp;and while I am getting the response it shows an error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;if transaction_response is not None:&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp;if transaction_response.transactionResponse.transId&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;and&amp;nbsp;transaction_response.transactionResponse.transId is not "0" and not&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;hasattr(transaction_response.transactionResponse, 'errors') == True:&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;&lt;SPAN class="s1"&gt;AttributeError: 'exceptions.Exception' object has no attribute 'transactionResponse'&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;This happens only for one customer profile while others are passing through. PLEASE HELP!!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 09:39:42 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Python-SDK-Returns-Null-For-All-Queries/m-p/64175#M38144</guid>
      <dc:creator>Ankit29</dc:creator>
      <dc:date>2018-08-14T09:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Python SDK Returns Null For All Queries</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Python-SDK-Returns-Null-For-All-Queries/m-p/64195#M38161</link>
      <description>&lt;P&gt;Just got the solution. When the amount that is sent to Authorize&amp;nbsp;via API call has decimals, it has to be in string format.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the weird&amp;nbsp;thing is that if you give an amount $291.5 or $291.0 in number format, it passes through and does not have any issues. But when the amount has decimals other than .0 and .5, you have to send the request with the amount in string format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;FONT face="Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols" size="3" color="black"&gt;&lt;SPAN&gt;Example:&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;UL&gt;&lt;LI&gt;Amount billed&amp;nbsp;= 291.5 (Number format) --&amp;gt; Transaction Successful&lt;/LI&gt;&lt;LI&gt;Amount billed&amp;nbsp;= 291.0 (Number format) --&amp;gt; Transaction Successful&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;Amount billed&amp;nbsp;= 291.6 (Number format) --&amp;gt; Transaction Failed&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;Amount billed = 291.6 (String Format)&amp;nbsp; --&amp;gt;&amp;nbsp; Transaction Successful&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was making an API call for a particular&amp;nbsp;customer profile which had $291.6 to be billed. The API call was not None but it had a string with error message "&lt;FONT face="Menlo" size="1"&gt;&lt;SPAN&gt;type {&lt;A href="http://www.w3.org/2001/XMLSchema}decimal" target="_blank"&gt;http://www.w3.org/2001/XMLSchema}decimal&lt;/A&gt; cannot be created from&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;FONT face="Menlo" size="1"&gt;&lt;SPAN&gt;&amp;nbsp;291.6&lt;/SPAN&gt;&lt;/FONT&gt;". The response handling that I had, was not handling this type of error as it was so unexpected and I thought Authorize will handle the decimals. But when I changed the amount format to string it worked and the system was getting the response back from Authorize.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But on a serious note Authorize should handle such type of errors which does not make any sense and not the users.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2018 06:45:27 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Python-SDK-Returns-Null-For-All-Queries/m-p/64195#M38161</guid>
      <dc:creator>Ankit29</dc:creator>
      <dc:date>2018-08-16T06:45:27Z</dc:date>
    </item>
  </channel>
</rss>

