2013-04-28 75 views
0

我正在使用QBMS處理信用卡付款。然後,我使用QBXML和QB Web連接器將這些付款添加到QB中。我的QBMS支付處理工作正常,並且QB的ReceivePaymentAddRq正確添加了QB中的交易數據。我的問題是,我無法讓QB返回ReceivePaymentAddRs標記中的CreditCardTxnInfo。我的QBXML請求是以下形式:爲什麼我無法在ReceivePaymentAddRs中獲得CreditCardTxnInfo?

<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> 

我期望的響應以包括信用卡交易信息(CC數,CC橫貫ID等)。我需要這些信息,以便我可以在我的Web服務中匹配對請求的響應。不幸的是,我收到的回覆如下所示:

<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> 

CreditCardTxnInfo在哪裏?

+0

您可以發佈您請求的休息嗎?你使用的是什麼版本的qbXML?你有沒有嘗試過沒有任何標籤? – 2013-04-28 22:16:46

+0

@KeithPalmer我正在使用qbXML 8.0。我試過不包括標籤,但不幸的是,這似乎沒有什麼區別。我已將完整的請求標記添加到我的問題中。 – SPKoder 2013-05-03 03:03:01

+0

@KeithPalmer讓我澄清;刪除標記確實會向QB的響應中添加更多數據,但該響應仍然不包含我正在查找的CreditCardTxnInfo。謝謝。 – SPKoder 2013-05-03 03:11:21

回答

1

您是否授權您的應用程序「允許訪問敏感數據」?

對於QBWC,將<PersonalDataPref>pdpRequired</PersonalDataPref>添加到QWC文件中。

參考:https://member.developer.intuit.com/qbSDK-Current/doc/html/QBWC%20Developers%20Guide/04_TeachingQBWC_AboutYourWebService.6.2.html

對於QBSDK的用戶,可以使用AuthPreferences對象需要訪問。

參考:https://member.developer.intuit.com/qbSDK-Current/doc/html/QBSDK%20Programmers%20Guide/04_SupportingUserAuth.6.3.html

C#示例:

RequestProcessor2 rp = new RequestProcessor2(); 
AuthPreferences auth = (AuthPreferences)rp.AuthPreferences; 
auth.PutPersonalDataPref(QBXMLRPPersonalDataPrefType.pdpRequired); 
rp.OpenConnection2("", "Your App Name", QBXMLRPConnectionType.localQBD); 
+1

是的!那是我的問題。我將這一行添加到我的QWC文件中: pdpRequired。這解決了它。 – SPKoder 2013-05-08 00:29:45

相關問題