how to get full credit card number from Authorize transaction through transaction id in php laravel

  authorize, laravel, php
    $check_request = new AnetAPIGetTransactionDetailsRequest();
    $check_request->setMerchantAuthentication($merchantAuthentication);
    $check_request->setTransId($transId);
    $check_controller = new AnetControllerGetTransactionDetailsController($check_request);
    if(env('AUTHORIZE_MODE') == 'SANDBOX'){
        $response2 = $check_controller->executeWithApiResponse(netauthorizeapiconstantsANetEnvironment::SANDBOX);
    }
    else{
        $response2 = $check_controller->executeWithApiResponse(netauthorizeapiconstantsANetEnvironment::PRODUCTION);
    }
    $card_no = $response2->getTransaction()->getPayment()->getCreditCard()->getCardNumber();

I am getting card no like this but it is giving last four digits of card just not full card no.

Source: Laravel

Leave a Reply