我正确地通过Authorize.Net批准结帐流程,并且中继响应正确地命中我的响应URL。但是没有检测到POST数据。 var_dump显示数组(0){}。
<?php
require_once '../anet_php_sdk/AuthorizeNet.php';
$host = HOST;
$url = $host . '/order/response/';
$api_login_id = API_LOGIN_ID;
$transaction_key = TRANSACTION_KEY;
$md5_setting = MD5;
$amount = $order->total;
$orderId = $order->id;
echo AuthorizeNetDPM::getCreditCardForm($amount, $orderId, $url, $api_login_id, $transaction_key);
?>
该服务成功点击以下代码。
<?php
public function response() {
$response = Input::all();
// var_dump($response); return;
if (isset($response["x_invoice_num"])) {
$orderId = $response["x_invoice_num"];
$order = Order::find($orderId);
try {
$order->save();
} catch (Exception $e) {
$this->log("\nERROR: \n" . $e->getMessage());
return View::make('home.error')->with('message', $e->getMessage());
}
$order->orderstatus_id = 1;
}
return View::make('home.processing')->with('response', $response);
}
?>
$ response是一个空数组。