function confirmPurchase(pType) {
$("body").css("cursor", "progress");
if (pType==="BT") {
var vUsing="credit card?";
var vAttrAction="transaction.php";
var vText="Validating your credit card purchase and generating your Personalized Chart.";
} else if (pType==="PP") {
var vUsing="PayPal account?";
var vAttrAction="transaction2.php";
var vText="Validating your data entry and preparing to contact PayPal.";
}
// NOTE: Code that creates the variables "fullName" and "mydate" reside elsewhere.
var vtxt = "You wish to purchase a chart for "+fullName+", born "+mydate+" using your "+vUsing;
var n = noty({
text: vtxt,
type: 'confirm',
dismissQueue: false,
layout: 'center',
theme: 'defaultTheme',
buttons: [
{addClass: 'btn btn-primary', text: 'Yes', onClick: function($noty) {
$noty.close();
noty({text: vText, type: 'success'});
allCaps();
$("#payment-form").attr("action",vAttrAction);
$("#payment-form").submit();
}
},
{addClass: 'btn btn-danger', text: 'Cancel', onClick: function($noty) {
$noty.close();
genNoty('Purchase canceled.','error');
$("body input").css("cursor", "auto");
}
}
]
})
} // End function confirmPurchase()
Any help in figuring this out would be greatly appreciated!!