Reply
Highlighted
Contributor
Posts: 30
Registered: ‎06-19-2015

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

 

 

 

 

Highlighted
Administrator
Posts: 145
Registered: ‎11-29-2017

Re: get unmask expiration date for accept.js refund process

GetTransactionDetails does not support this parameter.

Highlighted
Contributor
Posts: 34
Registered: ‎03-21-2013

Re: get unmask expiration date for accept.js refund process

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

Highlighted
Member
Posts: 4
Registered: ‎09-06-2018

Re: get unmask expiration date for accept.js refund process

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