This commit is contained in:
Nweni
2017-06-11 16:57:31 +06:30
parent a809818324
commit 05286ce7a6
8 changed files with 54 additions and 8 deletions

View File

@@ -0,0 +1,5 @@
if(@status)
json.status @status
else
json.status false
end

View File

@@ -1 +1,25 @@
Hello MPU
<h2> MPU </h2>
Amount :
<input type="text" name="amount" id="amount" value=""/>
<button type="submit" id="mpu_pay" > PAY </button>
<script>
$('#mpu_pay').on('click',function(){
var amount = $('#amount').val();
var sale_id = "<%= @sale_id %>";
alert(amount);
$.ajax({type: "POST",
url: "<%= origami_create_mpu_payment_path %>",
data: "amount="+ amount + "&sale_id="+ sale_id,
success:function(result){
if(result){
window.location.href = '/origami/sale/'+ sale_id + "/payment";
}
}
});
})
</script>