dtdr84101 2013-12-02 17:24
浏览 55
已采纳

Authorize.Net-Wrong Post URL? 得到一个错误

I haven't worked with Authorize.Net before and I'm a bit lost. I've been working my way through the DPM documentation and tried to use the basic code example for PHP with the checkout.php, relay_response.php, and order_receipt.php pages.

When I visit www.myurl.com/checkout.php I can view the form just fine. However, when I submit it it sends the data to test.authorize.net/gateway/transact.dll and I receive the following error:

3,2,13,The merchant login ID or password is invalid or the account is inactive.,,P,0,,,5.99,,auth_capture,,,,,,,,,,,,,,,,,,,,,,,,,,2D7E6D34CFEA4A68908E8F868DFFFFF6,,,,,,,,,,,,,,,,,,,,,,,,,,,,

I am trying to test against the live environment but I can't figure out how to get it to send to "secure.authorize.net/gateway/transact.dll" from the example code. I'm just a bit confused on where I'm going wrong.

Here's my checkout.php:

<?php
require_once($_SERVER['DOCUMENT_ROOT'].'/anet_sdk/AuthorizeNet.php');
$relay_response_url = $_SERVER['DOCUMENT_ROOT'].'/auth/relay_response.php';
$api_login_id = '*********';
$transaction_key = '***********';
$amount = "5.99";
$fp_sequence = "123";
echo AuthorizeNetDPM::getCreditCardForm($amount, $fp_sequence, $relay_response_url, $api_login_id, $transaction_key);
?>
  • 写回答

1条回答 默认 最新

  • douzao2590 2013-12-03 14:11
    关注

    There are two possible reasons for this:

    1. Your authentication credentials are incorrect. Verify you are using the right information which may include generating a new transaction key.

    2. You are mixing up production and development environments. Authorize.Net has a developer sandbox for which developers can test their code against without processing any real transactions or incurring any fees. The URL and login credentials for that are different than that of the production environment. Verify that you are using the production environment and not the development environment.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 目详情-五一模拟赛详情页
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line