dtdr57046 2018-08-02 07:50 采纳率: 100%
浏览 55

Authorize.net商家登录ID或密码无效或帐户无效[重复]

This question is an exact duplicate of:

I know this is a duplicate question (13) The merchant login ID or password is invalid or the account is inactive.(usig Aim method for authorize.net) but this answer does not solved my problem. Let me explain.

Authorize.Net implements AcceptJs to receive opaqueData. I have successfully tested the opaqueData and receive the dataDescriptor and dataValue. (token)

Now, I want to accept the payment through Authorize.net. From this guide https://developer.authorize.net/api/reference/features/acceptjs.html#response-handling I want to implement the accept payment method through PHP. Here is my code:

$url = "https://test.authorize.net/gateway/transact.dll";

$query = <<<EOT
<createTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
  <merchantAuthentication>
    <name>API_LOGIN_ID</name>
    <transactionKey>API_TRANSACTION_KEY</transactionKey>
  </merchantAuthentication>
  <transactionRequest>
    <transactionType>authCaptureTransaction</transactionType>
    <amount>10</amount>
    <payment>
      <opaqueData>
        <dataDescriptor>COMMON.ACCEPT.INAPP.PAYMENT</dataDescriptor>
        <dataValue>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</dataValue>
      </opaqueData>
    </payment>
  </transactionRequest>
</createTransactionRequest>
EOT;

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml'));
curl_setopt($ch, CURLOPT_POSTFIELDS, "$query");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch);

print_r($output);

It showed me the error:

(13) The merchant login ID or password is invalid or the account is inactive.

I checked that my Authorize.net test mode is ON. Also, I double verified that I have entered the correct credentials. What are the issues then?

PS: I'm testing this via localhost with https (in ubuntu server).

</div>
  • 写回答

1条回答 默认 最新

  • dpqvwgr74759 2018-08-02 08:17
    关注

    The $url will be as follows and it solved my problem.

    https://apitest.authorize.net/xml/v1/request.api
    
    评论

报告相同问题?

悬赏问题

  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?