Does default Magento2 authorize.net payment method save the credit card details?

If yes, then How can we retrieve the credit card details used by authorize.net?

If not, please suggest the best way to achieve so.

  • Check this link: magento.stackexchange.com/questions/155298/… – dawhoo Nov 20 '18 at 19:35
  • I see only $order->getPayment()->getCcLast4(); has value as well as $order->getPayment()->getAdditionalInformation(); getPayment()->getCcExpYear() or getPayment()->getCcExpMonth() are always empty – AlexGold Nov 1 '19 at 15:32

Yes, you can retrieve credit card details from order.

$order is of type Magento\Sales\Model\Order

The following methods get the credit card details:

| improve this answer | |
  • Pardon, but where would one implement this code? – dawhoo Nov 21 '18 at 15:54
  • 1
    You can implement code in following event observer checkout_onepage_controller_success_action,sales_order_place_after – Arunprabakaran M Nov 22 '18 at 7:05

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.