I have a problem when using jsonp to API HTTPS website. it will return below
response=1&responsetext=SUCCESS&authcode=123456&transactionid=1592337329&avsresponse=&cvvresponse=&orderid=&type=sale&response_code=100&merchant_defined_field_6=&merchant_defined_field_7=&customer_vault_id=
and this is my code.
function getJSON() {
$.ajax({
type: "POST",
dataType: 'jsonp',
data:{},
jsonp: true,
jsonpCallback: "callbackName",
url: 'https://secure.equitycommercegateway.com/api/transact.php?username=test123&password=test1234&ccnumber=4111111111111111&ccexp=1012&amount=10.00&type=sale&product_sku_1=monthly&callbackName=?',
success: function(msg){
alert(msg);
}
});
}
$(document).ready(function(){
var callbackName = function(data) {
//alert(data.listing.id );
}
getJSON();
});
It shows me a console error, Error to read response text.. and points to (=) symbol right before "SUCCESS" text.
anyone can help me?