pls anyone can help me? how to post customer data using jquery .i have tried .url hit the server .but customer data is not available in DB.
var CustomerData = {
display_name: "sridhar cotton mills",
first_name: "Benjamin",
last_name: "George",
company_name: "Bowman Furniture",
phone: "23467278",
mobile: "938237475",
website: "www.bowmanfurniture.com",
billing_address: {
street: "Harrington Bay Street",
city: "Salt Lake City",
state: "CA",
zip: "92612",
country: "U.S.A",
fax: "4527389"
},
shipping_address: {
street: "Micheal Street",
city: "Austin",
state: "Texas",
zip: "75211",
country: "U.S.A",
fax: "4527389"
},
currency_code: "USD",
ach_supported: true,
notes: "Bowman Furniture",
custom_fields: [
{
"index": 1,
"value": "129890"
},
{
"index": 2,
"value": "Premium"
}
]
};
$.ajax({
type: "POST",
data: JSON.stringify(CustomerData),
contentType: "application/json; charset=utf-8",
dataType: "jsonp",
processData: true,
crossDomain: true,
success: function (data, status, jqXHR) {
alert(JSON.stringify(CustomerData));
alert("success..." + status);
},
error: ServiceFailed
});