2015-04-24 76 views
1

我需要爲authorize.net創建聚合一些信息的系統。交易歷史,更精確。但我需要從我的賬戶中收到交易記錄。貝寶擁有「第三方權限」功能,非常適合我的需求。那麼在authorize.net呢?如何查看其他賬戶的交易歷史記錄(如果需要,請在他的許可下)?原則上可行嗎?在authorize.net上獲取別人的交易記錄

回答

0

您使用事務這裏詳細介紹API:http://developer.authorize.net/api/transaction_details/(更多在這裏:http://www.authorize.net/support/ReportingGuide_XML.pdf

C#示例:

//open a call to the Gateway 
var gate = new ReportingGateway("YOUR_API_LOGIN", "YOUR_TRANSACTION_KEY"); 

//Get all the batches settled 
var batches = gate.GetSettledBatchList(); 

Console.WriteLine("All Batches in the last 30 days"); 

//Loop each batch returned 
foreach (var item in batches) { 
    Console.WriteLine("Batch ID: {0}, Settled On : {1}", item.ID, 
         item.SettledOn.ToShortDateString()); 
} 

Console.WriteLine("*****************************************************"); 
Console.WriteLine(); 

//get all Transactions for the last 30 days 
var transactions = gate.GetTransactionList(); 
foreach (var item in transactions) { 
    Console.WriteLine("Transaction {0}: Card: {1} for {2} on {3}", 
         item.TransactionID, item.CardNumber, 
         item.SettleAmount.ToString("C"), 
         item.DateSubmitted.ToShortDateString()); 
} 

要使用它,API需要對商家帳戶被授權TransactionDetails:

  1. 登錄到商家接口在https://account.authorize.net
  2. 單擊主工具欄
  3. 點擊交易詳情API從常規安全設置部分
  4. 在字段中輸入您的機密問題答案來您的安全問題的帳戶提供
  5. 單擊啓用交易詳情API
+0

謝謝,但我應該在我的服務器上獲取並保存其他人的憑據。這並不安全。我希望解決方案無需傳輸憑據。 –

+0

您需要憑據才能告知Authorize.NET的服務器您有權使用該API。如果您沒有證書,他們就不會向您發送任何信息。 –

+0

@JenR是正確的。您可能想在產品創意論壇上發佈建議,以添加對第三方或OAuth類型解決方案的支持:http://community.developer.authorize.net/t5/Ideas/idb-p/ideas – rhldr