|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Authorize.net AIM connection
Another post here got me interested in the new AIM connection method, so I tried some of my old code on it and none seems to work. Either that or my curl setup has a problem.
Has anyone else connected using the AIM method yet? Code snippets would help me see the error of my ways.
__________________
The Dude I'm the Dude. So that's what you call me. That, or Duder, His Dudeness, Or El Duderino. If, you know, you're not into the whole brevity thing |
|
#2
|
|||
|
|||
|
Since there's quite a bit of code, I posted it here:
http://dev.dave.imarc.net/examples/authorizenet.phps Things to note: - Take advantage of Authorizenet's Test Mode, by setting $test_mode to true - You'll have to change all the user entered variables to work with your credit card form. - Edit the post-authorization calls (right now they're calling methods specific to my shopping cart, then forwarding the user to a 'Thanks' page) - I know that PHP can be compiled with Curl support, but I found it easier to call curl from the command line - exec(/usr/local/bin/curl...) - you may need to change the path to curl. good luck |
|
#3
|
|||
|
|||
|
Some of the snippets I have are similar to that, but I'm not sure that they work with the new AIM method. They used to work with the ADC direct, but now it doesn't seem to be connecting.
I looked through the docs and it doesn't appear that things have changed all that much. hmmm |
|
#4
|
|||
|
|||
|
it still works on my site...
|
|
#5
|
|||
|
|||
|
Well, I'll keep plugging away
thanks for the help |
|
#6
|
|||
|
|||
|
Dave,
Are you sure your code is working properly? I get parse errors when I run it. Even after removing the portions that talk to your cart. Most are connected to the nested if statements. This slight mod works, but only gives the error message: We're sorry, but your credit card.... PHP Code:
|
|
#7
|
|||
|
|||
|
Are you sure that there wasn't anything else in your code causing the parse errors? This page is the exact same page as my original source-code example (except with the '.php' extenstion, insead of '.phps'):
http://dev.dave.imarc.net/examples/authorizenet.php Since the Authorizenet login and password ("x_Login" / "x_Password") are both invalid (currently set to 'xxxxxxx'), I'm getting the appropriate error from authorizenet. The bold text 'The merchant login ID..." is echoed back directly from Authorizenet's resonse ($response_array[4]). I'm getting the same response when I use your code - http://dev.dave.imarc.net/examples/dude.php which also gets the proper error (since in your code, the login/password are blank) Do you have a autorizenet account, if so make sure that you use your login/password in step #2 ( // [2] Seed Data Array For POSTING) |
|
#8
|
|||
|
|||
|
Yes, I have an account and the right info was seeded. The only error I got was what I wrote above. I didn't even get the other stuff, that you got on your site, i.e. all the response stuff.
I did get several parse errors with yours, but I worked through them. Mostly they were from bracket errors. I'm beginning to suspect something is going on with my curl installation (actually my hosts curl install). I know the path is valid (I physically went in and found the curl file), so something else must be going on. Last edited by thedude : December 7th, 2002 at 01:11 PM. |
|
#9
|
|||
|
|||
|
Hi
I found this topic and tried to work with your code. However - I am very new to PHP and all that stuff and have a problem. I am setting the variables of my order form to match the ones from your code. However - the CC expiration date are 2 variables and your code shows only one. How can I convert this? Here's the code from my order form: PHP Code:
Any chance that you can post your orderform maybe? Thanks! Demel |
|
#10
|
|||
|
|||
|
I am making some progress with this script.
Question: PHP Code:
How do I set this if I would take the script live (or do I comment out this line completely)? Demel |
|
#11
|
|||
|