【发布时间】:2016-11-25 06:21:17
【问题描述】:
我正在尝试从我的应用程序中添加账单支付,验证错误来了: 请求中缺少必需的参数 CheckPayment/CreditCardPayment。
整个连接进展顺利,但缺少参数的问题即将到来。 我只是编写以下代码:
protected void btnBillPayment_Click(object sender, EventArgs e)
{
try
{
var dataService = GetDataService();
var context = GetServiceContext();
decimal _amount = 200m;
BillPayment billPayment = new BillPayment
{
VendorRef = new ReferenceType
{
Value = "71",
name = "Lotus"
},
APAccountRef = new ReferenceType
{
name = "Fuel",
Value = "56"
},
PayType = BillPaymentTypeEnum.Check,
PayTypeSpecified = true,
BillPaymentEx = new IntuitAnyType
{
},
TotalAmt = _amount,
TotalAmtSpecified = true,
domain = "QBO",
MetaData = new ModificationMetaData
{
CreateTime = DateTime.Now,
LastUpdatedTime = DateTime.Now
},
TxnDate = DateTime.Now,
TxnDateSpecified = true,
//DepartmentRef=new ReferenceType
//{
//},
CurrencyRef = new ReferenceType()
{
//name = ?,
//Value = ?
},
PrivateNote = "Private Note",
Line = new Line[]
{
new Line
{
Amount=_amount,
AmountSpecified=true,
LinkedTxn=new LinkedTxn[]
{
new LinkedTxn
{
TxnId="234",
TxnType="Bill"
}
}
}
},
};
BillPayment resultBillPayment = dataService.Add<BillPayment>(billPayment);
}
catch (Exception ex1)
{
throw ex1;
}
}
提前感谢您的正确指导
【问题讨论】:
-
我终于发现不是 CheckPayment 而是 BillPaymentCheck 属性,我失踪了。
标签: asp.net quickbooks