@@ -27,7 +27,7 @@ class Directpost extends \Magento\Authorizenet\Model\Authorizenet implements Tra
27
27
/**
28
28
* @var string
29
29
*/
30
- protected $ _infoBlockType = \Magento \Payment \Block \Info::class;
30
+ protected $ _infoBlockType = \Magento \Authorizenet \Block \Adminhtml \ Order \ View \ Info \PaymentDetails ::class;
31
31
32
32
/**
33
33
* Payment Method feature
@@ -371,8 +371,7 @@ public function void(\Magento\Payment\Model\InfoInterface $payment)
371
371
}
372
372
373
373
/**
374
- * Refund the amount
375
- * Need to decode last 4 digits for request.
374
+ * Refund the amount need to decode last 4 digits for request.
376
375
*
377
376
* @param \Magento\Framework\DataObject|\Magento\Payment\Model\InfoInterface $payment
378
377
* @param float $amount
@@ -626,6 +625,14 @@ protected function fillPaymentByResponse(\Magento\Framework\DataObject $payment)
626
625
$ payment ->setIsTransactionPending (true )
627
626
->setIsFraudDetected (true );
628
627
}
628
+
629
+ $ additionalInformationKeys = explode (', ' , $ this ->getValue ('paymentInfoKeys ' ));
630
+ foreach ($ additionalInformationKeys as $ paymentInfoKey ) {
631
+ $ paymentInfoValue = $ response ->getDataByKey ($ paymentInfoKey );
632
+ if ($ paymentInfoValue !== null ) {
633
+ $ payment ->setAdditionalInformation ($ paymentInfoKey , $ paymentInfoValue );
634
+ }
635
+ }
629
636
}
630
637
631
638
/**
@@ -682,6 +689,7 @@ protected function matchAmount($amount)
682
689
683
690
/**
684
691
* Operate with order using information from Authorize.net.
692
+ *
685
693
* Authorize order or authorize and capture it.
686
694
*
687
695
* @param \Magento\Sales\Model\Order $order
@@ -858,7 +866,7 @@ public function getConfigInterface()
858
866
* Getter for specified value according to set payment method code
859
867
*
860
868
* @param mixed $key
861
- * @param null $storeId
869
+ * @param int|string| null|\Magento\Store\Model\Store $storeId
862
870
* @return mixed
863
871
*/
864
872
public function getValue ($ key , $ storeId = null )
@@ -918,10 +926,12 @@ public function fetchTransactionInfo(\Magento\Payment\Model\InfoInterface $payme
918
926
$ payment ->setIsTransactionDenied (true );
919
927
}
920
928
$ this ->addStatusCommentOnUpdate ($ payment , $ response , $ transactionId );
921
- return [] ;
929
+ return $ response -> getData () ;
922
930
}
923
931
924
932
/**
933
+ * Add statuc comment on update.
934
+ *
925
935
* @param \Magento\Sales\Model\Order\Payment $payment
926
936
* @param \Magento\Framework\DataObject $response
927
937
* @param string $transactionId
@@ -996,8 +1006,9 @@ protected function getTransactionResponse($transactionId)
996
1006
}
997
1007
998
1008
/**
999
- * @return \Psr\Log\LoggerInterface
1009
+ * Get psr logger.
1000
1010
*
1011
+ * @return \Psr\Log\LoggerInterface
1001
1012
* @deprecated 100.1.0
1002
1013
*/
1003
1014
private function getPsrLogger ()
@@ -1038,7 +1049,9 @@ private function getOrderIncrementId(): string
1038
1049
}
1039
1050
1040
1051
/**
1041
- * Checks if filter action is Report Only. Transactions that trigger this filter are processed as normal,
1052
+ * Checks if filter action is Report Only.
1053
+ *
1054
+ * Transactions that trigger this filter are processed as normal,
1042
1055
* but are also reported in the Merchant Interface as triggering this filter.
1043
1056
*
1044
1057
* @param string $fdsFilterAction
0 commit comments