Loading ...
Sorry, an error occurred while loading the content.
 

Re: [php-objects] Query related to authorized.net

Expand Messages
  • Joe Forsythe
    I assume you re using cUrl over a secure connection to send them stuff? At least got the secure connection part nailed? OK, good. I ve found that Authorize.net
    Message 1 of 5 , Sep 11, 2008
      I assume you're using cUrl over a secure connection to send them
      stuff? At least got the secure connection part nailed?

      OK, good.

      I've found that Authorize.net is pretty solid, so if you're getting
      "incorrect login id or password", it's probably a good guess that
      that is exactly what the problem is.

      What you'll probably find is that anyone doing custom work (which
      this sounds like) is using the AIM method. Can you send us your code?
      (with the UN/PW/merchant ID replaced with #'s or something similar,
      of course)

      Otherwise, you would be best served by searching Google for cUrl
      tutorials as a starting point.
      http://www.johnconde.net/blog/tutorial-integrating-the-authorizenet-
      aim-api-with-php/

      Hmmmm... 5th link on a Google search for "sending information to
      authorize.net via aim"

      As I said, please feel free to send us over some code to troubleshoot.
      --
      Joe

      On Sep 11, 2008, at 12:47 PM, Reji Jayan wrote:

      > Hello all,
      >
      > i am asked this type of question by a friend of mine ... since i
      > dont have any idea about this i am forwarding this here ..
      > expecting fast reply
      >
      >
      >
      > the query is on how to connect to authorize.net
      >
      > there are some methods like AIM and SIM methods in this/.. for
      > doing the payment.its same as paypal..but the coder work is some
      > what different.
      > We need to give login id and transaction key of the owner to
      > connect to the authorize.net for online shopping.
      > where as in pay pal we give the owners email id to connect to paypal.
      >
      > so i need some assistance for connecting to authorize.net
      > please ask for sample code which has successfully connected to the
      > authorize.net
      >
      > and how to give the login id, transaction key..in the source code..
      >
      > i got the sample code from authorize.net but it doesnot connect to
      > the site..its showing error "incorrect login id or password".
      >
      >
      > Reji.
      >
      > Connect with friends all over the world. Get Yahoo! India Messenger
      > athttp://in.messenger.yahoo.com/?wm=n/
      >
      > [Non-text portions of this message have been removed]
      >
      >
      >



      [Non-text portions of this message have been removed]
    • Priyantha Gunawardena
      in OScommerce you can get a complete module for this and you can study the cording in there and how this work regards Priya ... -- Priyantha Gunawardena
      Message 2 of 5 , Sep 11, 2008
        in OScommerce you can get a complete module for this and you can study the
        cording in there and how this work

        regards
        Priya

        On Thu, Sep 11, 2008 at 11:17 PM, Reji Jayan <for_rejijayan@...>wrote:

        > Hello all,
        >
        > i am asked this type of question by a friend of mine ... since i dont have
        > any idea about this i am forwarding this here .. expecting fast reply
        >
        >
        >
        > the query is on how to connect to authorize.net
        >
        > there are some methods like AIM and SIM methods in this/.. for doing the
        > payment.its same as paypal..but the coder work is some what different.
        > We need to give login id and transaction key of the owner to connect to
        > the authorize.net for online shopping.
        > where as in pay pal we give the owners email id to connect to paypal.
        >
        > so i need some assistance for connecting to authorize.net
        > please ask for sample code which has successfully connected to the
        > authorize.net
        >
        > and how to give the login id, transaction key..in the source code..
        >
        > i got the sample code from authorize.net but it doesnot connect to the
        > site..its showing error "incorrect login id or password".
        >
        >
        > Reji.
        >
        > Connect with friends all over the world. Get Yahoo! India Messenger at
        > http://in.messenger.yahoo.com/?wm=n/
        >
        > [Non-text portions of this message have been removed]
        >
        >
        >



        --
        Priyantha Gunawardena
        ______________________________________
        {Web Designer / Developer}
        Tel: +94 038-228-4323
        Mobi: +94 077-393-8516
        Blog: http://www.pgdesigning.com
        IM : pgdesigning


        [Non-text portions of this message have been removed]
      • Udaya kumar
        Hi Reji, The following are the coding for Authorize.Net payment gateway:
        Message 3 of 5 , Sep 11, 2008
          Hi Reji,

          The following are the coding for Authorize.Net payment gateway:

          <?php

          $currencycode = "USD";
          $data = "";
          $response = "";
          $auth_desc = "Some Description";

          $loginid = "some_value from authorize.net";
          $txnkey = "some_value from authorize.net";
          $x_test_request = "FALSE"; // For test transaction

          $post_array = array(
          "x_login" => $loginid
          ,"x_tran_key" => $txnkey
          ,"x_version" => $_POST['x_version']
          ,"x_test_request" => $x_Test_Request
          ,"x_delim_data" => $_POST['x_delim_data']
          ,"x_delim_char" => $_POST['x_delim_char']
          ,"x_cust_id" => $_SESSION['cust_id']
          ,"x_customer_ip" => $_POST['x_customer_ip']
          ,"x_amount" => $_POST['x_amount']
          ,"x_currency_code" => $currencycode
          ,"x_method" => "CC"
          ,"x_type" => $_POST['x_type']
          ,"x_card_num" => $_POST['x_card_num']
          ,"x_card_code" => $_POST['x_card_code']
          ,"x_exp_date" => $_POST['x_exp_date']

          ,"x_first_name" => $_POST['x_first_name']
          ,"x_last_name" => $_POST['x_last_name']
          ,"x_address" => $_POST['x_address']
          ,"x_city" => $_POST['x_city']
          ,"x_state" => $_POST['x_state']
          ,"x_zip" => $_POST['x_zip']
          ,"x_country" => $_POST['x_country']
          ,"x_phone" => $_POST['x_phone']
          ,"x_email" => $_POST['x_email']

          ,"x_ship_to_first_name" => $_POST['x_ship_to_first_name']
          ,"x_ship_to_last_name" => $_POST['x_ship_to_last_name']
          ,"x_ship_to_address" => $_POST['x_ship_to_address']
          ,"x_ship_to_city" => $_POST['x_ship_to_city']
          ,"x_ship_to_state" => $_POST['x_ship_to_state']
          ,"x_ship_to_zip" => $_POST['x_ship_to_zip']
          ,"x_ship_to_country" => $_POST['x_ship_to_country']

          ,"x_invoice_num" => $some_value
          );

          reset($post_array);
          while (list ($key, $val) = each($post_array)) {
          $data .= $key."=".urlencode($val)."&";
          }

          // Test URL
          $AUTHNET_URL = "https://test.authorize.net/gateway/transact.dll";
          // OR Live URL
          $AUTHNET_URL = "https://secure.authorize.net/gateway/transact.dll";

          $ch = curl_init();
          curl_setopt($ch, CURLOPT_URL, $AUTHNET_URL);
          curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
          curl_setopt($ch, CURLOPT_FAILONERROR, 1);
          curl_setopt($ch, CURLOPT_POST, 1);
          curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
          curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
          $response = curl_exec($ch);
          curl_close($ch);

          if (count($response) > 0) {
          $response_array = explode($_POST['x_delim_char'], $response);
          if ($response_array[0] == 1) {
          echo 'Transaction SUCCESS.';
          }
          else if ($response_array[0] == 2) {
          echo 'Transaction DECLINED.';
          }
          else {
          echo 'Transaction ERROR: <b>'.$response_array[3].'</b>';
          }
          }

          ?>

          Try to avoid asking code in the community email mostly. Try to read the payment gateway API manual and integrate using cURL or SOAPClient whatever the manual recommends. However, yuo can get help from the people. The above coding will work definitely with proper test/live txnkey and loginid.

          Bye.

          Thanks & Regards
          Udayakumar Sarangapani
          Sr. PHP Developer
          CompIndia Infotech Pvt. Ltd.
          Chennai.

          "Science is nothing but logic..."




          ----- Original Message ----
          From: Reji Jayan <for_rejijayan@...>
          To: php-objects@yahoogroups.com
          Sent: Thursday, 11 September, 2008 11:17:26 PM
          Subject: [php-objects] Query related to authorized.net


          Hello all,

          i am asked this type of question by a friend of mine ... since i dont have any idea about this i am forwarding this here .. expecting fast reply



          the query is on how to connect to authorize.net

          there are some methods like AIM and SIM methods in this/.. for doing the payment.its same as paypal..but the coder work is some what different.
          We need to give login id and transaction key of the owner to connect to the authorize.net for online shopping.
          where as in pay pal we give the owners email id to connect to paypal.

          so i need some assistance for connecting to authorize.net
          please ask for sample code which has successfully connected to the authorize.net

          and how to give the login id, transaction key..in the source code..

          i got the sample code from authorize.net but it doesnot connect to the site..its showing error "incorrect login id or password".


          Reji.

          Connect with friends all over the world. Get Yahoo! India Messenger at http://in.messenger .yahoo.com/ ?wm=n/

          [Non-text portions of this message have been removed]




          Unlimited freedom, unlimited storage. Get it now, on http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/

          [Non-text portions of this message have been removed]
        Your message has been successfully submitted and would be delivered to recipients shortly.