Skip to content
bkeating edited this page Feb 28, 2012 · 1 revision

There are several ways to go about integrating Authorize.net. We're starting off with documenting the Server Integration Method.

Server Integration Method (SIM)

CURRENT, LARGEST BLOCKER: Without using a JS MD5 library to generate the hash (x_login^x_fp_sequence^x_fp_timestamp^x_amount^) which is insecure (Your transaction key is cited to generate the hash), Im not sure how else you can generate x_fp_hash without some sort of server-side processing. I'd like to think I can avoid this... any ideas?

simpleCart(js) v3 has several payment methods: PayPal, GoogleCheckout, AmazonPayments and SendForm. In order to checkout with Authorize.net, we use the SendForm which can be set like so;

<script type="text/javascript">
    simpleCart({
        // how simpleCart should checkout, see the checkout reference for more info 
        checkout: { 
                type: "SendForm" , 
                // url: "https://secure.authorize.net/gateway/transact.dll", // Production URL
                url: "https://test.authorize.net/gateway/transact.dll", // Test URL
                method: "POST",
                extra_data: {
                    x_login: "XXXXXXXXXX",
                    x_type: "AUTH_CAPTURE",
                    x_amount: "75.00",
                    x_show_form: "PAYMENT_FORM",
                    x_relay_response: "FALSE",
                    x_delim_data: "FALSE",
                    x_fp_hash: "7cc964c6edeaac5b7adcc1243923d5c3",
                    x_fp_sequence: "123",
                    //x_fp_timestamp: "1330129015",
                    x_show_form: "PAYMENT_FORM",
                    x_test_request: "TRUE", 
                },
            },
    })
</script>

SendForm submits your cart data as either GET or POST to a URL of your choice.

From the Authorize.net SIM guide:

The merchant's Web site should post transaction requests by means of an HTML Form POST to the following payment gateway URL: https://secure.authorize.net/gateway/transact.dll

You need to pass a particular set of variables in POST to the URL. These variables are defined here: http://developer.authorize.net/guides/SIM/Submitting_Transactions/Requesting_the_Secure_Hosted_Payment_Form.htm