0

Using knockout js, I have created a custom step, which I have place after payment method. I need to show which payment method was selected by the user.

I am creating a custom step as summary step. I want to display shipping address, shipping method and payment method.

1

You need to do this things.

  1. In your custom step js file, Include this file

    vendor\magento\module-checkout\view\frontend\web\js\checkout-data.js
    
  2. After inluding file, used object of that file into your code and call the function getSelectedPaymentMethod.

  3. That function give you information which you can used further.

  • Your solution works but it show this way "authorizenet_directpost". Can i get it in proper text – Avesh Naik Apr 20 '18 at 14:13
  • That is magento payment code. You can get payment method label easly from payment code. – Dhiren Vasoya Apr 21 '18 at 5:44
  • Can you give me the method which will give me proper name of payment method? – Avesh Naik Apr 23 '18 at 9:28

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.