0 Replies - 1091 Views - Last Post: 25 July 2012 - 09:51 AM

#1 StealthRT  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 39
  • Joined: 29-September 08

Jquery $post JSON question

Posted 25 July 2012 - 09:51 AM

I am unsure as to what may be causing my problem 404 Not Found error. i know the path is there because when i go to the URL i get this error:
    {"error":"invalid_order"}


And this is the javascript code thats calling json:
    $.post("<?php echo str_ireplace("http://", "https://", URL_P);?>c/gateway",
			{
				unique_id:$("#order_id").val(),
				name_card:$("#name_card").val(),
				card_num:$("#card_num").val(),
				ex_date:$("#ex_date").val(),
				cvv:$("#cvv").val()	
			},
			function(data) {
				if (data && data != null && data["success"] != null && data["orderid"]) {
					processSuccess(data["orderid"]);
				} else if (data && data != null && data["error"] != null) {
					processError(data["error"]);
				} else {
					processError('unknown');
				}
				processing = false;
			},
			"json"
	);


Does anyone see an error in the $post? Is the json $post formed correctly?

Thanks.

Is This A Good Question/Topic? 0
  • +

Page 1 of 1