Here is my code.
I am stuck trying to figure out how to link up to my payment gateway, and tokenize everything. As well as collect all this info..? Any takers any help much appreciated.
My main problem is just connecting to my gateway.
Bascially just given this guide to figure everything out: http://redfinpos.com/wp-content/uploads/RedFin-Developer-Manual-V.2.07.0415-a.pdf JUST UPDATED CODE to include ajax
<script
src="https://code.jquery.com/jquery-3.1.1.js"
integrity="sha256-16cdPddA6VdVInumRGo6IbivbERE8p7CQR3HzTBuELA="
crossorigin="anonymous"></script>
<script type="text/javascript">
function startPayment(){
var paymentData = {
username : $('#Username').val(),
password : $('#Password').val(),
vendor : $('#Vendor').val(),
customerID: $('#CustomerID').val(),
contractID: $('#ContractID').val(),
billAmt : $('#BillAmt').val(),
taxAmt : $('#TaxAmt').val(),
totalAmt : $('#TotalAmt').val(),
startDate : $('#StartDate').val(),
billingPeriod:$('#BillingPeriod').val(),
billingInterval:$('#BillingInterval').val(),
ccAccountNum:$('#AaAccountNum').val(),
ccExpDate : $('#CcExpDate').val(),
ccNameOnCard:$('#CcNameOnCard').val(),
ccStreet :$('#CcStreet').val(),
ccZip :$('#CcZip').val()
}
$.ajax({
type : "POST",
url : 'http://www.secure.redfinnet.com/admin/ws/recurring.asmx/AddRecurringCreditCard',
data: startPayment,
dataType: "jsonp",
success: function(obj){console.log(obj)}
})
// alert(JSON.stringify(paymentData))
}
</script>
<form>
<table cellspacing="0" cellpadding="4" frame="box" bordercolor="#dcdcdc" rules="none" style="border-collapse: collapse;">
<tbody><tr>
<td class="frmHeader" background="#dcdcdc" style="border-right: 2px solid white;">Recurring Payments</td>
<td class="frmHeader" background="#dcdcdc">Recurring Payments</td>
</tr>
<tr>
<td class="frmText" style="color: #000000; font-weight: normal;">Username:</td>
<td><input class="frmInput" type="text" size="50" id="Username"></td>
</tr>
<tr>
<td class="frmText" style="color: #000000; font-weight: normal;">Password:</td>
<td><input class="frmInput" type="text" size="50" id="Password"></td>
</tr>
<tr>
<td class="frmText" style="color: #000000; font-weight: normal;">Vendor:</td>
<td><input class="frmInput" type="text" size="50" id="Vendor"></td>
</tr>
<tr>
<td class="frmText" style="color: #000000; font-weight: normal;">CustomerID:</td>
<td><input class="frmInput" type="text" size="50" id="CustomerID"></td>
</tr>
<tr>
<td class="frmText" style="color: #000000; font-weight: normal;">ContractID:</td>
<td><input class="frmInput" type="text" size="50" id="ContractID"></td>
</tr>
<tr>
<td class="frmText" style="color: #000000; font-weight: normal;">BillAmt:</td>
<td><input class="frmInput" type="text" size="50" id="BillAmt"></td>
</tr>
<tr>
<td class="frmText" style="color: #000000; font-weight: normal;">TaxAmt:</td>
<td><input class="frmInput" type="text" size="50" id="TaxAmt"></td>
</tr>
<tr>
<td class="frmText" style="color: #000000; font-weight: normal;">TotalAmt:</td>
<td><input class="frmInput" type="text" size="50" id="TotalAmt"></td>
</tr>
<tr>
<td class="frmText" style="color: #000000; font-weight: normal;">StartDate:</td>
<td><input class="frmInput" type="text" size="50" id="StartDate"></td>
</tr>
<tr>
<td class="frmText" style="color: #000000; font-weight: normal;">BillingPeriod:</td>
<td><input class="frmInput" type="text" size="50" id="BillingPeriod"></td>
</tr>
<tr>
<td class="frmText" style="color: #000000; font-weight: normal;">BillingInterval:</td>
<td><input class="frmInput" type="text" size="50" id="BillingInterval"></td>
</tr>
<tr>
<td class="frmText" style="color: #000000; font-weight: normal;">CcAccountNum:</td>
<td><input class="frmInput" type="text" size="50" id="CcAccountNum"></td>
</tr>
<tr>
<td class="frmText" style="color: #000000; font-weight: normal;">CcExpDate:</td>
<td><input class="frmInput" type="text" size="50" id="CcExpDate"></td>
</tr>
<tr>
<td class="frmText" style="color: #000000; font-weight: normal;">CcNameOnCard:</td>
<td><input class="frmInput" type="text" size="50" id="CcNameOnCard"></td>
</tr>
<tr>
<td class="frmText" style="color: #000000; font-weight: normal;">CcStreet:</td>
<td><input class="frmInput" type="text" size="50" id="CcStreet"></td>
</tr>
<tr>
<td class="frmText" style="color: #000000; font-weight: normal;">CcZip:</td>
<td><input class="frmInput" type="text" size="50" id="CcZip"></td>
</tr>
<tr>
<td></td>
<td align="center"> <input type="submit" onClick="startPayment()" value="Submit" class="button"></td>
</tr>
</tbody></table>
</form>
</div>