Quickbooks IPP v3 Invalid Line TaxCode in the request - quickbooks

Using the IPP v3 I am trying to submit an invoice with multiple lines with different taxcode(s), I am getting the following error when submitting an invoice with 2 lines with TaxCodeRef mapping to existing TaxCode(s).
<IntuitResponse xmlns="http://schema.intuit.com/finance/v3" time="2015-06-11T00:32:48.687-07:00">
<Fault type="ValidationFault">
<Error code="6100" element="Line.SalesItemLineDetail.TaxCodeRef">
<Message>Invalid Line TaxCode in the request</Message>
<Detail>Valid line TaxCodes for US should be TAX or NON. Supplied value: 8</Detail>
</Error>
<Error code="6100" element="Line.SalesItemLineDetail.TaxCodeRef">
<Message>Invalid Line TaxCode in the request</Message>
<Detail>Valid line TaxCodes for US should be TAX or NON. Supplied value: 9</Detail>
</Error>
</Fault>
</IntuitResponse>
Here is the submitted XML, TaxCode with Id 8 and 9 are defined and active.
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Invoice xmlns:ns0="http://schema.intuit.com/finance/v3">
<ns0:TxnDate>2015-06-11</ns0:TxnDate>
<ns0:Line>
<ns0:LineNum>1</ns0:LineNum>
<ns0:Description>Product1</ns0:Description>
<ns0:Amount>54.95</ns0:Amount>
<ns0:DetailType>SalesItemLineDetail</ns0:DetailType>
<ns0:SalesItemLineDetail>
<ns0:ItemRef>20</ns0:ItemRef>
<ns0:UnitPrice>54.95</ns0:UnitPrice>
<ns0:Qty>1</ns0:Qty>
<ns0:TaxCodeRef>8</ns0:TaxCodeRef>
</ns0:SalesItemLineDetail>
</ns0:Line>
<ns0:Line>
<ns0:LineNum>1</ns0:LineNum>
<ns0:Description>Product2</ns0:Description>
<ns0:Amount>54.95</ns0:Amount>
<ns0:DetailType>SalesItemLineDetail</ns0:DetailType>
<ns0:SalesItemLineDetail>
<ns0:ItemRef>20</ns0:ItemRef>
<ns0:UnitPrice>54.95</ns0:UnitPrice>
<ns0:Qty>1</ns0:Qty>
<ns0:TaxCodeRef>9</ns0:TaxCodeRef>
</ns0:SalesItemLineDetail>
</ns0:Line>
<ns0:CustomerRef>58</ns0:CustomerRef>
</ns0:Invoice>
Is it possible to submit one invoice with multiple lines having different TaxCodes for Quickbooks online ?

I think you're asking the wrong question. You're asking:
Is it possible to submit one invoice with multiple lines having different TaxCodes for Quickbooks online ?
But the error is telling you:
Valid line TaxCodes for US should be TAX or NON. Supplied value: 9
So the problem isn't that you're submitting different tax codes. The problem is that you're submitting an invalid tax code.
You submitted:
<ns0:TaxCodeRef>9</ns0:TaxCodeRef>
When the only valid submissions are:
TAX or NON
e.g.
<ns0:TaxCodeRef>TAX</ns0:TaxCodeRef>
or
<ns0:TaxCodeRef>NON</ns0:TaxCodeRef>
There are no other valid values for QuickBooks Online in the USA. Only TAX and NON.
For QuickBooks Online outside of the USA this behavior differs a little in that other countries support a different set of tax does (e.g. GST, HST, PST, etc.)

For US Quickbooks organisation/company, tax rates is handled differently. You need to create or add separate logic for US Locale:
See below from quickbooks US documentations:
https://developer.intuit.com/app/developer/qbo/docs/develop/tutorials/manage-sales-tax-for-us-locales
And this is the non US documentation which was your code followed:
https://developer.intuit.com/app/developer/qbo/docs/develop/tutorials/manage-sales-tax-for-non-us-locales#specifying-sales-tax

Related

Is there still "no API to manage consumer googlegroups.com groups programatically"?

In an answer to this 2014 post
Unable to retrieve members of a google group, getting Invalid Input
you read: "There is no API to manage consumer googlegroups.com groups programatically".
Is this still the situation in 2018?
I tried to follow the suggestion in answer 3 of the post How to get the list of members in a Google group in Google app script (Admin SDK)? but I get the following error message:
ReferenceError: "AdminDirectory" is not defined. (line 9, file "Code")
where line 9 (and following) is (are):
page = AdminDirectory.Members.list(groupKey,
{
domainName: 'googlegroups.#com',
maxResults: 500,
pageToken: pageToken,
});
Searching to understand the error I found the reference page for Members: list. Using the "Try this API" form in that page I get the error reported in the first post I mentioned.
If it is NOT true that "There is no API to manage consumer googlegroups.com groups programatically", is there a guide to copy the list of the members of a group I own in a google-sheet sheet? (I mean to copy via a function, non by hand exporting and reimporting the CSV)
Many thanks, Roberto Scotti
It's 2021 and I still can't find any evidence there's an API for #googlegroups.com groups, sadly.

Error using ActiveMerchant::Billing::AuthorizeNetCimGateway with Authorize.Net's opaqueData

Feb 8, 2018
My Ruby on Rails application has been successfully using ActiveMerchant::Billing::AuthorizeNetCimGateway with the payment type :credit_card for creating a customer profile with an embedded payment profile.
I'm now in the process of migrating to Authorize.Net's Accept.js which accepts credit card info directly sent from their hosted payment form and returns a payment nounce of type COMMON.ACCEPT.INAPP.PAYMENT that can be used for one time to create a payment transaction, customer profile, etc.
I constructed a payment_profile hash with :opaque_data in place of :credit_card. For example:
> payment_profile
=> {:payment=>
{:opaque_data=>
{:data_descriptor=>"COMMON.ACCEPT.INAPP.PAYMENT",
:data_value=> "eyJjb2RlIjoiNTBfMl8wNjAwMDUzNjBDMzAwOUQ3OEUzOUQ1MDk4QTYxMjFGNzlCQ0Y3RDRGQUE4NTNCMEU3MkYyMUJBNTI3NUE0NjQ2Q0ZFQTVFNzMxMDI2Qjg5ODJGNjBFRUE2RDZFMTZCMUY5NzQ4NUJFIiwidG9rZW4iOiI5NTE4MDc3Njg5NDA4MTAwOTAzNTAyIiwidiI6IjEuMSJ9"}},
:bill_to=>{:first_name=>"Firstname", :last_name=>"Lastname", :address=>nil, :city=>nil, :state=>nil, :zip=>nil, :country=>nil, :phone_number=>"(012) 234-5678"}}
I then tried to create a customer profile with an existing code similar to the following:
response = #gateway.create_customer_profile profile: {
email: client.email,
description: client.name,
merchant_customer_id: client.id,
payment_profiles: payment_profile
}
However, I received a response which had a result_code of Error and complained about "incomplete content" for element payment as follows:
> response
=> #<ActiveMerchant::Billing::Response:0x007f9827d14900
#authorization=nil,
#avs_result={"code"=>nil, "message"=>nil, "street_match"=>nil, "postal_match"=>nil},
#cvv_result={"code"=>nil, "message"=>nil},
#emv_authorization=nil,
#error_code="E00003",
#fraud_review=nil,
#message=
"The element 'payment' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has incomplete content. List of possible elements expected: 'creditCard, bankAccount, trackData, encryptedTrackData, payPal, opaqueData, emv' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'.",
#params=
{"messages"=>
{"result_code"=>"Error",
"message"=>
{"code"=>"E00003",
"text"=>
"The element 'payment' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has incomplete content. List of possible elements expected: 'creditCard, bankAccount, trackData, encryptedTrackData, payPal, opaqueData, emv' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'."}}},
#success=false,
#test=true>
I have a few questions in my mind:
Does ActiveMerchant::Billing::AuthorizeNetCimGateway even support Accept.js' :opaque_data in place of :credit_card?
If ActiveMerchant::Billing::AuthorizeNetCimGateway does support :opaque_data, what's may be wrong with the above payment_profile and what other content that I'd need to provide for payment element?
I'd appreciate any help in resolving this issue.
While this question is over 4 years old, and I'm assuming you have either found a solution or abandoned your effort, I ran into this same issue recently, and thought it would be helpful to add my findings in case someone else runs into this.
the AuthorizeNetCimGateway does not currently support Accept.js' opaqueData. In looking at the sourcecode for the active_merchant gem, specifically in /lib/active_merchant/billing/gateways/authorize_net_cim.rb, there is ultimately a method add_payment_profile that gets called. In that method, specifically on lines 759-761, you can see that the options are either a credit_card, bank_account, or drivers_license. A tokenized payment is not currently supported.
That being said, there is an open PR#2422 that adds support for this. At the time of writing this, it appears to be failing some rubocop specs, but hopefully it can get deployed in the near future!

Enterprise 2014 Bill Payment Query cannot find bill when bill is present in company file

Bill payment add cannot find matching bill in Enteprise 14 and the bill does exist for the customer. Could it have something to do with the length of the bill number? Please see XML below.
<OUTGOING>
<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE QBXML PUBLIC '-//INTUIT//DTD QBXML QBD 12.0//EN' ><QBXML><QBXMLMsgsRq onError = "continueOnError"><BillQueryRq><RefNumberRangeFilter><FromRefNumber>February Publisher P</FromRefNumber><ToRefNumber>February Publisher P</ToRefNumber></RefNumberRangeFilter><PaidStatus>NotPaidOnly</PaidStatus></BillQueryRq></QBXMLMsgsRq></QBXML>
</OUTGOING>
<RETURNS>
<QBXML>
<QBXMLMsgsRs>
<BillQueryRs statusCode="1" statusSeverity="Info" statusMessage="A query request did not find a matching object in QuickBooks" />
</QBXMLMsgsRs>
</QBXML>
</RETURNS>
I can't get this to work either. It appears to be a bug in the Bill Query ref number range filter. The query works OK if the ref number range filter is removed.
The filter also works if you use (SOF cuts of part of the answer)
StartsWithFebruary Publisher P

Why can't I get CreditCardTxnInfo in ReceivePaymentAddRs?

I'm using QBMS to process credit card payments. Then, I'm using QBXML and the QB Web Connector to add these payments into QB. I have QBMS payment processing working fine, and the ReceivePaymentAddRq to QB correctly adds the transactions data in QB. My problem is that I can't get QB to return the CreditCardTxnInfo in the ReceivePaymentAddRs markup. My QBXML request is in the following form:
<ReceivePaymentAddRq><ReceivePaymentAdd>
<CustomerRef><ListID>8000074A-1369078671</ListID></CustomerRef>
<TxnDate>2013-04-27</TxnDate>
<TotalAmount>21.05</TotalAmount>
<PaymentMethodRef><FullName>Visa</FullName></PaymentMethodRef>
<Memo>Some note about the payment.</Memo>
<DepositToAccountRef><FullName>Undeposited Funds</FullName></DepositToAccountRef>
<CreditCardTxnInfo><CreditCardTxnInputInfo>
<CreditCardNumber>xxxxxxxxxxxx6224</CreditCardNumber>
<ExpirationMonth>7</ExpirationMonth><ExpirationYear>2015</ExpirationYear>
<NameOnCard>John G Smith</NameOnCard>
<CreditCardAddress>7 Walnut Lane</CreditCardAddress>
<CreditCardPostalCode>11714</CreditCardPostalCode>
<CreditCardTxnType>Charge</CreditCardTxnType>
</CreditCardTxnInputInfo>
<CreditCardTxnResultInfo><ResultCode>0</ResultCode>
<ResultMessage>Status OK</ResultMessage>
<CreditCardTransID>ME0147410371</CreditCardTransID>
<MerchantAccountNumber>6241710108583287</MerchantAccountNumber>
<AuthorizationCode>08368C</AuthorizationCode>
<ReconBatchID>240141438 1R19595257770038186280AKTO03</ReconBatchID>
<PaymentGroupingCode>5</PaymentGroupingCode>
<PaymentStatus>Completed</PaymentStatus>
<TxnAuthorizationTime>2013-04-28T02:49:10</TxnAuthorizationTime>
<TxnAuthorizationStamp>1367117354</TxnAuthorizationStamp>
<ClientTransID>qc947863</ClientTransID>
</CreditCardTxnResultInfo>
</CreditCardTxnInfo>
<IsAutoApply>true</IsAutoApply>
</ReceivePaymentAdd>
<IncludeRetElement>CustomerRef</IncludeRetElement>
<IncludeRetElement>PaymentMethodRef</IncludeRetElement>
<IncludeRetElement>TotalAmount</IncludeRetElement>
<IncludeRetElement>CreditCardTxnInfo</IncludeRetElement>
</ReceivePaymentAddRq>
I expected the response to include the credit card transaction information (CC number, CC Trans ID, etc.). I need this info so that I can match up responses to the requests in my web service. Unfortunately, the response I'm getting looks like this:
<ReceivePaymentAddRs statusCode="0" statusSeverity="Info" statusMessage="Status OK">
<ReceivePaymentRet>
<CustomerRef><ListID>8020014A-1367478579</ListID><FullName>Smith, John</FullName></CustomerRef>
<TotalAmount>51.05</TotalAmount>
<PaymentMethodRef><ListID>80000004-1232402081</ListID><FullName>Visa</FullName></PaymentMethodRef>
</ReceivePaymentRet>
</ReceivePaymentAddRs>
Where's the CreditCardTxnInfo?
Did you authorize your application to "allow access to sensitive data"?
For QBWC, add <PersonalDataPref>pdpRequired</PersonalDataPref> to the QWC file.
Reference: https://member.developer.intuit.com/qbSDK-Current/doc/html/QBWC%20Developers%20Guide/04_TeachingQBWC_AboutYourWebService.6.2.html
For QBSDK users, you can use the AuthPreferences object to require access.
Reference: https://member.developer.intuit.com/qbSDK-Current/doc/html/QBSDK%20Programmers%20Guide/04_SupportingUserAuth.6.3.html
C# Sample:
RequestProcessor2 rp = new RequestProcessor2();
AuthPreferences auth = (AuthPreferences)rp.AuthPreferences;
auth.PutPersonalDataPref(QBXMLRPPersonalDataPrefType.pdpRequired);
rp.OpenConnection2("", "Your App Name", QBXMLRPConnectionType.localQBD);

How do I fetch orgusers beyond the 1st 100 using the Google Apps OrgUser provisioning API feed

I am using Zend's gdata library for the Google Apps provisioning API. Since Zend doesn't yet support fetching org users (no retrieve function provided by the library for this feed), I am making a custom gdata query to the url (as suggested in the documentation developers.google.com/google-apps/provisioning/#retrieving_organization_users_experimental):
apps-apis.google.com/a/feeds/orguser/2.0/'.$customerId.'?get=all
This works well for <= 100 users.
Now, I have created a domain with 125 users across 5 OUs. When I fetch the above URI, I get the 1st 100 users (as documented and expected). However, I could not find the pagination link mentioned here: developers.google.com/google-apps/provisioning/reference#Results_Pagination
Here's the start of my orguser feed:
<?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:apps='http://schemas.google.com/apps/2006'><id>https://apps-apis.google.com/a/feeds/orguser/2.0/C00xxxxxxx</id><updated>2013-01-06T08:17:43.520Z</updated><**link rel='next' type='application/atom+xml' href='https://apps-apis.google.com/a/feeds/orguser/2.0/C00xxxxxxx?get=all&startKey=RASS03jtnz0s2orxmbn.**'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://apps-apis.google.com/a/feeds/orguser/2.0/C00xxxxx'/>
I tried the https://apps-apis.google.com/a/feeds/orguser/2.0/C00xxxxxxx?get=all&startKey=RASS03jtnz0s2orxmbn. link but it gives me the exact same 100 users that the https://apps-apis.google.com/a/feeds/orguser/2.0/C00xxxxxxx?get=all link gives. This is the only occurrence of the word "next" in my feed and so there is not other URI I can try to fetch the next 25 users.
So I have only been able to get 100 users from this API call. How do I go about fetching the next 25 users? Examples/code would be really appreciated. Or what am I doing wrong?
Please help - this is blocking an urgent delivery.
Thanks!,
Vinay.
Your 2nd request should look like:
https://apps-apis.google.com/a/feeds/orguser/2.0/C00xxxxxx?startKey=RASS03jtnz0s2orxmbn&get=all
startKey should be set to the value of the next parameter and get should continue to be all for each page request.
Also, make sure the URL is decoded, if & is encoded as & in the request, then Google's servers will see all of all&startKey=RASS03jtnz0s2orxmbn as the value of get and it won't see a startKey parameter at all.

Resources