Auth.Net (plug-in) two values

Set a dynamic amount for Authorize.Net payments in ChronoForms.

Overview

The issue occurs when the payment amount needs to be calculated from one or two form fields, but directly listing field names in the plugin configuration causes an error.
Use a Custom Code action before the Authorize.Net action to calculate the total and assign it to a specific data array variable, then reference that variable name in the plugin's amount field setting.

Answered
we webmasterancilla 28 Aug, 2014
I'm entering Customer's Amount Field In the Fields dialog box.
The value could come from one of 2 input fields or both of them depending on how the customer fills out the form.

I put this in the box, but it threw an error:

input_select_14, input_text_16

Is there an easy way to make this work?
Max_admin Max_admin 17 Sep, 2014
Answer
Hi,

Sorry for the delay!

This is not going to work, you need to add the amount to the $form data array using a "Custom code" action before the "auth.net" action:

<?php
$form->data["amount_field"] = 99; // or combine 2 fields values..etc

where "amount_field" is the field name used in the amount field name box in auth.net config

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.