Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/api/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 是否使用quickbooks API添加付款?_C#_Api_Synchronization_Quickbooks_Intuit Partner Platform - Fatal编程技术网

C# 是否使用quickbooks API添加付款?

C# 是否使用quickbooks API添加付款?,c#,api,synchronization,quickbooks,intuit-partner-platform,C#,Api,Synchronization,Quickbooks,Intuit Partner Platform,我正在使用QBFC13库同步QuickBooks和我的.NET应用程序 但我似乎不知道如何从我的应用程序向quickbooks添加付款 我注意到我有这个方法: IPaymentMethodAdd paymentMehtodAddRq = requestMsgSet.AppendPaymentMethodAddRq() 但我不知道如何填充参数使其工作 有谁能帮我举一个简单的付款例子:ClientId和支付的金额 注意:我使用的是C#。请参阅SDK附带的屏幕参考指南,其中包含可用的参数和字段 这是

我正在使用QBFC13库同步QuickBooks和我的.NET应用程序

但我似乎不知道如何从我的应用程序向quickbooks添加付款

我注意到我有这个方法:

IPaymentMethodAdd paymentMehtodAddRq = requestMsgSet.AppendPaymentMethodAddRq()
但我不知道如何填充参数使其工作

有谁能帮我举一个简单的付款例子:ClientId和支付的金额


注意:我使用的是C#。

请参阅SDK附带的屏幕参考指南,其中包含可用的参数和字段

这是一个两步过程

  • 创建帐单
  • 付款
  • 创建票据

                IMsgSetRequest requestMsgSet = sessionManager.getMsgSetRequest();
                requestMsgSet.Attributes.OnError = ENRqOnError.roeContinue;
    
                IBillAdd addBill = requestMsgSet.AppendBillAddRq();
                addBill.VendorRef.FullName.SetValue(vendorName);
                addBill.TxnDate.SetValue(DateTime.Now);
                addBill.DueDate.SetValue(dueDate);
                addBill.APAccountRef.FullName.SetValue(accountPayable);
                addBill.Memo.SetValue(accountPayableMemo);
    
                IExpenseLineAdd expenceLineAdd = addBill.ExpenseLineAddList.Append();
                expenceLineAdd.AccountRef.FullName.SetValue(accountExpenses);
                expenceLineAdd.Amount.SetValue(value);
                expenceLineAdd.Memo.SetValue(accountExpensesLineMemo);
    
                IMsgSetResponse responseSet = sessionManager.doRequest(true, ref requestMsgSet)
    
    付款:你可以用支票或信用卡付款

    信用卡

                IMsgSetRequest requestMsgSet = sessionManager.getMsgSetRequest();
                requestMsgSet.Attributes.OnError = ENRqOnError.roeContinue;
    
                IBillPaymentCreditCardAdd paymentAdd = requestMsgSet.AppendBillPaymentCreditCardAddRq();
                paymentAdd.CreditCardAccountRef.FullName.SetValue("CreditCardAccount");
                paymentAdd.PayeeEntityRef.FullName.SetValue("TestVendor");
                paymentAdd.TxnDate.SetValue(DateTime.Now);
                paymentAdd.Memo.SetValue("test payment credit card");
    
                IAppliedToTxnAdd appliedToTxnAdd = paymentAdd.AppliedToTxnAddList.Append();
                appliedToTxnAdd.TxnID.SetValue("7D-1509602561");
                appliedToTxnAdd.PaymentAmount.SetValue((double)250.00);
    
    
                IMsgSetResponse responseSet = sessionManager.doRequest(true, ref requestMsgSet)