简体   繁体   English

Authorize.net:PHP中的getTransactionDetails

[英]Authorize.net: getTransactionDetails in PHP

I'm using SIM. 我正在使用SIM卡。 I perform a transaction, but Authorize.net doesn't return all the transaction details that I need in the response. 我执行交易,但是Authorize.net不会返回响应中所需的所有交易详细信息。 So I have to manually make a call for the details after the transaction. 所以我必须在交易后手动调用细节。

This is the API I found 这是我找到的API

I'm unfamiliar with SOAP. 我不熟悉SOAP。 How can I do this? 我怎样才能做到这一点?

Presumably: 想必:

$soap = new SoapClient('https://api.authorize.net/soap/v1/Service.asmx?WSDL');
var_dump($soap->GetTransactionDetails(
    (object)array(
       'merchantAuthentication' => (object)array(
           'name'           => $name,
           'transactionKey' => $key),
       'transId' => $your_transaction_id)));

Examing the output of $soap->__getTypes() && $soap->__getFunctions() usually tells you all you need to know. 检查$soap->__getTypes() && $soap->__getFunctions()通常会告诉您所有需要知道的内容。

There is probably no reason for you to be using SIM . 您可能没有理由使用SIM卡 Use direct post it is much easier. 使用直接发布它会容易得多。

In fact, this is how the supplied Authorize.net PHP SDK works. 实际上,这就是提供的Authorize.net PHP SDK的工作方式。 So use their sdk and call the function directly. 所以使用他们的sdk并直接调用该函数。

Compared to some gateways, authorize.net has great documentaion. 与某些网关相比,authorize.net有很好的文档。 So learn to read the docs , it will save lots of headache. 因此,学习阅读文档 ,它将节省许多头痛。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM