Comments (10)
Can you provide some more details?
- What is the full response from AuthNet?
- Can you share the code that is throwing the error with credentials masked?
from authorizesauce.
The error I'm getting is "<urlopen error [Errno 54] Connection reset by peer>"
traceback:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/flask/app.py", line 1836, in call
return self.wsgi_app(environ, start_response)
File "/Library/Python/2.7/site-packages/flask/app.py", line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/Library/Python/2.7/site-packages/flask/app.py", line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
File "/Library/Python/2.7/site-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/Library/Python/2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Library/Python/2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/Library/Python/2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/Library/Python/2.7/site-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functionsrule.endpoint
File "/myfolder/apis.py", line 1768, in api_submit
cc, address=cc_address, email=email).capture(deposit_price)
File "/Library/Python/2.7/site-packages/authorize/client.py", line 131, in capture
amount, self.credit_card, self.address, self.email)
File "/Library/Python/2.7/site-packages/authorize/apis/transaction.py", line 136, in capture
return self._make_call(params)
File "/Library/Python/2.7/site-packages/authorize/apis/transaction.py", line 84, in _make_call
raise AuthorizeConnectionError(e)
AuthorizeConnectionError: <urlopen error [Errno 54] Connection reset by peer>
The code:
client = authorize.AuthorizeClient(
app.config['AUTHORIZE_NET_ACCOUNT'],
app.config['AUTHORIZE_NET_KEY'])
cc = authorize.CreditCard(credit_card_num, validate_year, validate_month,
secure_code, credit_card_holder)
cc_address = authorize.Address(street=street_address,
city=city,
state=state,
zip_code=zip_code)
transaction = client.card(
cc, address=cc_address, email=email).capture(deposit_price)
I keep receiving connection error from the above code, only in sandbox condition, for the production it works fine.
from authorizesauce.
It doesn't look like the client is in sandbox mode. Can you try the following?
client = authorize.AuthorizeClient( app.config['AUTHORIZE_NET_ACCOUNT'], app.config['AUTHORIZE_NET_KEY'], debug=True)
from authorizesauce.
I tried both, with and without <debug=True>, both return the same result
from authorizesauce.
The debug code worked just fine for over an year. The problem suddenly appears when we upgrade authorizeSauce from 4.1 to 5.0.
from authorizesauce.
Can you print "self.url" and "params" before line 79 in "/Library/Python/2.7/site-packages/authorize/apis/transaction.py"? I can try to reproduce the issue.
from authorizesauce.
self.url: https://test.authorize.net/gateway/transact.dll
params: x_login=6f6qM7F3&x_zip=47906&x_card_num=6011000000000012&x_amount=2000.00&x_card_code=321&x_tran_key=3Ln22J6Y4Laa47s7&x_city=West+Lafayette&x_country=US&x_version=3.1&x_state=IN&x_first_name=asd&x_address=210+W+Wood+St%2C+Apt+4&x_exp_date=07-2022&x_email=wongyikfei%40gmail.com&x_delim_data=TRUE&x_delim_char=%3B&x_type=AUTH_CAPTURE&x_test_request=FALSE
from authorizesauce.
I tested this in Python 2.7.13 and Python 3.4.2 with no issues. Here's the response as expected:
1;1;1;This transaction has been approved.;D4YVGJ;Y;40004993314;;;2000.00;CC;auth_capture;;asd;;;210 W Wood St, Apt 4;West Lafayette;IN;47906;US;;;[email protected];;;;;;;;;;;;;;F7EDD54EC4625B881C6F1373E2A0C4F1;P;2;;;;;;;;;;;XXXX0012;Discover;;;;;;;;;;;;;;;;;
Seems like you might have a connection issue with "https://test.authorize.net/". Do you have any manual overrides for this domain?
from authorizesauce.
This may provide some insight:
https://community.developer.authorize.net/t5/Integration-and-Testing/AIM-Transactions-with-Java-SDK-SSL-TLS-issue/td-p/13114
from authorizesauce.
I believe that I did not have any manual overrides for the domain, but I think I start to figure out what's going wrong here.
I'm using Python 2.7.10, it returned the error. But when I tried 2.7.11 in my virtual environment, the code has run successfully. It seems that It might be something related to python version.
EDIT: My windows machine passed the test, but my Mac machine still reporting the same error no matter which version I'm using. So weird... still investigating
from authorizesauce.
Related Issues (20)
- Handle unicode characters in user details HOT 1
- Is the transaction status API supported ? HOT 1
- list index out of range in authorize->apis->transaction.py, line 26 (Parsing response) HOT 3
- from authorize import AuthorizeClient, CreditCard, Address ImportError: cannot import name AuthorizeClient HOT 2
- How to submit phone number and description when capturing card? HOT 3
- 'AuthorizeSavedCard' object has no attribute 'recurring' HOT 1
- Provide email address along with address data HOT 1
- Will these Authorize.NET changes affect this package? HOT 1
- Submitting Invoice Number with Transaction HOT 2
- Authorize.net Technical Updates
- Recurring payments on savedcard HOT 1
- User Authentication Failed HOT 1
- Re: Version of LT that also applies a modifier key #121 HOT 2
- <urlopen error [Errno -2] Name or service not known> HOT 2
- POST requests for transaction calls HOT 8
- Order Information
- Authorize.net error code 66 HOT 8
- Exception: (550, 'Unknown') HOT 10
- Authorize.Net error. E00027: A duplicate transaction has been submitted.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from authorizesauce.