0

i am using authorize.net payment in magento 2.3.1 and i have one order coming suspected fraud. but when i will suspected fraud to deny payment and i see error but i can't process continue to Deny payment

enter image description here

and error like:

Fatal error: Uncaught Error: Call to a member function getAdditionalInformation() on boolean in 
vendor/magento/module-authorizenet-acceptjs/Gateway/Request/VoidDataBuilder.php:50 

and error line like:

public function build(array $buildSubject): array
{
    $paymentDO = $this->subjectReader->readPayment($buildSubject);
    $payment = $paymentDO->getPayment();
    $transactionData = [];

    if ($payment instanceof Payment) {
        $authorizationTransaction = $payment->getAuthorizationTransaction();
        $refId = $authorizationTransaction->getAdditionalInformation('real_transaction_id'); //here error line
        if (empty($refId)) {
            $refId = $authorizationTransaction->getParentTxnId();
        }

        $transactionData['transactionRequest'] = [
            'transactionType' => self::REQUEST_TYPE_VOID,
            'refTransId' => $refId
        ];
    }

    return $transactionData;
}

Thanks in Advance

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.