payment
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user