C# 交易未发生,给出错误E00040客户配置文件ID或客户付款配置文件ID

C# 交易未发生,给出错误E00040客户配置文件ID或客户付款配置文件ID,c#,asp.net-mvc,authorize.net,C#,Asp.net Mvc,Authorize.net,我使用AuthorizeAndCapture方法在沙盒环境中启动特定金额的事务 下面是使用的代码 var customerGateWay =new CustomerGateway(_authorizeNetConfiguration, _loggerFactory); var customerResponse = await customerGateWay.GetCustomerAsync(company.Company.ExternalCompanyProfileId); //Getting

我使用AuthorizeAndCapture方法在沙盒环境中启动特定金额的事务

下面是使用的代码

var customerGateWay =new CustomerGateway(_authorizeNetConfiguration, _loggerFactory);

var customerResponse = await customerGateWay.GetCustomerAsync(company.Company.ExternalCompanyProfileId);
//Getting response with profile id in customerResponse 
var response = customerGateWay.AuthorizeAndCapture(company.Company.ExternalCompanyProfileId, customerResponse.ProfileID, totalAmount);
//response is giving this error Error E00040 Customer Profile ID or Customer Payment Profile ID

预期输出为
transactionId
,但给出此错误E00040客户配置文件ID或客户付款配置文件ID

似乎找不到记录:在生成交易时是的,但我正在使用配置文件ID获取客户响应详细信息,因此我不知道问题出在哪里。您正在获取有效的在响应数据中出现错误时返回响应。如果事务未发生,则不应将其作为成功响应,因为它是一个沙盒帐户?响应仅表示服务器已识别该请求是有效的,并且可以处理该请求。如果客户不存在,那么响应中的错误是允许的。