我正在为authorize.net创建一个CIM。我让它们完美地工作,但我需要在创建事务时将事务id返回给我。
现在,当我完成一项事务时,会返回以下内容:
if ($cim->isSuccessful())
{
$approval_code = $cim->getAuthCode();
}
// Print the results of the request
echo '<strong>Request Response Summary:</strong> ' .
$cim->getResponseSummary() . '';
echo '<strong>Approval code:</strong> ' . $approval_code;然后这是我得到的输出:请求响应摘要:响应代码: I00001消息: Successful.Approval代码: NXD8X7
不返回事务ID。我想知道我怎样才能得到这个。我的目标是将它写入我的数据库,但我需要一些方法来获取事务id。非常感谢。
发布于 2013-08-24 03:51:07
如果你正在使用getTransactionResponse,你可以通过调用$ response -> AuthorizeNet函数来获取所有的响应字段,如下所示。
$request = new AuthorizeNetCIM();
$response = $request->createCustomerProfileTransaction('AuthCapture', $transaction);
$transactionResponse = $response->getTransactionResponse();
$transactionResponse->transaction_idhttps://stackoverflow.com/questions/17455379
复制相似问题