Category Archives: authorize.net

Python Authorizenet Test Payment not working on web browsers

I want to perform a test authorize.net transaction using Python CGI. In the command prompt output, transaction was successfully charged. Output as Transaction ID: XXXXXXXX. But when browsing domain.com/cgi-bin/upgrade.cgi, the server responded an Internal Server Error - 500. This has to work. I'm using Apache 2.4.20 and Python 2.7 on Windows 10 32-bit. It only works in command prompt and not on the browser.

upgrade.cgi

#!"C:\MyServer\python\python.exe"

from authorizenet import apicontractsv1
from authorizenet.apicontrollers import*
from decimal import*

merchantAuth = apicontractsv1.merchantAuthenticationType()
merchantAuth.name ='xxxxxxx'
merchantAuth.transactionKey ='xxxxxxx'

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

anetsdk.log

2016-06-01 08:50:47,532 performing custom validation..
2016-06-01 08:50:47,533 Executing http post to url: https://apitest.authorize.net/xml/v1/request.api
2016-06-01 08:50:47,533 building request..
2016-06-01 08:50:47,565 Starting new HTTPS connection (1): apitest.authorize.net
2016-06-01 08:50:50,369 "POST /xml/v1/request.api HTTP/1.1" 200 922
2016-06-01 08:50:50,403 Create Document Exception: <class 'pyxb.exceptions_.UnrecognizedContentError'>, (<authorizenet.apicontractsv1.transactionResponse object at 0x0269B670>, <pyxb.binding.content.AutomatonConfiguration object at 0x0269B6F0>, u'Visa', pyxb.utils.utility.Location(None, 1, 722))

Is it a server error or a code bug? Could anyone help me fix this issue. Thanks in advance.

Python Authorizenet Sandbox Payment not working

I want to perform a test authorize.net transaction using Python CGI. In the command prompt output, transaction was successfully charged. Output as Transaction ID: XXXXXXXX. But when browsing domain.com/cgi-bin/upgrade.cgi, the server responded an Internal Server Error - 500. This has to work. I'm using Apache 2.4.20 and Python 2.7 on Windows 10 32-bit.

upgrade.cgi

#!"C:\MyServer\python\python.exe"

from authorizenet import apicontractsv1
from authorizenet.apicontrollers import*
from decimal import*

merchantAuth = apicontractsv1.merchantAuthenticationType()
merchantAuth.name ='xxxxxxx'
merchantAuth.transactionKey ='xxxxxxx'

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

anetsdk.log

2016-06-01 08:50:47,532 performing custom validation..
2016-06-01 08:50:47,533 Executing http post to url: https://apitest.authorize.net/xml/v1/request.api
2016-06-01 08:50:47,533 building request..
2016-06-01 08:50:47,565 Starting new HTTPS connection (1): apitest.authorize.net
2016-06-01 08:50:50,369 "POST /xml/v1/request.api HTTP/1.1" 200 922
2016-06-01 08:50:50,403 Create Document Exception: <class 'pyxb.exceptions_.UnrecognizedContentError'>, (<authorizenet.apicontractsv1.transactionResponse object at 0x0269B670>, <pyxb.binding.content.AutomatonConfiguration object at 0x0269B6F0>, u'Visa', pyxb.utils.utility.Location(None, 1, 722))

Is it a server error or a code bug? Could anyone help me fix this issue. Thanks in advance.

Python Authorizenet Sandbox Payment not working

I want to perform a test authorize.net transaction using Python CGI. In the command prompt output, transaction was successfully charged. Output as Transaction ID: XXXXXXXX. But when browsing domain.com/cgi-bin/upgrade.cgi, the server responded an Internal Server Error - 500. This has to work. I'm using Apache 2.4.20 and Python 2.7 on Windows 10 32-bit.

upgrade.cgi

#!"C:\MyServer\python\python.exe"

from authorizenet import apicontractsv1
from authorizenet.apicontrollers import*
from decimal import*

merchantAuth = apicontractsv1.merchantAuthenticationType()
merchantAuth.name ='xxxxxxx'
merchantAuth.transactionKey ='xxxxxxx'

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

anetsdk.log

2016-06-01 08:50:47,532 performing custom validation..
2016-06-01 08:50:47,533 Executing http post to url: https://apitest.authorize.net/xml/v1/request.api
2016-06-01 08:50:47,533 building request..
2016-06-01 08:50:47,565 Starting new HTTPS connection (1): apitest.authorize.net
2016-06-01 08:50:50,369 "POST /xml/v1/request.api HTTP/1.1" 200 922
2016-06-01 08:50:50,403 Create Document Exception: <class 'pyxb.exceptions_.UnrecognizedContentError'>, (<authorizenet.apicontractsv1.transactionResponse object at 0x0269B670>, <pyxb.binding.content.AutomatonConfiguration object at 0x0269B6F0>, u'Visa', pyxb.utils.utility.Location(None, 1, 722))

Is it a server error or a code bug? Could anyone help me fix this issue. Thanks in advance.

How should I proceed with upgrading to TLS 1.2?

We got this email from Authorize.NET about some technical updates. I am trying to figure out what needs to be done, but my skills are lacking in this area and I could use some help. They had four main points in their email:

  1. After the update is complete on September 21st, any website or payment solution that connects via api.authorize.net that cannot validate SHA-2 signed certificates will fail to connect to Authorize.Net's servers.

    Our server uses SHA-1, but we have a GoDaddy Certificate Installed that uses SHA-2.

  2. In October of this year, due to system updates, it will be possible to receive Authorize.Net IDs (Transaction ID, Batch ID, etc.) that are not in sequential order.

    I don't think this one will affect us.

  3. As you may already be aware, new PCI DSS requirements state that all payment systems must disable TLS 1.0 by June 30, 2016. To ensure that we are compliant ahead of that date, we will be disabling TLS 1.0 first in the sandbox environment and then in our production environments. Both dates are still to be determined, but please make sure your solutions are prepared for this change as soon as possible.

I know we will need to upgrade OpenSSL on our server. This is what we currently have...

Current     Version          Recommended       Depends On
TLS         1.0              1.2    
OpenSSL     0.9.8h           1.0.1  
PHP         5.2.6            5.6               Open SSL 1.0.1
Apache      2.2.10           2.4    
Linux OS    SUSE Enterprise  SUSE Enterprise 
             Server 11        Server 12 
Drupal      6.9              7.39              Mysql 5.0.15/PHP 5.4
MySQL       5.0.67           5.6               SUSE Enterprise Server 12 (x86_64)
phpMyAdmin  3.3.3            4.4.14.1          PHP 5.3.7/MySQL 5.5

Authorize.net payment gateway is not working with ssl

I am facing issues with my website to work with authorize.net due to ssl issues. Authorize.net suggested me to upgrade my ssl to sha2 version and i purchased a new ssl from godaddy but issue is still there. Both godaddy and authorize.team just blames each other and my site is still not usable. Can some one please have a look into this and suggest me what causing the issue ? I have checked the website in many online sha checker tools and everyone says it is sha2 sha online check but I can see some warning in firefox saying that this site make use of sha1. firebug warning I have attached the certificate information from chrome and firefox as well for you. firefox certificate information chrome1 chrome certificate information

When I checked using openssl command,

[email protected] [~]# openssl s_client -connect www.****.com:443 < /dev/null 2>/dev/null | openssl x509 -text -in /dev/stdin | grep "Signature Algorithm"
    Signature Algorithm: sha256WithRSAEncryption
    Signature Algorithm: sha256WithRSAEncryption

I am not sure what causing the site to show sha1 signature to authorize.net and the sha1 error in firefox- firebug console warning list while other online tools shows that the site is using sha2. Please let me know if any additional information required.