in reply to Interfacing to Authorize.Net

Just for fun, instead of printing the fields directly in the if($debug), try calling Data::Dumper to show what is actually in %form_data as that is what gets sent via post_https.

Also, is there a way you can contact their server unencrypted? If so, you could send the test data and use a tool like ethereal (win32 or *nix) or tcpdump to see what is actually going over the wire.

HTH, --traveler

Replies are listed 'Best First'.
Re: Re: Interfacing to Authorize.Net
by THRAK (Monk) on Nov 09, 2001 at 00:27 UTC
    I don't believe you can access AuthNet unencrypted. If so, I don't know how and they don't seem to publicize it. Tried Data::Dumper as you suggested:

    $VAR1 = 'x_Login=testdrive&x_Version=3.0&x_ADC_Delim_Data=TRUE&x_ADC_U +RL=FALSE&x_Test_Request=TRUE&x_Type=AUTH_ONLY&x_Method=CC&x_First_Nam +e=John&x_Last_Name=Doe&x_Amount=1&x_Card_Num=4222222222222&x_Exp_Date +=1102'; $VAR2 = undef;
    I would guess that $VAR2 = undef might be part of the problem.

    -THRAK
    www.polarlava.com
      What did your call to Dumper look like? Did you send anything besides %form_data? If not, it looks as though make_form is not really very special...

      --traveler

        Just did basic print Dumper(%form_data); Doing some reading in the Ram (cook)book on hashes so I tried it again, but this time with instead of %form_data = make_data, I just had %form_data = ( ...
        That dumps:

        $VAR1 = 'x_ADC_URL'; $VAR2 = 'FALSE'; $VAR3 = 'x_Exp_Date'; $VAR4 = '1 +102'; $VAR5 = 'x_Card_Num'; $VAR6 = '4222222222222'; $VAR7 = 'x_Versi +on'; $VAR8 = '3.0'; $VAR9 = 'x_Method'; $VAR10 = 'CC'; $VAR11 = 'x_AD +C_Delim_Data'; $VAR12 = 'TRUE'; $VAR13 = 'x_Amount'; $VAR14 = '1'; $V +AR15 = 'x_Login'; $VAR16 = 'bigjoes'; $VAR17 = 'x_Last_Name'; $VAR18 += 'Doe'; $VAR19 = 'x_First_Name'; $VAR20 = 'John'; $VAR21 = 'x_Type'; + $VAR22 = 'AUTH_ONLY'; $VAR23 = 'x_Test_Request'; $VAR24 = 'TRUE';
        Not sure what the make_form of Net::SSLeay does, and the documentation isn't the greatest. Trudging onward...

        -THRAK
        www.polarlava.com