Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Rasmus Fjord 659 posts 1546 karma points c-trib
    Aug 22, 2013 @ 10:49
    Rasmus Fjord
    0

    TC v1 How do i change the payment method in use?

    Hey there :)

    We have orders that can become zero so we want to sent them pass the payment gateway and just do a direct payment method.

    How do i change the payment method through the code ? 

    Could just be in razor.

  • Anders Burla Johansen 2560 posts 8256 karma points
    Aug 22, 2013 @ 11:18
    Anders Burla Johansen
    100

    Use the TeaCommerce.Base.SetPaymentMethod( id )

    Kind regards
    Anders

  • Anders Burla Johansen 2560 posts 8256 karma points
    Aug 22, 2013 @ 11:19
    Anders Burla Johansen
    1

    Or if in the C# API and not a web session. Then:

    order.PaymentMethodId = 2;
    order.Save();

  • Rasmus Fjord 659 posts 1546 karma points c-trib
    Aug 22, 2013 @ 11:33
    Rasmus Fjord
    0

    Thx Anders :) 

    So, how do i know/set the default payment method, cant see anything in the config or in the TC backend

  • Anders Burla Johansen 2560 posts 8256 karma points
    Aug 22, 2013 @ 12:10
    Anders Burla Johansen
    1

    You set the default shipping method at the country level. So load the country and get the default payment method id.

  • Rasmus Fjord 659 posts 1546 karma points c-trib
    Aug 22, 2013 @ 12:31
    Rasmus Fjord
    0

    awesome ! 

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies