(Magento 1.9.3.3)无法将客户数据发送到Magento服务器

时间:2018-02-27 11:12:57

标签: c# magento magento-1.9

我正在开发一个C#Winapp,用于连接Magento以使用SOAP API V2创建客户数据,并在我的程序尝试将客户数据发送到Magento服务器时遇到错误like this

如果我使用http发送它,但它无法使用https,我需要使用https。如何使它工作?

这是我发送数据的代码:

PortTypeClient mservice = new PortTypeClient();
var mlogin = mservice.login("User", "apikey");

int newCustomerCreateID = 0;
filters myfilter = new filters();

// Create Customer
customerCustomerEntityToCreate customerCreate = new customerCustomerEntityToCreate();

//fill attributes
customerCreate.email = SessionStore.getEmail();
customerCreate.telephone = Int32.Parse(SessionStore.getTel());
customerCreate.password = SessionStore.getTel();
customerCreate.firstname = SessionStore.getFName();
customerCreate.lastname = SessionStore.getLName();
customerCreate.middlename = "";
customerCreate.id_card = Int32.Parse(SessionStore.getIdCard());
customerCreate.store_id = 1;
customerCreate.store_idSpecified = true;
customerCreate.website_id = 1;
customerCreate.website_idSpecified = true;
customerCreate.group_id = 1;
customerCreate.group_idSpecified = true;
//customerCreate.suffix = "P";
customerCreate.prefix = SessionStore.getPrefix();
customerCreate.dob = SessionStore.getBdate();
//customerCreate.taxvat = "123456";
customerCreate.gender = Int32.Parse(SessionStore.getGenderNum()); //1-Male;2-Female
customerCreate.genderSpecified = true;

newCustomerCreateID = mservice.customerCustomerCreate(mlogin, customerCreate);
mservice.endSession(mlogin);

0 个答案:

没有答案