Integrating Authorize.net’s AIM isn’t difficult but does require a little PHP knowledge and some understanding of how expression engine tags and such.
The first step is creating a simple function in PHP that returns a Credit Card styled form. This template must Allow PHP and be set to parse on Output.
<?php
function formShow(){
{exp:member:custom_profile_data}
// Slice Screen Name into First / Last Name
$firstlast = '{screen_name}';
$name = explode(" ", $firstlast);
$firstN = $name[0]; // First
$lastN = $name[1]; // Last
if(sizeof($name) >2){
$lastN .= ' '.$name[2];
}
echo '<form id="pay_now" method="post" action="?&payment=1" >';
Because we’ve called the custom_profile_data information we can use the current user’s logged in info to populate a form including any custom fields.
I added custom fields for address, city, state, zip to store the information but also to pass that information to this form.
// Using the sliced name...
echo '<label>First Name</label><input type="text" name="f_name" value="'.$firstN.'" class="input" maxlength="100" size="40" style="width:100%;" /><br />';
User variables in form fields...
echo '<label>Address</label><input type="text" name="address" value="{address}" class="input" maxlength="100" size="40" style="width:100%;" /><br /><br />';
Once you’ve got your form setup… More coming…
