Hi, Can we unmask the detail like following?
function getTransactionDetails($transactionId) { $merchantAuthentication = new AnetAPI\MerchantAuthenticationType(); $merchantAuthentication->setName(); $merchantAuthentication->setTransactionKey(); // Set the transaction's refId $refId = 'ref' . time(); $request = new AnetAPI\GetTransactionDetailsRequest(); $request->setMerchantAuthentication($merchantAuthentication); $request->setTransId($transactionId); $request->setUnmaskExpirationDate(true); //Can we do like this $controller = new AnetController\GetTransactionDetailsController($request); $response = $controller->executeWithApiResponse(AUTHORIZENET_ENVIRONMENT); echo "<pre>";print_r($response); return $response; }
$details=$authObj->getTransactionDetails(12345678);
$creditCardExpdate = $details->getTransaction()->getPayment()->getcreditCard()->getexpirationDate(); echo $creditCardExpdate; // Can i unmask CC expiration date exit;
Thanks in advance for assist.
Kalpesh
07-25-2019 05:02 AM