"Card number required" response from Authorize.net even when memcached properly configured

41 views
Skip to first unread message

Rob Speed

unread,
Mar 28, 2013, 7:12:19 PM3/28/13
to satchm...@googlegroups.com
I've had this working for months on four different development servers, but now that I'm setting it up in production with memcached I'm seeing this:

INFO (Extra logging) Capturing payment on order #14
INFO (Extra logging) Capturing payment for Order #14:
INFO (Extra logging) Using test connection.
INFO (Extra logging) standard charges configuration: {'x_login': u'[deleted even though it's not a real account]', 'x_version': '3.1', 'x_delim_char': '|', 'x_method': 'CC', 'x_type': 'AUTH_CAPTURE', 'x_delim_data': 'TRUE', 'x_relay_response': 'FALSE', 'x_tran_key': u'[deleted even though it's not a real account]', 'x_test_request': 'FALSE'}
INFO (Extra logging) standard charges configuration: {'x_city': u'Anytown', 'x_address': u'123 Any Street', 'x_country': u'US', 'x_state': u'MD', 'x_first_name': u'', 'x_last_name': u'', 'x_zip': u'20817', 'x_email': u'speed.rob...@gmail.com', 'x_phone': u'1234567890'}
INFO (Extra logging) standard charges transactionData: {'x_exp_date': '1/2014', 'x_card_num': u'1111', 'x_amount': Decimal('205'), 'x_card_code': 'REDACTED', 'x_invoice_num': '14_4_test_032813_404533'}
INFO About to send a request to authorize.net: https://test.authorize.net/gateway/transact.dll
x_login=[deleted even though it's not a real account]&x_version=3.1&x_delim_char=%7C&x_method=CC&x_type=AUTH_CAPTURE&x_delim_data=TRUE&x_relay_response=FALSE&x_tran_key=[deleted even though it's not a real account]&x_test_request=FALSE&x_exp_date=1%2F2014&x_card_num=1111&x_amount=205&x_card_code=REDACTED&x_invoice_num=14_4_test_032813_404533&x_city=Anytown&x_address=123+Any+Street&x_country=US&x_state=MD&x_first_name=&x_last_name=&x_zip=20817&x_email=speed.rob%2Btest1038%40gmail.com&x_phone=1234567890
INFO (Extra logging) Authorize response: 3|2|33|Credit card number is required.||P|0|14_4_test_032813_404||205.00|CC|auth_capture|||||123 Any Street|Anytown|MD|20817|US|1234567890||speed.rob...@gmail.com||||123 Any Street|Anytown|MD|20817|US||||||DBC10C13887CEA489BB3B54334A3569A||||||||||||||||||||||||||||||

I can successfully set and read values via the django cache API (and I've confirmed that it's using Memcache). What's even more strange is "x_card_num=1111", which is correct (that's the last 4 digits of the card number). I have no idea why Authorize.net isn't getting the card number. Can anyone shed some light on this?

Rob Speed

unread,
Mar 29, 2013, 12:11:39 AM3/29/13
to satchm...@googlegroups.com
Adding a bit more info.

Satchmo: 0.9.2
Django: 1.4.5
Python: 2.7.3
python-memcached: 1.48

Here's my test to make sure the cache is working:

$ manage.py shell
>>> from django.core.cache import cache
>>> from time import sleep
>>> def test():
...   cache.set('does_this_work', 'Yes it does!')
...   sleep(60 * 4)
...   print(cache.get('does_this_work'))
...
>>> test() 
Yes it does!

My next step is to figure out what they key for the stored number is, then decrypting the value and seeing what happens. If that doesn't turn anything up I'll be completely lost.

Mike Hostetler

unread,
Mar 29, 2013, 9:47:10 AM3/29/13
to satchm...@googlegroups.com

I'm away from my serves now so I can't tell you exactly how to fix this, but I did run into it. I think you also have to configure cache the "old way" for Satchmo to pick it up. Look at the Django 1.2 docs on caching.

Let me know if it works. If not, I'll look at my setup when I get a chance to get to my server.

--
You received this message because you are subscribed to the Google Groups "Satchmo users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to satchmo-user...@googlegroups.com.
To post to this group, send email to satchm...@googlegroups.com.
Visit this group at http://groups.google.com/group/satchmo-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Rob Speed

unread,
Mar 29, 2013, 3:53:53 PM3/29/13
to satchm...@googlegroups.com
That was a good suggestion, but it didn't work.

I looked at payment.models.CreditCardDetail, which is what actually sets and retrieves the cached card number, and I'm kinda stuck. I haven't dug this deep into the payment module before, so I was surprised to find that it uses a library called django-keyedcache. Can anyone explain why satchmo doesn't just use django.core.cache?

Chris Moffitt

unread,
Mar 29, 2013, 4:03:24 PM3/29/13
to satchm...@googlegroups.com
Back in the day, Django's cache was rudimentary and wouldn't support some of our needs. That's why Bruce created an updated cache tool to simplify life. I'm not 100% sure what the gaps are with the latest Django cache. There may be opportunities to consolidate but I honestly haven't looked at it in a long time to see what the work would be.

Thanks,
Chris

Rob Speed

unread,
Mar 29, 2013, 4:57:17 PM3/29/13
to satchm...@googlegroups.com
Okay. I've been making a list of ideas for push enhancement proposals, so I'll put that on there. In the meantime, I need to figure out what's causing this problem.

Sasha

unread,
Apr 24, 2013, 10:21:10 AM4/24/13
to satchm...@googlegroups.com
I have recently started having this same problem. Did you ever find a resolution?
Reply all
Reply to author
Forward
0 new messages