Paypal Payment Pro 3-D безопасный переполнение стека

Я пытался реализовать Payment Pro 3D безопасный, но застрял на месте. Я следовал документации, предоставленной Paypal. Но я думаю, что мне нужно какое-то серьезное руководство.

Я получил только ответ html ниже отображаемой формы в ответе аутентификации эмитента.

введите описание изображения здесь

Когда я пытаюсь отправить форму, URL перенаправляет на:
HTTP: // локальный / dodirect3d / NextV3DSRequest; JSESSIONID = Yc8GvrWh2KcnMK1Y

Я использовал файлы классов, предоставленные CardinalCommerce Corporation.

Ниже приведена процедура, которой я следовал:

<h1>CheckOut</h1>
<form action="" method="post">
<table>
<tr>
<th>Amount</th>
<td><input type="number" name="Amount" value="10000"></td>
</tr>
<tr>
<th>Card Number</th>
<td><input type="number" name="CardNumber" value="4000000000000002"></td>
</tr>
<tr>
<th>Expiry Date</th>
<td>
<input type="number" name="CardExpMonth" placeholder="MM" value="01">
/
<input type="number" name="CardExpYear" placeholder="YYYY" value="2016">
</td>
</tr>
</table>
<button type="submit">Submit</button>
</form>

<?php
if ($_POST) {
require('CentinelClient.php');
require('CentinelConfig.php');
require('CentinelUtility.php');

$centinelClient = new CentinelClient;

$centinelClient->add("MsgType", "cmpi_lookup");
$centinelClient->add("Version", CENTINEL_MSG_VERSION);
$centinelClient->add("ProcessorId", CENTINEL_PROCESSOR_ID);
$centinelClient->add("MerchantId", CENTINEL_MERCHANT_ID);
$centinelClient->add("TransactionPwd", CENTINEL_TRANSACTION_PWD);
$centinelClient->add("TransactionType", "C");
//$centinelClient->add('IPAddress', $_SERVER['REMOTE_ADDR']);
$centinelClient->add('IPAddress', "127.0.0.1");

// Standard cmpi_lookup fields
$centinelClient->add('Amount', $_POST['Amount']);
$centinelClient->add('CurrencyCode', "826"); // For example, GBP = 826, EUR = 978.
$centinelClient->add('OrderNumber', rand(1111, 9999));

// Payer Authentication specific fields
$centinelClient->add('CardNumber', $_POST['CardNumber']);
$centinelClient->add('CardExpMonth', $_POST['CardExpMonth']);
$centinelClient->add('CardExpYear', $_POST['CardExpYear']);

/*     * ******************************************************************************* */
/*                                                                                */
/* Send the XML Msg to the MAPS Server, the Response is the CentinelResponse Object */
/*                                                                                */
/*     * ******************************************************************************* */

$centinelClient->sendHttp(CENTINEL_MAPS_URL, CENTINEL_TIMEOUT_CONNECT, CENTINEL_TIMEOUT_READ);
$response = $centinelClient->response;
echo '<h2>cmpi_lookup Response</h2>';
echo '<pre>';
print_r($response);
echo '</pre>';

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $response['ACSUrl']);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(
array(
'PaReq' => $response['Payload'],
'TermUrl' => CENTINEL_TERM_URL,
'MD' => ''
)
)
);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response_IssuerAuthentication = curl_exec($ch);

curl_close($ch);

echo '<h2>Issuer Authentication Response</h2>';
print_r($response_IssuerAuthentication);

}
?>

0

Решение

Задача ещё не решена.

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector