Hello
function uc_stripe_charge() in file uc_stripe.module has unreachable code.

  //  Default / Fallback procedure to fail if the above conditions aren't met

  $result = array(
    'success' => FALSE,
    'comment' => "Stripe Gateway Error",
    'message' => "Stripe Gateway Error",
    'uid' => $user->uid,
    'order_id' => $order_id,
  );

  uc_order_comment_save($order_id, $user->uid, $result['message'], 'admin');

  watchdog('uc_stripe', 'Stripe gateway error for order @order_id', array('order_id' => $order_id));

  $_SESSION['stripe']['payment_failed'] = TRUE;

  return $result;

Comments

mar4ehk0 created an issue. See original summary.

andraeray’s picture

Category: Bug report » Task
Status: Active » Needs work

Thanks for creating this issue and submitting a patch.

I can't commit your patch, it has too many changes unrelated to the ticket. You'll have to make sure your code matches 7.x-3.x dev branch so that the diff is clean without extra changes.

I'm going to change it form bug report, this is more like a code clean up task.

mar4ehk0’s picture

Hello AndraeRay.
I created new patch from branch 7-3.3.

mar4ehk0’s picture

Status: Needs work » Active
andraeray’s picture

Status: Active » Patch (to be ported)

Looks good, thank you.

andraeray’s picture

Status: Patch (to be ported) » Reviewed & tested by the community