【发布时间】:2015-07-02 23:07:06
【问题描述】:
我需要创建系统来聚合来自 authorize.net 的一些信息。交易历史,更准确地说。但我需要不是从我的帐户接收交易历史记录。 PayPal 具有“第三方权限”功能,非常适合我的需求。在 authorize.net 中呢?我怎样才能看到其他账户的交易历史(如果需要,在他的许可下)?原则上可以吗?
【问题讨论】:
标签: authorize.net
我需要创建系统来聚合来自 authorize.net 的一些信息。交易历史,更准确地说。但我需要不是从我的帐户接收交易历史记录。 PayPal 具有“第三方权限”功能,非常适合我的需求。在 authorize.net 中呢?我怎样才能看到其他账户的交易历史(如果需要,在他的许可下)?原则上可以吗?
【问题讨论】:
标签: authorize.net
您在此处使用交易详情 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());
}
要使用它,TransactionDetails API 需要在商家账户上授权:
【讨论】: