使用JSONP返回值时出错

Error when returning value using JSONP

本文关键字:出错 返回值 JSONP 使用      更新时间:2023-09-26

我在使用jsonp到API HTTPS网站时遇到问题。它将返回低于

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=

这是我的密码。

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();
});

它显示了一个控制台错误,读取响应文本时出错。。并指向"SUCCESS"文本前的(=)符号。

有人能帮我吗?

不可能让JSONP POST请求看到这篇文章。