Jump to content

smokinguns

Members
  • Content count

    14
  • Joined

  • Last visited

Posts posted by smokinguns


  1. This isn't really an add on, although when i get it working, i could make an add on out of it, but i posted it here thinking this is the group with the most OSCommerce development experience. I process orders through authorize.net. They send an authorization code back in the response to confirm the order. It is required for my orders to get filled that i have this authorization number. I created an extra field in the orders table to store the authorization number. My thinking is there will be 1 authorization number per order, so i can store it in this field for the order it corresponds to. Then i will have it for filling the orders.

     

    I have successfully parsed through the authorize.net response to locate the authorization number. I have even been able to store it in a seperate text file successfully. The problem i have is how do i take this authorization number, which is found in authorizenet_cc_aim.php, and insert it into the authorization_number field i created in the orders table in the database for the current order?

     

    What i really need to know is how to insert any extra fields into the orders table of the database. I don't know if i could read the authorization code from the file i store it in and then insert that into the orders table? Or if i can take it right from the response and add it to the orders table right away, i don't know how i would find the orders_id corresponding to the current order.

     

    Thanks in advance for any help.

    Carl

     

    This is what I have done. I register a session variable called 'authorization_code' and reference this variable in checkout_process.php to store the authorization code in the DB. At the end of the file I unregister the session variable.

     

    Here are the changes I made. In authorizenet_aim.php go to the following condition:

    // If the response code is not 1 (approved) then redirect back to the payment page with the appropriate error message
    if ($this->response[0] != '1') {
    // some code
    }
    // Add an else statement
    else{
    $_SESSION["authorization_code"]=$this->response[4];
    }
    

     

    Then in checkout_process.php, add the foll statement in the $sql_data_array:

    'authorization_code' => $_SESSION['authorization_code']
    // add the following statement where all sesssion variables are being unregistered. You will find them at the end of the file
    unset($_SESSION['authorization_code']);
    

     

    I hope it helps. Inputs are welcome


  2. Hey all,

    I have enabled SEO Urls in the admin section and the URL Type is set to "Rewrite". I noticed that when I click on the "Add to cart" button for some of the products , the url breaks and "page cant be found" message is displayed, although the item does show up in the shopping cart. I viewed the source of the page and saw that the form tag wraps to the next line like this

     <form name="cart_quantity" action="http://mydomain.com/product-demo
    -p-718.html?action=add_product" method="post">

    It doesnt happen everytime, but only for some products. Has anybody encountered this before? I tried adding the 'nowrap' attribute to the td tag that contains the form, but to no avail.

    This is the code

    print '<td width="100%" valign="top" nowrap>'. tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')).';
    print '</td>';


  3. I have integrated the AIM module in oscommerce in TEST MODE. My request gets sent to the authorize.net service and the transaction is approved, but the page gets stuck with the foll response:

     

    |1|||1|||1|||(TESTMODE) This transaction has been approved..|||000000|||P|||0|||||||||20.62|||CC......

     

    The url of the page that displays the response is "https://secure.authorize.net/gateway/transact.dll"

    'x_relay_response' is set to false, as AIM uses direct response not relay response . Why is the page not redirected to the checkout_process.php page??


  4. Problem solved. The quotes were accurate. I tried all combinations on UPS quote calculator and for one combination the quote was exactly the same. I confirmed the shipping options with the merchant and they said that were not selecting an option on UPS website and thats why the quote discrepancy


  5. Im facing the same problem and I have the same settings:

     

    UPS Pickup Method - RDP (Daily Pickup)

    UPS Packaging - CP (Your Packaging)

    UPS Residential Delivery - RES (Residential)

     

    The quote returned for a 2.9 pound item(tare weight included) was 8.43(including handling charge) where as UPS website gave 9.14 as the quote. The destination zip code is not a rural area. This problem has cropped up recently. Ne solutions to this yet??


  6. The quote returned by sending a request to UPS is less than the one on their website. Here is the request that gets sent

     

    accept_UPS_license_agreement=yes&10_action=3&13_product=GNDRES&14_origCountry=US&15_origPostal=55343

    &19_destPostal=55345&22_destCountry=US&23_weight=2.9&47_rate_chart=Regular+Daily+Pickup&48_container=00&49_residential=1

     

    The quote returned is 6.93 and if i add a handling charge of 1.5, it becomes 8.43

     

    On entering the same options on their website I get a quote of 9.14. What gives??

×