<script src="https://secure.na.tnspayments.com/checkout/version/33/checkout.js"
data-error="errorCallback"
data-cancel="cancelCallback">
</script>
<script type="text/javascript">
$(document).ready(function () {
$("#reference").val('@ViewBag.reference');
});
function errorCallback(error) {
console.log(JSON.stringify(error));
}
function cancelCallback() {
console.log('Payment cancelled');
}
Checkout.configure({
merchant: 'TEST1',
order: {
amount: "10",
currency: 'MXN',
description: "Description",
id: "Reference"
},
interaction: {
merchant: {
name: 'Operadora',
address: {
line1: 'Address 1',
line2: 'Address 2'
}
}
}
});
</script>
<div class="container">
<div class="row" style="background-color:#05AED9">
<div style="text-align:center;">
<h2><label style="font-size: 28px !
important;color:white;">@Resources.Resources.LabelPaymentData</label></h2>
</div>
</div>
<div class="row" style="background-color:lightgray;padding-left:5%; padding-right:5%;">
<br />
<div class="form-group">
<label>@Resources.Resources.LabelAmount</label>
<input id="ammount" style="width:100px;" type="text" name="order.amount"
value="0.00" class="form-control">
</div>
<div class="form-group">
<label>@Resources.Resources.LabelDescription</label>
<textarea id="description" style="height: 50px !Important;width: 500px;"
name="transaction.reference" class="form-control"></textarea>
</div>
<div class="form-group">
<label>@Resources.Resources.LabelReference</label>
<input id="reference" style="width:300px;" type="text"
name="order.reference" class="form-control" disabled="disabled">
</div>
<div class="form-group">
<label>@Resources.Resources.LabelEmail</label>
<input style="width:300px;" type="text" name="customer.email" class="form-
control">
</div>
<input class="btn btn-info" type="button" value="@Resources.Resources.NavPayment"
onclick="Checkout.showPaymentPage();" />
<br />
</div>
</div>
When click button call Checkout.showPaymentPage() and this function needs to Checkout.configure().. this answer is how to set input value "ammount" into Checkout.Configure ??? amount: "10" like that amount: $("#ammount").val() .. please adviced i dont have any idea to do this or how to do it in other way.. thans for your help