cancel
Showing results for 
Search instead for 
Did you mean: 

get unmask expiration date for accept.js refund process

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

 

 

 

 

testing
Contributor
3 REPLIES 3

GetTransactionDetails does not support this parameter.

mmcguire
Administrator Administrator
Administrator

This is a problem, for example in the case of trying to send a refund. The Refund api requires an unmasked expiration date.

Late reply, but refunds do accept a masked expiration date since hosted payments you will never know what the value is.