0

这是我第一次尝试使用在线支付网关。我正在尝试配置 NMI 商家 PHP SDK。我已经下载了 PHP SDK 文件,现在我正在测试它们。

有一个文件 ExampleTest.php。当我打开它时(使用我的终端 ID 和交易密钥)得到这个

REQUEST:
3DSecureCardHolderEnrolled: -1
3DSecureECI:
3DSecureIAV:
3DSecureIAVAlgorithm:
3DSecureIAVFormat: Base64
3DSecureTransactionStatus: -1
3DSecureXID:
3DSecureXIDFormat: Ascii
Address:
Amount:
AmountUnit: Minor
AutoConfirm:
BatchReference:
CardEaseReference:
CardHash:
CardReference:
Contactless:
CSC:
CurrencyCode:
ExpiryDate:
ExpiryDateFormat: yyMM
ExtendedProperties: Array ( )
FeatureTokens: Array ( )
ICCFallback:
ICCTags: Array ( )
ICCType: EMV
IssueNumber:
MachineReference:
ManualType: cnp
OriginatingIPAddress:
PAN:
RequestType: Test
SoftwareName: SoftwareName
SoftwareVersion: SoftwareVersion
StartDate:
StartDateFormat: yyMM
SubType:
TerminalID: hidden
Track1:
Track2:
Track3:
TransactionKey: hidden
UserReference:
VoidReason: -1
ZipCode:
CardEaseXML failed due to: CardEaseXMLCommunication: Unexpected HTTP response: 0

这是我的代码(exampletest.php)

<?php

include('Common.php');

// Setup the request
$request = new Request();
$request->setSoftwareName('SoftwareName');
$request->setSoftwareVersion('SoftwareVersion');
$request->setTerminalID($_REQUEST['TERMINALID']);
$request->setTransactionKey($_REQUEST['TRANSACTIONKEY']);

// Setup the request detail
$request->setRequestType(RequestType_Test);

echo '<p>'.$request->toString();

// Setup the client
$client = new Client();
$client->addServerURL('https://test.cardeasexml.com/generic.cex', 45000);
$client->setRequest($request);

// Process the request
$client->processRequest();

// Get the response
$response = $client->getResponse();
echo '<p>'.$response->toString();
?>

你们能帮帮我吗?这是我第一次尝试使用在线支付网关。谢谢

4

0 回答 0