I want to print complete payment details on order review page in onepage checkout which are saved while payment. I have used following code:-

<?php echo$payment = Mage::getSingleton('checkout/session')->getQuote()->getPayment()->getMethodInstance()->getTitle(); ?>

But This code is getting only Payment title but I want to print following details:-

  • Card holder name:-
  • Expire date:-
  • Card No:-
  • Card Type:-

Use print_r(getQuote()->getPayment()->debug()) to see what other values are available, or view the sales_flat_order_payment table to see some more examples.

$cards = $payment->getMethodInstance()->getCardsStorage()->getCards();

In array $cards y have those datasets;

  • I have tried but could't work. When we proceeding to Next step after filling payments details it is automatically redirecting on cart page – Satendra Patel Jun 5 '18 at 8:18
  • Could you please suggest me another code? – Satendra Patel Jun 5 '18 at 10:42
  • What contains array $cards ? make var_dump($cards); – Evgeniy Kapelko Jun 5 '18 at 10:46

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.