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 675 posts 1566 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 2560 posts 8256 karma points
    Aug 22, 2013 @ 11:18
    Anders Burla
    100

    Use the TeaCommerce.Base.SetPaymentMethod( id )

    Kind regards
    Anders

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

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

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

  • Rasmus Fjord 675 posts 1566 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 2560 posts 8256 karma points
    Aug 22, 2013 @ 12:10
    Anders Burla
    1

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

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

    awesome ! 

Please Sign in or register to post replies

Write your reply to:

Draft