Skip to content

Commit cf0cd05

Browse files
committed
Update README.md
1 parent 2893bd7 commit cf0cd05

1 file changed

Lines changed: 8 additions & 12 deletions

File tree

README.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -303,21 +303,17 @@ Here's the PHP code :
303303

304304
$controller = new AnetController\CreateTransactionController($request);
305305
$response = $controller->executeWithApiResponse( \net\authorize\api\constants\ANetEnvironment::SANDBOX);
306-
306+
307307
if ($response != null)
308308
{
309-
echo "\n REF ID IS " . $response->getRefId();
310-
echo "\n Error Code is " . $response->getMessages()->getResultCode();
311-
}
312-
313-
$tresponse = $response->getTransactionResponse();
309+
$tresponse = $response->getTransactionResponse();
314310

315-
echo "\nchecking transaction response\n";
316-
317-
if ($tresponse != null)
318-
{
319-
echo " AUTH CODE : " . $tresponse->getAuthCode() . "\n";
311+
if (($tresponse != null) && ($tresponse->getResponseCode()=="1") )
312+
{
313+
echo " AUTH CODE : " . $tresponse->getAuthCode() . "\n";
314+
echo " TRANS ID : " . $tresponse->getTransId() . "\n";
315+
}
320316
}
321-
317+
322318
?>
323319
````

0 commit comments

Comments
 (0)