I have call this api on button click with send static data but it's not call this error
Failed to load resource: the server responded with a status of 400 ()
function planDetailModal() {
var SubscriptionID = "Test";
UpdateSubscription(SubscriptionID);
}
function UpdateSubscription(SubscriptionID) {
debugger;
var data = new FormData();
data.UserID = "12Ggg";
data.Criteria = {
SubscriptionID: "Test",
Create:
{
PaymentToken: "test",
CustomerId: "Test"/*$("#customerId").val()*/,
PriceId: "Testing" /*$("#priceID").val()*/
}
};
var apiurl = paymentApiUrl + "api/Subscription/UpdateSubscription";
//$(".messagePopup").show();
//Loader();
//$("#myModal").hide();
$.ajax({
type: 'POST',
url: apiurl,
data: JSON.stringify(data),
datatype: "json",
contentType: 'application/json; charset=UTF-8',
success: function (response) {
debugger;
if (response.isSuccess == true) {
}
},
error: function (response) {
// console.log("Error => " + response);
$.notify("there has been some error, please try again later !", "error");
//$(".messagePopup").hide();
//setTimeout(
// reload
// , 1500);
}
})
}