v1.0.0
This commit is contained in:
Executable
+44
@@ -0,0 +1,44 @@
|
||||
<form id="payment-form" action="{{ action }}" method="post">
|
||||
<input type="hidden" name="MNT_ID" value="{{ MNT_ID }}"/>
|
||||
<input type="hidden" name="MNT_TRANSACTION_ID" value="{{ MNT_TRANSACTION_ID }}"/>
|
||||
<input type="hidden" name="MNT_AMOUNT" value="{{ MNT_AMOUNT }}"/>
|
||||
<input type="hidden" name="MNT_CURRENCY_CODE" value="{{ MNT_CURRENCY_CODE }}"/>
|
||||
<input type="hidden" name="MNT_TEST_MODE" value="{{ MNT_TEST_MODE }}"/>
|
||||
<input type="hidden" name="MNT_DESCRIPTION" value="{{ MNT_DESCRIPTION }}"/>
|
||||
<input type="hidden" name="MNT_SUBSCRIBER_ID" value="{{ MNT_SUBSCRIBER_ID }}"/>
|
||||
<input type="hidden" name="MNT_SIGNATURE" value="{{ MNT_SIGNATURE }}"/>
|
||||
<input type="hidden" name="MNT_SUCCESS_URL" value="{{ MNT_SUCCESS_URL }}"/>
|
||||
<input type="hidden" name="MNT_FAIL_URL" value="{{ MNT_FAIL_URL }}"/>
|
||||
<input type="hidden" name="MNT_RETURN_URL" value="{{ MNT_RETURN_URL }}"/>
|
||||
<input type="hidden" name="MNT_CMS" value="{{ MNT_CMS }}"/>
|
||||
<div class="buttons">
|
||||
<div class="{% if ap_use %} text-center {% else %} pull-right {% endif %}">
|
||||
<input type="submit" value="{{ btn_confirm }}" class="btn btn-primary"/>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$('#payment-form').on('submit', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$.ajax({
|
||||
url: '{{ confirm_url }}',
|
||||
type: 'POST',
|
||||
data: $(this).serialize(),
|
||||
dataType: 'json',
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
$('#payment-form').off('submit').submit();
|
||||
} else {
|
||||
window.location.href = '{{ MNT_FAIL_URL }}';
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
window.location.href = '{{ MNT_FAIL_URL }}';
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user