This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 4

[closed] Authorize.net Invoice Number


  1. AustinWeb
    Member

    Currently machform generates an invoice number and description based on the form number that was submitted.

    Invoice : 10869-2
    Description : Payment for (Form #10869 - Entry #2)

    Is there a way to have an input field for invoice number and have it submitted to DPM like the payment amount field?
    When customers are paying invoices it would be great to have our invoice number show up in the Authorize.net Invoice Number field.
    Can we change the information that appears in the Description field?
    i.e. example.com Web Payment

    Posted 10 years ago #
  2. yuniar

    You'll need to edit the "payment_submit_authorizenet.php" file for this.
    Search around line 252 and 386 for this block of code:

    'order' => array(
    				                'invoiceNumber' => $form_id.'-'.$payment_record_id,
    				                'description' => $trial_charge_desc,
    				            )

    Simply adjust the above invoice number and description.


    MachForm Founder

    Posted 10 years ago #
  3. AustinWeb
    Member

    how can I get that section in payment_submit_authorize.net.php to insert {element_1}, the field in my form that has the Invoice number?
    Or better yet, how do I add an invoice number field to the payment information page and have that submitted to Authorize.net?

    Posted 10 years ago #
  4. yuniar

    You'll need to get the value of {element_1} first for that. Around line 39, you should see this line:

    $dbh = mf_connect_db();

    below that line, you can add this block of code:

    $template_data = mf_get_template_variables($dbh,$form_id,$payment_record_id);
    
    $template_variables = $template_data['variables'];
    $template_values    = $template_data['values'];
    
    $element_1_value = str_replace($template_variables,$template_values,'{element_1}');

    this way, you'll be able to use $element_1_value to any code below that point.

    In this case, you can use it like this:

    'order' => array(
    'invoiceNumber' => $form_id.'-'.$element_1_value,
    'description' => $trial_charge_desc,
    )

    MachForm Founder

    Posted 10 years ago #
  5. AustinWeb
    Member

    You are FANTASTIC!

    Posted 10 years ago #
  6. AustinWeb
    Member

    Unfortunately after extensive testing and error checking this solution doesn't work.
    It generates an error that simply shows "unknown error, contact tech support".
    I've restored the original coding so we could accept payments again.

    Thanks for a product that helped us get started. We will have to start searching again for a software solution that will submit information properly to Authorize.net. MachForm only submits partial information which is an astounding inconvenience when handling dozens of daily transactions.

    MachForm has the potential to be a really fantastic solution but it isn't designed to make use of the form fields already established in the Authorize.net DPM form. Thank you for an excellent temporary solution that we had running in less than 15 minutes. It is truly sad we cannot continue to use MachForm.

    Why can't MachForm make those fields available at the time of data entry and then submit them properly to Authorize.net?
    Why can't MachForm pass critical data to Authorize.net like the customer entered invoice number, customer ID and name on the shipping address?

    http://www.appnitro.com/forums/topic/authorizenet-payment-information-page

    Posted 10 years ago #
  7. yuniar

    I see that we have two thread with similar subject, let's continue to the other thread to avoid confusion.
    http://www.appnitro.com/forums/topic/authorizenet-payment-information-page?replies=6


    MachForm Founder

    Posted 10 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.