File: /home/imensosw/www/imenso.co/dev/prc/pay-noti.html
<!doctype html>
<html lang="en-US" >
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<title>Patient Portal</title>
<link rel='stylesheet' href='css/bootstrap.min.css' media='all' />
<link rel='stylesheet' href='css/style-2.css' media='all' />
<link rel='stylesheet' href='css/responsive.css' media='all' />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" media="all">
<script src="js/jquery.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="https://jstest.authorize.net/v1/Accept.js" charset="utf-8"> </script>
<!-- <script src="js/popover.js"></script> -->
<script src="js/jquery.creditCardValidator.js"></script>
<script>
$(function(){
$("#includedContent").load("sidebar.html");
$('#card_number').validateCreditCard(function(result) {
$(".card_pay").attr("class","form-control card_pay "+result.card_type.name);
});
});
</script>
</head>
<body style="background: #F0F4F7;">
<div class="container-fluid">
<div id="includedContent"></div>
<div class="right right_panel animate dashboard">
<div class="m-5">
<div class="container-fluid">
<div class="row make_payment mb-5">
<div class="col-md-12">
<div class="form-wrapper">
<form class="lined-form">
<div class="steps" id="step-3">
<div class="row justify-content-md-center">
<div class="col-xl-10">
<div class="row">
<div class="col-md-12">
<div class="receipt receipt1 b-r-4">
<div class="p-3 pt-5 pb-5">
<div class="text-center">
<div class="text-center mb-3 border alert alert-primary">
<p class="mb-0">If Patient Requests terms outside of these, <span class="text-uppercase font-weight-bold">Disposition As: Reserch. </span></p>
<span> If the patient Complains.. oh well</span>
</div>
<p class="h6 px-5 my-4 font-weight-bold">A Payment Plan was created on 12/15/2020 @ 2:25 PM 5 Monthly Payments at $130.31 The 1st payment will be submitted on 01/02/2021 with credit card ending in 9875. </p>
<p class="text-theme h5 mb-5 font-weight-bold">Notification will be sent to <span class="text-dark">{Email}</span> & <span class="text-dark">{Phone Numebr}</span></p>
<div class="mt-4">
<a href="pay-plan.html" type="button" class="btn-login btn mb-2">Payment Plan Dashboard</a>
<!-- <a class="btn-dark2 btn mb-2" data-toggle="modal" data-target=".bd-example-modal-sm">Disposition Call</a> -->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var step=1;
var amount=10;
var payment_status=false;
$( ".login" ).click(function() {
$(this).addClass('btn-primary');
$(this).removeClass('btn-flat');
$('.pay-bill').removeClass('btn-primary');
$('.pay-bill').addClass('btn-flat');
$('.login-fields').show();
$('.pay-bill-fields').hide();
});
$( ".login-first a" ).click(function() {
$('.login-fields').show();
$('.pay-bill-fields').hide();
$('.login-first').hide();
$('.d-pay-bill').show();
});
$( ".d-pay-bill a" ).click(function() {
$('.login-fields').hide();
$('.pay-bill-fields').show();
$('.login-first').show();
$('.d-pay-bill').hide();
});
$( ".pay-bill" ).click(function() {
$(this).addClass('btn-primary');
$(this).removeClass('btn-flat');
$('.login').removeClass('btn-primary');
$('.login').addClass('btn-flat');
$('.login-fields').hide();
$('.pay-bill-fields').show();
});
$( ".register" ).click(function() {
$('#form-1').hide();
$('.slogan-2').hide();
$('#form-2').show();
$('.reg-ben').hide();
$('.reg-cta').show();
});
//data-cnt="step-2"
$( ".next_step" ).click(function() {
if(step==2)
{
return false;
}
next_step();
});
function next_step()
{
if(step==2)
{
if(payment_status==false)
{
return false;
}
}
step++;
data="step-"+step;
$(".steps").hide();
$("#"+data).fadeIn();
$("."+data).addClass("active");
$("."+data).removeAttr("data_txt");
if(data == 'step-3')
{
$(".step").addClass("cursor_default");
}
}
/*$( ".next_step1" ).click(function() {
var data=$(this).attr("data-cnt");
$(".steps").hide();
$("#"+data).fadeIn();
$("."+data).addClass("active");
$("."+data).removeAttr("data_txt");
if(data == 'step-3')
{
$(".step").addClass("cursor_default");
}
});*/
$(document).ready(function(){
$('.radio_container input[type="radio"]').click(function(){
var inputValue = $(this).attr("value");
var targetBox = $("#" + inputValue);
$(".payment_options").not(targetBox).hide();
$(targetBox).fadeIn();
});
$('.where_find').click(function(){
$(this).find("img").toggleClass("d-none d-block");
});
});
$('#progressbar li').click(function()
{
if( $('.step-3').hasClass('active') )
{
return false ;
}
if( $(this).attr("data_txt") != 'isDisabled' )
{
var data='step-'+$(this).attr("step_no");
$(".steps").hide();
$("#"+data).fadeIn();
$("."+data).addClass("active");
$("."+data).removeAttr("data_txt");
}
});
function sendPaymentDataToAnet() {
var authData = {};
authData.clientKey = "796rVn7yYJ7a5pTZus32u7U5M4kxzcTVHBFYSHcA8qj5L65Y9B3pc3wY4H336QyH";
authData.apiLoginID = "376BHsqVW";
var cardData = {};
cardData.cardNumber = document.getElementById("card_number").value;
cardData.month = document.getElementById("expMonth").value;
cardData.year = document.getElementById("expYear").value;
cardData.cardCode = document.getElementById("cardCode").value;
// If using banking information instead of card information,
// build a bankData object instead of a cardData object.
//
// var bankData = {};
// bankData.accountNumber = document.getElementById('accountNumber').value;
// bankData.routingNumber = document.getElementById('routingNumber').value;
// bankData.nameOnAccount = document.getElementById('nameOnAccount').value;
// bankData.accountType = document.getElementById('accountType').value;
var secureData = {};
secureData.authData = authData;
secureData.cardData = cardData;
// If using banking information instead of card information,
// send the bankData object instead of the cardData object.
//
// secureData.bankData = bankData;
Accept.dispatchData(secureData, responseHandler);
function responseHandler(response) {
if (response.messages.resultCode === "Error") {
var i = 0;
while (i < response.messages.message.length) {
// console.log(response.messages.message[i].text);
if(response.messages.message[i].code=="E_WC_05")
{
document.getElementById("err_cardNumber").textContent=response.messages.message[i].text;
}
if(response.messages.message[i].code=="E_WC_06")
{
document.getElementById("err_expMonth").textContent=response.messages.message[i].text;
}
// if(response.messages.message[i].code=="E_WC_07")
// {
// document.getElementById("err_expYear").textContent=response.messages.message[i].text;
// }
if(response.messages.message[i].code=="E_WC_15")
{
document.getElementById("err_cardCode").textContent=response.messages.message[i].text;
}
i = i + 1;
}
} else {
callTransactionProcessor(response.opaqueData);
}
}
}
// function paymentFormUpdate(opaqueData) {
// payment_status=true;
// next_step();
// document.getElementById("dataDescriptor").value = opaqueData.dataDescriptor;
// document.getElementById("dataValue").value = opaqueData.dataValue;
// // If using your own form to collect the sensitive data from the customer,
// // blank out the fields before submitting them to your server.
// document.getElementById("card_number").value = "";
// document.getElementById("expMonth").value = "";
// document.getElementById("expYear").value = "";
// document.getElementById("cardCode").value = "";
// /*document.getElementById("accountNumber").value = "";
// document.getElementById("routingNumber").value = "";
// document.getElementById("nameOnAccount").value = "";
// document.getElementById("accountType").value = "";*/
// document.getElementById("paymentForm").submit();
// }
// Using query.js, do an AJAX call to a separate URL on the site to do the actual transaction processing.
function callTransactionProcessor(responseData) {
$.ajax({
url: "https://dev.imenso.co/payment/authorize/process.php",
data: {amount: amount, dataDesc: responseData.dataDescriptor, dataValue: responseData.dataValue},
method: "POST",
timeout: 5000
}).done(function(data){
console.log("Success");
}).fail(function(){
console.log("Error");
}).always(function(textStatus){
console.log(textStatus);
messageFunc(textStatus);
})
}
// The result of the transaction processing will be returned from the processing script as a JSON object. Parse the object to determine success or failure, and alert the user.
function messageFunc(returnMsg)
{
try{
responseObj=JSON.parse(returnMsg);
if(responseObj.status==true){
message="Transaction Successful! - Transaction ID: "+responseObj.MessageCode;
payment_status=true;
$('.transaction_code').html(responseObj.AuthCode);
next_step();
}
else{
message="Transaction Failed";
message+=responseObj.ErrorMessage;
alert(message);
}
}
catch(error){
console.log("Couldn't parse result string");
message="Error.";
alert(message);
}
}
</script>
<div class="modal fade bd-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
<div class="modal-dialog modal-md">
<div class="modal-content">
<div class="modal-body text-center px-5">
<img class="mb-4 mt-2" width="80" src="images/tick.png" >
<h3 class="font-weight-bold h5 mb-2">Call Successfully Dispositioned </h3>
</div>
<div class="modal-footer flex-wrap">
<a href="dashboard.html" type="button" class="btn btn-login mb-2">Ok</a>
</div>
</div>
</div>
</div>
</body>
</html>