payment
This commit is contained in:
@@ -11,12 +11,13 @@ Amount :
|
||||
$('#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){
|
||||
alert("Payment success")
|
||||
window.location.href = '/origami/sale/'+ sale_id + "/payment";
|
||||
}
|
||||
}
|
||||
|
||||
1
app/views/origami/payments/create.json.jbuilder
Normal file
1
app/views/origami/payments/create.json.jbuilder
Normal file
@@ -0,0 +1 @@
|
||||
json.status true
|
||||
@@ -229,7 +229,8 @@ $( document ).ready(function() {
|
||||
url: "<%= origami_payment_process_path %>",
|
||||
data: "cash="+ cash + "&sale_id=" + sale_id,
|
||||
success:function(result){
|
||||
alert("THANK YOU")
|
||||
alert("Thank you")
|
||||
window.location.href = '/origami';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user