Forums

Help with Authorize.net

Deacil 15 Jun, 2010
Ok, I have been beating my head against the wall on this and just have given up. I followed several of the posts on this forum and just have not had the luck others have had. Below is the code I have entered in the various spots.

What I am trying to accomplish is for the site to be able to receive a payment/donation. With this form I am able to process transactions with Authroize.net just fine. Also a 3% convenience fee is automatically added based on transaction amount. Everything is perfect.

I need to make a few changes which is where I am having troubles. I need the site to display AFTER the confirmation page [Submit] a receipt like page with the Authorize.net information. Also, I would like for the email that is sent to include the Authorization Status (Approved/Declined) and the transaction number. Lastly, if the transaction is declined then I need for the person NOT TO receive an email.

Like I said, I saw similar posts on the site but I was not able to figure out the implementation or it just did not work for me. If you can either point me to a post or even assist somehow I would greatly appreciate it.

Thank you,
John

Form Code

<div class="form_item">
  <div class="form_element cf_heading">
    <h1 class="cf_text">Form Title</h1>
  </div>
  <div class="cfclear"> </div>
</div>
<div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_heading">
    <h3 class="cf_text">Billing Information</h3>
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">Company Name</label>
    <input class="cf_inputbox" maxlength="150" size="30" title="" id="text_10" name="x_company" type="text" />
  <a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
				<div class="tooltipdiv">Company Name :: Company Name if applicable</div>
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">First Name</label>
    <input class="cf_inputbox required validate-alpha" maxlength="150" size="30" title="" id="text_2" name="x_first_name" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">Last Name</label>
    <input class="cf_inputbox required validate-alpha" maxlength="150" size="30" title="" id="text_9" name="x_last_name" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">Address</label>
    <input class="cf_inputbox required" maxlength="150" size="30" title="" id="text_4" name="x_address" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">City</label>
    <input class="cf_inputbox required" maxlength="150" size="30" title="" id="text_6" name="x_city" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">State</label>
    <input class="cf_inputbox" maxlength="150" size="30" title="" id="text_9" name="x_state" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">Zip</label>
    <input class="cf_inputbox required validate-number" maxlength="150" size="30" title="" id="text_3" name="x_zip" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">Phone #</label>
    <input class="cf_inputbox required" maxlength="150" size="30" title="" id="text_14" name="x_phone" type="text" />
  <a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
				<div class="tooltipdiv">Phone # :: Please use the following format: 623-555-1212</div>
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">Email</label>
    <input class="cf_inputbox required validate-email" maxlength="150" size="30" title="" id="text_12" name="x_email" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_heading">
    <h3 class="cf_text">Payment Information</h3>
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">Card Number</label>
    <input class="cf_inputbox required validate-number" maxlength="150" size="30" title="" id="text_18" name="x_card_num" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_dropdown">
    <label class="cf_label" style="width: 150px;">Expiration Date: Month</label>
    <select class="cf_inputbox" id="select_20" size="1" title=""  name="x_exp_date_m">
    <option value="">Choose Option</option>
      <option value="January">January</option>
<option value="February">February</option>
<option value="March">March</option>
<option value="April">April</option>
<option value="May">May</option>
<option value="June">June</option>
<option value="July">July</option>
<option value="August">August</option>
<option value="September">September</option>
<option value="October">October</option>
<option value="November">November</option>
<option value="December">December</option>

    </select>
    
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_dropdown">
    <label class="cf_label" style="width: 150px;">Expiration Date: Year</label>
    <select class="cf_inputbox" id="select_21" size="1" title=""  name="x_exp_date_y">
    <option value="">Choose Option</option>
      <option value="2010">2010</option>
<option value="2011">2011</option>
<option value="2012">2012</option>
<option value="2013">2013</option>
<option value="2014">2014</option>
<option value="2015">2015</option>
<option value="2016">2016</option>
<option value="2017">2017</option>
<option value="2018">2018</option>
<option value="2019">2019</option>
<option value="2020">2020</option>
<option value="2021">2021</option>
<option value="2022">2022</option>
<option value="2023">2023</option>
<option value="2024">2024</option>
<option value="2025">2025</option>

    </select>
    
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">Amount</label>
    <input class="cf_inputbox required validate-number" maxlength="150" size="30" title="" id="text_19" name="subtotal" type="text" />
  <a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
				<div class="tooltipdiv">Amount :: Please enter an amount using this format: ddd.cc</div>
  </div>
  <div class="cfclear"> </div>
</div>
<input value="" id="x_amount" name="x_amount" type="hidden" />
<input value="" id="response" name="response" type="hidden" />
<input value="" id="approval" name="approval" type="hidden" />
<input value="" id="avs" name="avs" type="hidden" />
<input value="" id="transid" name="transid" type="hidden" />
<div class="form_item">
  <div class="form_element cf_button">
    <input value="Submit" name="button_23" type="submit" /><input type="reset" name="reset" value="Reset"/>
  </div>
  <div class="cfclear"> </div>
</div>


No JavaScript

On Submit code - before sending email:


<?php
$_POST["x_amount"] = $_POST["subtotal"] * 1.03;
?>


On Submit code - after sending email


<p>Thank you for your payment.</p>
<br/>
<p>You will receive an email shortly from -------- with the authorization number.  Please keep this for your records.</p>
<p>If you have any questions please contact a board member or email.</a></p>
<p>Thank you again,</p>
<p>------</p>


Authorize.net Plugin
All fields are lined up.

No Extra Code

Confirmation Page

<?php
$_POST["x_amount"] = $_POST["subtotal"] * 1.03;
?>

<h3>Please confirm your payment.  If you don't confirm the payment will not go through.</h3>
<table border="0">
<tbody>
<tr>
<td style="width: 250px;">Person Payment is for:</td>
<td>{x_description}</td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td colspan="2"><span style="font-size: 14pt;">Contact Information</span></td>
</tr>
<tr>
<td>Company Name</td>
<td>{x_company}</td>
</tr>
<tr>
<td>First Name</td>
<td>{x_first_name}</td>
</tr>
<tr>
<td>Last Name</td>
<td>{x_last_name}</td>
</tr>
<tr>
<td>Phone Number</td>
<td>{x_phone}</td>
</tr>
<tr>
<td>Fax Number</td>
<td>{x_fax}</td>
</tr>
<tr>
<td>Email Address</td>
<td>{x_email}</td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td colspan="2"><span style="font-size: 14pt;">Billing Address</span></td>
</tr>
<tr>
<td>Address</td>
<td>{x_address}</td>
</tr>
<tr>
<td>City</td>
<td>{x_city}</td>
</tr>
<tr>
<td>State</td>
<td>{x_state}</td>
</tr>
<tr>
<td>Zip</td>
<td>{x_zip}</td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td colspan="2"><span style="font-size: 14pt;">Credit Card Information</span></td>
</tr>
<tr>
<td>Credit Card Number</td>
<td>{x_card_num}</td>
</tr>
<tr>
<td>Expiration Date</td>
<td>{x_exp_date_m}/{x_exp_date_y}</td>
</tr>
<tr>
<td>Amount</td>
<td>$<?php echo $_POST['x_amount']; ?></td>
</tr>
</tbody>
</table>
<p> </p>
<p>By pressing the Submit button below you authorize ------------- to charge your credit card for $<?php echo $_POST['x_amount']; ?> to be applied to {x_description}'s account.</p>
<p>Your credit card information is not stored by ------------- in any way and is only used to obtain an Authorization from the financial institution.  If you have any questions please contact a board member or email -------------</a> Please do not contact one of the coaches as they do not have any information about the payments made through the website.</p>
<p>You will receive an email shortly from ------------- with the authorization number.  Please keep this for your records.</p>
<p>Thank you,</p>
<p>-------------</p>


Email 1

<h1>Header<br /></h1>
<table border="0">
<tbody>
<tr>
<td style="width: 250px;">Person Payment is for:</td>
<td>{x_description}</td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td colspan="2"><span style="font-size: 14pt;">Contact Information</span></td>
</tr>
<tr>
<td>Company Name</td>
<td>{x_company}</td>
</tr>
<tr>
<td>First Name</td>
<td>{x_first_name}</td>
</tr>
<tr>
<td>Last Name</td>
<td>{x_last_name}</td>
</tr>
<tr>
<td>Phone Number</td>
<td>{x_phone}</td>
</tr>
<tr>
<td>Fax Number</td>
<td>{x_fax}</td>
</tr>
<tr>
<td>Email Address</td>
<td>{x_email}</td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td colspan="2"><span style="font-size: 14pt;">Billing Address</span></td>
</tr>
<tr>
<td>Address</td>
<td>{x_address}</td>
</tr>
<tr>
<td>City</td>
<td>{x_city}</td>
</tr>
<tr>
<td>State</td>
<td>{x_state}</td>
</tr>
<tr>
<td>Zip</td>
<td>{x_zip}</td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td colspan="2"><span style="font-size: 14pt;">Credit Card Information</span></td>
</tr>
<tr>
<td>Amount</td>
<td>${x_amount}</td>
</tr>
</tbody>
</table>


Email 2

Same as Email 1 with different distribution list.
Max_admin 15 Jun, 2010
Hi John,

Please disable the Confirmation page plugin and make sure the Authorize.net transaction work, you may enable the plugin's debug to see the gateway response

to dynamically turn ON/OFF the email, you should use the variables in the Authorize.net plugin last tab, there is a tutorial here which is doing the same trick but for the paypal plugin, variables names are different:
http://www.chronoengine.com/tutorials/chronoforms-plugins.html

A receipt can be displayed easily through the plugin's after submit code box, you can check the gateway response and display the values based on that

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
harry56 05 Jul, 2010

there is a tutorial here which is doing the same trick but for the paypal plugin, variables names are different:
http://www.chronoengine.com/tutorials/chronoforms-plugins.html



I was having a somewhat similar problem with Paypal. Thanks very much for the link, could not find anything to fix this problem in the search engines. Should have come here first.
Deacil 30 Aug, 2010
Ok, I finally was able to get back to this project and I have to say I am very disapointed. For anyone reading this post and thinking about using this module with Authorize.net please note you are 100% on your own. You will be directed to follow a PayPal implementation from a few years back that really is not relavant to Authorize.net at all.

Max, I am very interested in getting this module that I purchased to work. If you have documentation on how to make this module work, as I outlined above please let me know. A little documentation would be wonderful (NOT PAYPAL DOCS, I DIDN'T PURCHASE PAYPAL).

If anyone else knows of a simple Authorize.net module that allows the user to simply enter an amount please let me know because this is just not working.

John
Deacil 30 Aug, 2010
Sorry for the frustration. I wish I would have done my research better Joom Donation does it all.
This topic is locked and no more replies can be posted.