File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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````
You can’t perform that action at this time.
0 commit comments