What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.

  • Profile Image

    Authorize.net "The merchant login ID or password is invalid or the account is inactive."

    Asked by biiainsurance on January 27, 2014 at 11:36 AM

    I am getting this message however I am trying the same ID and Key that I am using on a different active form that works with no problem (form not created with JotForm)

    Pasted code used in basic form as maybe it works differently from JotForm .....


    if (($_POST['sendpayment']) == "pay") {
    // This sample code requires the mhash library for PHP versions older than
    // 5.1.2 - http://hmhash.sourceforge.net/

    // the parameters for the payment can be configured here
    // the API Login ID and Transaction Key must be replaced with valid values
    $loginID        = "xxxxxREMOVEDxxxxxx";
    $transactionKey = "xxxxxREMOVEDxxxxxx";
    $description     = "Website Bill Payment";
    $label             = "Submit Payment";   // The is the label on the 'submit' button
    $testMode        = "false";
    // By default, this sample code is designed to post to our test server for
    // developer accounts: https://test.authorize.net/gateway/transact.dll
    // for real accounts (even in test mode), please make sure that you are
    // posting to: https://secure.authorize.net/gateway/transact.dll
    $url = "https://secure.authorize.net/gateway/transact.dll";

    // If an amount or description were posted to this page, the defaults are overidden
    if ($_REQUEST["amount"])
    { $amount = $_REQUEST["amount"]; }
    if ($_REQUEST["invoice"])
    { $invoice = $_REQUEST["invoice"]; }

    // an invoice is generated using the date and time
    //$invoice    = date(YmdHis);
    // a sequence number is randomly generated
    $sequence    = rand(1, 1000);
    // a timestamp is generated
    $timeStamp    = time ();

    // The following lines generate the SIM fingerprint.  PHP versions 5.1.2 and
    // newer have the necessary hmac function built in.  For older versions, it
    // will try to use the mhash library.
    if( phpversion() >= '5.1.2' )
    {    $fingerprint = hash_hmac("md5", $loginID . "^" . $sequence . "^" . $timeStamp . "^" . $amount . "^", $transactionKey); }
    { $fingerprint = bin2hex(mhash(MHASH_MD5, $loginID . "^" . $sequence . "^" . $timeStamp . "^" . $amount . "^", $transactionKey)); }

    // Print the Amount and Description to the screen.
    echo "Policy Number: $invoice <br />";
    echo "Amount Paid: $ $amount <br /><br /><br />";
    // Create the HTML form containing necessary SIM post values
    echo "<FORM method='post' action='$url' >";
    // Additional fields can be added here as outlined in the SIM integration guide
    // at: http://developer.authorize.net
    //echo "    <INPUT type='text' name='x_amount' />";
    //echo "    <INPUT type='text' name='x_invoice_num' />";

    echo "    <INPUT type='hidden' name='x_login' value='$loginID' />";
    echo "    <INPUT type='hidden' name='x_type' value='AUTH_ONLY' />";
    echo "    <INPUT type='hidden' name='x_amount' value='$amount' />";
    echo "    <INPUT type='hidden' name='x_description' value='$description' />";
    echo "    <INPUT type='hidden' name='x_invoice_num' value='$invoice' />";
    echo "    <INPUT type='hidden' name='x_fp_sequence' value='$sequence' />";
    echo "    <INPUT type='hidden' name='x_fp_timestamp' value='$timeStamp' />";
    echo "    <INPUT type='hidden' name='x_fp_hash' value='$fingerprint' />";
    echo "    <INPUT type='hidden' name='x_test_request' value='$testMode' />";
    echo "    <INPUT type='hidden' name='x_show_form' value='PAYMENT_FORM' />";
    echo "    <input type='submit' value='$label' />";
    echo "</FORM>";

    <?php } else { ?>
    You are not authorized to view this page.
    <?php } ?>



  • Profile Image
    JotForm Support

    Answered by EltonCris on January 27, 2014 at 12:07 PM


    Did you check if your authorize.net field is not on the sandbox mode? It seems both of your forms are on a sandbox (test) mode which is maybe the reason why you are getting this error? Your script above indicates that you are testing live not on test mode $testMode = "false";. Make sure to disable sandbox mode before testing your form live.

    Let us know if you have further questions.


  • Profile Image

    Answered by biiainsurance on January 27, 2014 at 12:33 PM

    @Elton, isnt sandbox mode what it should be in to try a "fake" real payment ? 

  • Profile Image

    Answered by biiainsurance on January 27, 2014 at 12:35 PM

    @Elton, I think I understand now. I have the Authorize.net account out of "Test Mode" as we already have an interface that interacts with it in live mode. I assume i would need to switch Authorize.net into test mode again to try sandbox ?

  • Profile Image

    Answered by biiainsurance on January 27, 2014 at 12:36 PM

    @Elton, just switched out of sandbox and put the new id and key in and got this message.


    "This account has not been given the permission(s) required for this request."

  • Profile Image

    Answered by biiainsurance on January 27, 2014 at 12:40 PM

    @Elton ...sorry for being a pain, just trying to do what I can. I have it now to where it says 

    "Bill to Company Required"  

  • Profile Image
    JotForm Support

    Answered by NeilVicente on January 27, 2014 at 12:59 PM

    Try this:

    1. Log in to your Authorize.net account
    2. Go to Account -> Settings -> Payment Form -> Form Field
    3. Uncheck everything that says "required"
    4. Save your account's settings

    Please keep us posted on your progress.

  • Profile Image

    Answered by biiainsurance on January 27, 2014 at 01:40 PM

    Hey, worked like a charm. Thank you!!