create an commerce order list view with payment method I would like to create simple orders list with chosen payment method. 

Problem: If customer goes through checkout process at once (without returning from checkout review and changing payment method) there would be only one payment method for an order, which is ok. 

However, if customer returns from checkout page and changes payment method and then completes checkout - the order has 2 payment methods attached to it. 

Now, inside view I can add relationship to Commerce Order: Payment Transaction, which causes duplicates. So I choose Commerce Order: Representative payment transaction, which gives me only one payment method (Now I can use payment method field). Inside relationship I can select representative sort criteria - in my case it would be transaction id (descending). However, sorting does not seem to work. The view always outputs the first payment method chosen when creating the order. 

Is anything wrong with the view or is it better option to delete the unused payment transactions? 

Question: what is the recommended way of keeping only one (last) payment method.
As per the "... which causes duplicates ..." in your question: you may be able to prevent those by using the Views Distinct module. From its project page:


  Relationships or other joins in Views often create "duplicate" results. For example, a node with a field that has multiple values may show up in the View once per value in the multi-value field. It's frustrating, and the "DISTINCT" SQL query option in the Views UI does not actually solve the problem because the result row is technically distinct. This module aims to give a simple GUI method to remove or aggregate these "duplicate" rows.


Consider an example like so (with the duplicates included):

order id1 with payment id1
order id2 with payment id2
order id2 with payment id3
order id3 with payment id4


For this example, to only show the last payment method, sort by payment id (but descending!), and on the order_id filter repeats. So that only the last row for every order_id will be shown.

The new Views results with these changes applied for the above example should now look like so (with no more the duplicates related to payment id2):

order id1 with payment id1
order id2 with payment id3
order id3 with payment id4