如何在Authorize.net中查看交易已结算/未结算?

发布于 2024-09-08 11:33:15 字数 101 浏览 2 评论 0原文

如何在authorize.net中查找用户进行的交易是否已结算或未结算。我正在使用AIM。 我想通过编码。当交易完成时,我找不到交易状态。但我想知道它是已结算还是未结算的交易。 提前致谢。

How Can I find whether the transaction made by user is settled or Unsettled in the authorize.net.I am using AIM.
I want to get through coding.When the transaction is completed and I cant find transaction status.But I want to get whether it goes for settled or unsettled transaction.
Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

苹果你个爱泡泡 2024-09-15 11:33:15

您无法通过编码获取此信息,因为 Authorize.Net 提供的任何 API 都不允许这样做。只能通过控制面板来完成。当您处理交易并获得批准时,您可以假设该交易尚未结算。交易每天结算一次,通常在太平洋时间午夜左右进行。之后您可以假设交易已结算。

You cannot get this information through coding as no API Authorize.Net offers allows for this. It can only be done through the control panel. When you process a transaction and it is approved you can assume the transaction is unsettled. Transactions are settled once per day usually around midnight Pacific Time. After that you can assume a transaction is settled.

灼疼热情 2024-09-15 11:33:15

截至 2011 年 3 月 16 日,authorize.net 发布了两个对交易详细信息 API 的新调用:getUnsettledTransactionList 和 getBatchStatistics。

getUnsettledTransactionList 每次调用最多返回 1,000 个未结算交易,返回最近的交易。响应中返回的信息将与 getTransactionList 调用中返回的信息相同。

getBatchStatistics 返回单个批次的批次统计信息,例如结算状态和时间、费用计数、拒绝计数等。

有关详细信息,请查看 XML 指南和 SOAP 指南。

在撰写本文时,PHP SDK 版本为 1.1.6,并且没有将此功能内置到 TD api 中,但是如果您查看上面提供的文档以及 此示例页面,您将看到获取未结算交易的列表实际上是可能的。

从此页面

As of 03-16-2011 authorize.net has released two new calls to the Transaction Details API, getUnsettledTransactionList and getBatchStatistics.

getUnsettledTransactionList returns up to 1,000 unsettled transactions per call, returning the most recent transactions. The information returned in the response will be the same as what's returned in getTransactionList call.

getBatchStatistics returns the batch stats for a single batch like settlement state and time, charge count, decline count, etc.

For more info, check out the XML guide and the SOAP guide.

At the time of writing the PHP SDK is at version 1.1.6 and does not have this function built into the TD api, however if you look at the documentation provided above, as well as this example page, you will see that getting a list of unsettled transactions is in fact possible.

from this page

今天小雨转甜 2024-09-15 11:33:15

我已点击此链接 http://developer.authorize.net/api/transaction_details/并从那里获取此代码,

<?php
require_once "anet_php_sdk/AuthorizeNet.php";
define("AUTHORIZENET_API_LOGIN_ID", "YOURLOGIN");
define("AUTHORIZENET_TRANSACTION_KEY", "YOURKEY");

// Get Settled Batch List
$request = new AuthorizeNetTD;
$response = $request->getSettledBatchList();
echo count($response->xml->batchList->batch) . " batches\n";
foreach ($response->xml->batchList->batch as $batch) {
    echo "Batch ID: " . $batch->batchId . "\n";
}

// Get Transaction Details
$transactionId = "12345";
$response = $request->getTransactionDetails($transactionId);
echo $response->xml->transaction->transactionStatus;

但我收到此错误消息。

由于身份验证值无效,用户身份验证失败。

I've followed this link http://developer.authorize.net/api/transaction_details/ and get this code from there,

<?php
require_once "anet_php_sdk/AuthorizeNet.php";
define("AUTHORIZENET_API_LOGIN_ID", "YOURLOGIN");
define("AUTHORIZENET_TRANSACTION_KEY", "YOURKEY");

// Get Settled Batch List
$request = new AuthorizeNetTD;
$response = $request->getSettledBatchList();
echo count($response->xml->batchList->batch) . " batches\n";
foreach ($response->xml->batchList->batch as $batch) {
    echo "Batch ID: " . $batch->batchId . "\n";
}

// Get Transaction Details
$transactionId = "12345";
$response = $request->getTransactionDetails($transactionId);
echo $response->xml->transaction->transactionStatus;

but I m getting this error message.

User authentication failed due to invalid authentication values.

夜巴黎 2024-09-15 11:33:15

正如 @cwd 的回答中所建议的,了解交易是否已结算的最可靠方法是调用 getUnsettledTransactionListgetBatchStatistics,但您也可以只检查您的 交易截止时间设置为。

登录您的 Authorize.net 管理员,单击帐户 >交易截止时间

我的帐户设置为太平洋夏令时下午 4:00,因此您可以将交易时间与截止时间进行比较。像这样的东西:

$createdTime = new DateTime($charge['createdTime']);

// starting point for settle time
$settleTime = new DateTime($createdTime->format('Y-m-d') . ' 16:00:00');
$now = new DateTime();

// if card was charged after settle time for 
// that day, move settle time to the next day
if ($createdTime > $settleTime) {
    $settleTime->add(new DateInterval('P1D'));
}

if ($now > $settleTime) $settled = true;

As suggested in @cwd's answer, the most reliable way to know if a transaction is settled is to call getUnsettledTransactionList or getBatchStatistics, but you can also just check what your Transaction Cut-off Time is set to.

Log in to your Authorize.net admin, click Account > Transaction Cut-Off Time

My account is set to 4:00 PM PDT so you can just compare your transaction time to the cut off time. Something like:

$createdTime = new DateTime($charge['createdTime']);

// starting point for settle time
$settleTime = new DateTime($createdTime->format('Y-m-d') . ' 16:00:00');
$now = new DateTime();

// if card was charged after settle time for 
// that day, move settle time to the next day
if ($createdTime > $settleTime) {
    $settleTime->add(new DateInterval('P1D'));
}

if ($now > $settleTime) $settled = true;
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文