English 中文(简体)
CIM in an MVC3 app - how to Immediateiate ServiceSoap?
原标题:CIM in an MVC3 app - how to instantiate ServiceSoap?

I m 将CIM纳入MVC3表。 I ve利用发展奖增加了服务参考资料,并编码如下:

public long x()
{
    var u = this.User.Identity as IClaimsIdentity;
    var id = u.Claims.First(x => x.ClaimType == ClaimTypes.NameIdentifier);

    AuthorizeNet.CustomerProfileType cust = new AuthorizeNet.CustomerProfileType();
    cust.merchantCustomerId = id.Value;

    AuthorizeNet.MerchantAuthenticationType merch = new AuthorizeNet.MerchantAuthenticationType();
    merch.name = "8aFRk4663XMd";
    merch.transactionKey = "4MS675e62fQEdUXN";
    AuthorizeNet.ServiceSoap svc = new AuthorizeNet.ServiceSoap();
    AuthorizeNet.CreateCustomerProfileResponseType response = svc.CreateCustomerProfile(
        merch, cust, AuthorizeNet.ValidationModeEnum.none
    );
    return response.customerProfileId;
}

但它当然不工作,因为不能像现在这样瞬间(服务Soap是一个接口)。 抽样守则提到了一种服务,但这种服务确实存在。

因此,应该如何工作?

TIA - e!

页: 1

最佳回答

......至少现在答案似乎是:不产生service Reference,而是产生Web Reference(可以通过点击Advanced button服务参考对话)。

ee。

问题回答

暂无回答




相关问题
Automatic Sales Tax Tables

A client needs the ability for their shopping cart to automatically retrieve and keep up to date sales tax tables for at least the US, and preferably all countries with which the US has tax treaties. ...

ecommerce stock management with external payment gateway

this question is similar to this one but with a twist (so the answer accepted for the older question is not valid in the following scenario) i have a site for selling tickets (PHP/MYSQL). Suppose i ...

are automated recurring billings really automated?

"roll your own recurring billing in your rails app with a cron job, a date field for when they are paid through, and amount each person is paying" I just saw this entry here in SO and wonder if ...

ECommerce solution in php and ror [closed]

I m a developer but I never used php nor ruby on rails. I would like to create a small e-commerce website. I found out 2 solutions that seems very good, Prestahop and Spree. Which one would you ...

How to link username in site to PayPal information email?

It s not a problem but i don t know how to do this; let s say that I have a sign up form with some fields: username, password, email, as you know the user clicks on the BUY BUTTON and pay s up. Well, ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

热门标签