Copied to clipboard

Flag this post as spam?

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


  • Tor Langlo 189 posts 532 karma points
    Jun 05, 2018 @ 00:10
    Tor Langlo
    0

    Debugging Payment Providers

    What is the easiest and/or proper way to debug and learn about how the payment providers work?

    I have forked and cloned the https://github.com/TeaCommerce/Payment-providers rep and loaded and compiled it in VS 2017. All good so far.

    What do I do next? Add the project to my solution with my Umbraco/TeaCommerce site and add a project reference? (I get a runtime error: "Could not load file or assembly 'Newtonsoft.Json' or one of its dependencies"). Or some other approach?

  • Anders Burla 2560 posts 8256 karma points
    Jul 05, 2018 @ 07:40
    Anders Burla
    0

    Hi Tor

    What Tea Commerce version are you running on the site where you want to test? You must be sure to clone the right release of the payment provider projects as some do reference some different files depending on what Tea Commerce and Umbraco version you are running.

    When you have the same versions and you build the payment provider project you should just be able to overwrite the payment provider files in your Tea Commerce webshop with the ones that is generated.

    A callback can mostly never be debugged with a debugger as it needs to run on a live server as they are mostly server to server calls. But generate payment can be debugged and most others.

    Kind regards

    Anders

  • Tor Langlo 189 posts 532 karma points
    Jul 05, 2018 @ 13:25
    Tor Langlo
    0

    This was primarily a question about VS solution setup, and what I found easiest was simply to copy the code for specific providers (Stripe, DIBS) from the payment provider project and into the web site. Then I give the provider a different name and can play around with the code and set breakpoints. So I'm good at this point.

    I do see that the code for the mentioned providers are quite old. For Stripe I'm using the code from Matt Brailsford's PR, but Stripe has improved since then and my plan is to write an updated payment provider for the latest Stripe libraries. Maybe someone else out there already has done this?

  • Anders Burla 2560 posts 8256 karma points
    Jul 05, 2018 @ 13:40
    Anders Burla
    0

    Great you got it working.

    I don't have knowledge about others that are doing it at the moment.

Please Sign in or register to post replies

Write your reply to:

Draft