Closed Daz66 closed 6 years ago
I am running into the same issue, the remote validator gets called but no data is sent. I have the plugin in debug mode and no errors / warnings are thrown. It shows the receipt prior to the call even.
Data is sending with "application/json" content type here. So you need to use in your php script:
$data = file_get_contents('php://input');
for getting post variables instead $_POST.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi,
I've been tearing my hair out with a problem where my server-side purchase validation script is failing. It seems no POST data is actually getting through to my script from the XMLHttpRequest() send in store-android.js I have tested the script using my own jquery call here: $.ajax( { url: store.validator, method: 'POST', data: { receipt:, signature: },
success: function(resp) { alert("success: " + JSON.stringify(resp)); },
error: function(status, message) { alert("Error: " + status + ": " + message); }
});
and this works fine!
So my questions is: why does the XMLHttpRequest() POST request in your code fail and yet the jQuery equivalent works?
BTW: the server-side script is an Amazon AWS EC2 instance. I'm not sure if this is significant!
Thanks in advance for any pointers, Daz