1

is default magento2 authorize.net payment method save the credit card details , How we can retrieve credit card details used by authorize.net

1

Yes, you can retrieve credit card details from order.

//***if orderid=1001;***

$orderId=1001;
$order = $this->order->load($orderId);
$expmonth=$order->getPayment()->getCcExpMonth();   *//get expirymonth* 
$expyear=$order->getPayment()->getCcExpYear();      *//get expiryyear*
$cclast4=$order->getPayment()->getCcLast4();        *//get expiry last four digit from card*  

It worked like charm

  • 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 – MSA 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.