This patch adds the payment method to transactions so that uses see 'PayPal WPS' as the payment method in the Order UI instead of 'Unknown.'

Comments

rszrama’s picture

Status: Active » Postponed (maintainer needs more info)

Hmm, I'm curious as to why this is necessary. The following code should initialize this to the proper value:

  // Create a new payment transaction for the order.
  $transaction = commerce_payment_transaction_new('paypal_wps', $order->order_id);
  $transaction->instance_id = $payment_method['instance_id'];
drupal_was_my_past’s picture

Status: Postponed (maintainer needs more info) » Active

Those lines on 170 and 171 in commerce_paypal_wps.module don't set the payment method for me. They seem to only set the Payment's method_id, instance_id, and order_id, but not the payment_method.

rszrama’s picture

Category: feature » bug

Hmm, it's explicitly setting payment_method if you look at the commerce_payment_transaction_new() function:

function commerce_payment_transaction_new($method_id = '', $order_id = 0) {
  return entity_get_controller('commerce_payment_transaction')->create(array(
    'payment_method' => $method_id,
    'order_id' => $order_id,
  ));
}

I don't suppose you have anything else interacting w/ newly created transactions?

drupal_was_my_past’s picture

Status: Active » Fixed

Hey rszrama,

I was running 7.x-1.0-beta4. The code you're referencing is included to 7.x-1.0-rc3, so this is fixed for me. Thanks!

rszrama’s picture

Ok, great.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

scotwith1t’s picture

Issue summary: View changes

In case others run into this, I had a problem with a dev site being protected by htaccess/htpasswd. Disabling the htaccess password temporarily while I test e-commerce stuff fixed this for me.