Copied to clipboard

Flag this post as spam?

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


  • Peter 89 posts 160 karma points
    Nov 03, 2012 @ 11:21
    Peter
    0

    Finalising Order via .NET API

    Hey there, I did look around, I promise i haven't been a lazy bones. I even looked at the "similar topics" it suggested as I wrote this - which all the links are still broken.

    Anyway, like Nigel Wilson I seem to be adapting the process a little and need to be able to interface with the Teacommerce librarys to make sure everything is kept in order.

    I post off to a payment provider and could do with updating the order status to before it is sent and depending on the result of the payment provider upadte it again on its return.

    Any direction appreciated :) 

    Peter

  • Peter 89 posts 160 karma points
    Nov 03, 2012 @ 16:39
    Peter
    0

    Google searching "our" can be so much more rewarding. I am currently following this thread 

     

  • Anders Burla 2560 posts 8256 karma points
    Nov 03, 2012 @ 18:07
    Anders Burla
    0

    Hi Peter

    Great that you found your way ahead :)

    If you "just" want a new payment provider - the right way to to inherit from APaymentProvider and implement the different methods. You can see some of the current payment providers at but bucket.

    https://bitbucket.org/teasolutions/tea-commerce-tea-commerce-payment-providers

    Kind regards
    Anders

  • Peter 89 posts 160 karma points
    Nov 04, 2012 @ 02:29
    Peter
    0

    Hey Anders,

    First of all thanks for the bitbucket link that is a useful project.

    I believe all I needed is to:

    • get the order (from the id i have passed through the payment process
    • create a new callbackinfo object (and fill with relevant information that was obtained from the payment process)
    • then finalise the order passing the callbackinfo object, a bit like this...
    TeaCommerce.Data.Order order = TeaCommerce.Data.Order.GetOrder(Convert.ToInt64(customField));
    var callback = new TeaCommerce.Data.Payment.CallbackInfo(orderName, decimal.Parse(strAmount, System.Globalization.CultureInfo.InvariantCulture), TeaCommerce.Data.Payment.PaymentStatus.Authorized, cardType, cardNo);
    order.Finalize(callback);

    Hope this helps others :)

Please Sign in or register to post replies

Write your reply to:

Draft