我正在尝试使用jquery验证购买,无论我尝试什么,我都会收到“收据数据格式错误”错误。我有一张有效的收据,如下所示:
ewoJInNpZ25hdHVyZSIgPSAiQWlPQ2t5bTJrWGwvbzhMMmxMd054K2M5bzg5QVlUWXkwNFp3bXkrRDJIV3hpMExYVUdtMmIyREhDZ1FyQ0lnZk5qcnVqRVp0bDJ0OTlPNm9VenZmTkM5VzN1RytzQzVuY0hKMnVhOWlwUjVPeTJlRFFyMkdFOHByc25iaHMwQXB5L0lqR0d3S21HZkVGVDU3QjB5T0dSMDh4eHBJSFZmV0t4RjNyQXoxZE0wRUFBQURWekNDQTFNd2dnSTdvQU1DQVFJQ0NHVVVrVTNaV0FTMU1BMEdDU3FHU0liM0RRRUJCUVVBTUg4eEN6QUpCZ05WQkFZVEFsVlRNUk13RVFZRFZRUUtEQXBCY0hCc1pTQkpibU11TVNZd0pBWURWUVFMREIxQmNIQnNaU0JEWlhKMGFXWnBZMkYwYVc5dUlFRjFkR2h2Y21sMGVURXpNREVHQTFVRUF3d3FRWEJ3YkdVZ2FWUjFibVZ6SUZOMGIzSmxJRU5sY25ScFptbGpZWFJwYjI0Z1FYVjBhRzl5YVhSNU1CNFhEVEE1TURZeE5USXlNRFUxTmxvWERURTBNRFl4TkRJeU1EVTFObG93WkRFak1DRUdBMVVFQXd3YVVIVnlZMmhoYzJWU1pXTmxhWEIwUTJWeWRHbG1hV05oZEdVeEd6QVpCZ05WQkFzTUVrRndjR3hsSUdsVWRXNWxjeUJUZEc5eVpURVRNQkVHQTFVRUNnd0tRWEJ3YkdVZ1NXNWpMakVMTUFrR0ExVUVCaE1DVlZNd2daOHdEUVlKS29aSWh2Y05BUUVCQlFBRGdZMEFNSUdKQW9HQkFNclJqRjJjdDRJclNkaVRDaGFJMGc4cHd2L2NtSHM4cC9Sd1YvcnQvOTFYS1ZoTmw0WElCaW1LalFRTmZnSHNEczZ5anUrK0RyS0pFN3VLc3BoTWRkS1lmRkU1ckdYc0FkQkVqQndSSXhleFRldngzS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anNLQ1NKaWRuSnpJaUE5SUNJeExqQXpJanNLQ1NKMGNtRnVjMkZqZEdsdmJpMXBaQ0lnUFNBaU1UQXdNREF3TURBNE1ERTJNVGcxTlNJN0Nna2ljWFZoYm5ScGRIa2lJRDBnSWpFaU93b0pJbTl5YVdkcGJtRnNMWEIxY21Ob1lYTmxMV1JoZEdVdGJYTWlJRDBnSWpFek56TTBPRFE0TXpFd01EQWlPd29KSW5WdWFYRjFaUzEyWlc1a2IzSXRhV1JsYm5ScFptbGxjaUlnUFNBaVF6aENRakJETmtNdE5UTTVOeTAwUTBVMkxUbEdRell0TVVJeE1EYzJSRU5FT0RFeElqc0tDU0p3Y205a2RXTjBMV2xrSWlBOUlDSlFVRjh3TURFaU93b0pJbWwwWlcwdGFXUWlJRDBnSWpZMk9EVXdNVFV4TmlJN0Nna2lZbWxrSWlBOUlDSnVlaTVqYnk1d2NtOXdhRzkwYjJkeVlYQm9aWEl1WVhCd0lqc0tDU0p3ZFhKamFHRnpaUzFrWVhSbExXMXpJaUE5SUNJeE16Y3pOVFl6TXpjM09UTXlJanNLQ1NKd2RYSmphR0Z6WlMxa1lYUmxJaUE5SUNJeU1ERXpMVEEzTFRFeElERTNPakl5T2pVM0lFVjBZeTlIVFZRaU93b0pJbkIxY21Ob1lYTmxMV1JoZEdVdGNITjBJaUE5SUNJeU1ERXpMVEEzTFRFeElERXdPakl5T2pVM0lFRnRaWEpwWTJFdlRHOXpYMEZ1WjJWc1pYTWlPd29KSW05eWFXZHBibUZzTFhCMWNtTm9ZWE5sTFdSaGRHVWlJRDBnSWpJd01UTXRNRGN0TVRBZ01UazZNek02TlRFZ1JYUmpMMGROVkNJN0NuMD0iOwoJImVudmlyb25tZW50IiA9ICJTYW5kYm94IjsKCSJwb2QiID0gIjEwMCI7Cgkic2lnbmluZy1zdGF0dXMiID0gIjAiOwp9"
},
function(data) {
console.log(data);
}
)
我一直收到这个“格式错误的请求”错误消息。代码的有效base64,它解压缩到:
{
"signature" = "AiOCkym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9zX0FuZ2VsZXMiOwoJIm9yaWdpbmFsLXB1cmNoYXNlLWRhdGUiID0gIjIwMTMtMDctMTAgMTk6MzM6NTEgRXRjL0dNVCI7Cn0=";
"environment" = "Sandbox";
"pod" = "100";
"signing-status" = "0";
}
可能导致这种情况的原因是什么? base64的有效,“收据 - 数据”:[收据]似乎是正确的......任何人都可以帮忙吗?
答案 0 :(得分:5)
对后代来说,
当你使用jQuery的post方法时,它从第二个参数JavaScript对象形成的字符串不是JSON文字。相反,它可能正在做这样的事情:
{
"receipt-data" : "< receipt data here >"
}
变为
"receipt-data=< receipt data here >"
几乎就像GET请求一样。
但是,当您使用JSON.stringify()时,您将从JavaScript对象获得JSON文字。
在这方面,Apple的验证服务器有点不标准,因为它希望POST数据格式化为JSON而不是旧的GET样式字符串。
答案 1 :(得分:2)
我刚尝试使用Chrome扩展应用“Postman”来点击您的请求网址并成功完成此操作:
{
"receipt":
{"original_purchase_date_pst":"2013-07-10 12:33:51 America/Los_Angeles", "purchase_date_ms":"1373563377932", "unique_identifier":"0000b02187b8", "original_transaction_id":"1000000080013872", "bvrs":"1.03", "transaction_id":"1000000080161855", "quantity":"1", "unique_vendor_identifier":"C8BB0C6C-5397-4CE6-9FC6-1B1076DCD811", "item_id":"668501516", "product_id":"PP_001", "purchase_date":"2013-07-11 17:22:57 Etc/GMT", "original_purchase_date":"2013-07-10 19:33:51 Etc/GMT", "purchase_date_pst":"2013-07-11 10:22:57 America/Los_Angeles", "bid":"nz.co.prophotographer.app", "original_purchase_date_ms":"1373484831000"
},
"status":0}
我想没有这样的错误“格式错误的请求”。这意味着在向服务器发出请求的代码中应该存在错误。
答案 2 :(得分:0)
出于某种原因,这样做可以正常工作:
$.post(
"https://sandbox.itunes.apple.com/verifyReceipt",
JSON.stringify({ "receipt-data": "ewoJInNpZ25hdHVyZSIgPSAiQW9mNTBBZVF1b3lOZGl6S0ZEWFJqNSt1djE0NXdwcFdraUVHMmlnbEFpM0JpKzFiWWtWSU1raGIwRkNi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2lJRDBnSWpFaU93b0pJbTl5YVdkcGJtRnNMWEIxY21Ob1lYTmxMV1JoZEdVdGJYTWlJRDBnSWpFek56TTBPRFE0TXpFd01EQWlPd29KSW5WdWFYRjFaUzEyWlc1a2IzSXRhV1JsYm5ScFptbGxjaUlnUFNBaVF6aENRakJETmtNdE5UTTVOeTAwUTBVMkxUbEdRell0TVVJeE1EYzJSRU5FT0RFeElqc0tDU0p3Y205a2RXTjBMV2xrSWlBOUlDSlFVRjh3TURFaU93b0pJbWwwWlcwdGFXUWlJRDBnSWpZMk9EVXdNVFV4TmlJN0Nna2lZbWxrSWlBOUlDSnVlaTVqYnk1d2NtOXdhRzkwYjJkeVlYQm9aWEl1WVhCd0lqc0tDU0p3ZFhKamFHRnpaUzFrWVhSbExXMXpJaUE5SUNJeE16Y3pOVFl6TXpjM09UTXlJanNLQ1NKd2RYSmphR0Z6WlMxa1lYUmxJaUE5SUNJeU1ERXpMVEEzTFRFeElERTNPakl5T2pVM0lFVjBZeTlIVFZRaU93b0pJbkIxY21Ob1lYTmxMV1JoZEdVdGNITjBJaUE5SUNJeU1ERXpMVEEzTFRFeElERXdPakl5T2pVM0lFRnRaWEpwWTJFdlRHOXpYMEZ1WjJWc1pYTWlPd29KSW05eWFXZHBibUZzTFhCMWNtTm9ZWE5sTFdSaGRHVWlJRDBnSWpJd01UTXRNRGN0TVRBZ01UazZNek02TlRFZ1JYUmpMMGROVkNJN0NuMD0iOwoJImVudmlyb25tZW50IiA9ICJTYW5kYm94IjsKCSJwb2QiID0gIjEwMCI7Cgkic2lnbmluZy1zdGF0dXMiID0gIjAiOwp9"}),
function(result) {
console.log(result)
}
);
我不知道为什么你必须将数据作为字符串传递;肯定它应该是一样的?我做过的每个其他jquery帖子都是将数据作为json对象传递...:/从http://comments.gmane.org/gmane.comp.handhelds.phonegap/38338得到了工作示例代码