Search Unity

Setting up own webservice / rogue payment channel

Discussion in 'General Discussion' started by deLord, Jan 9, 2019.

  1. deLord

    deLord

    Joined:
    Oct 11, 2014
    Posts:
    306
    Hey guys, lots of different questions :)

    With this tutorial I could set up a local xsp webservice which I can call from Unity.
    My first problem is: I want to test this against an online webservice and I have nothing to test against or I dont know how to (because the class to use in Unity was generated with wsdl.exe from a .asmx-file that I have access to). Can someone point me to a code example of how to consume a service that is not under our control?

    Secondly, once calling a WS on a remote machine works, I want to set up my own website where users can register, login and unlock content by this means (tbh to avoid donating 30% to google). This would also mean integrating payment methods (mb only PayPal to begin with) and the whole login mechanism (are there presets?). I am just not sure how well this works with IAP and if it is too difficult to set up.

    Also, how do I port my WS, which now runs under xsp, to a vServer? I don't even know what to copy: the .asmx-file points to a file in a directory called "App_Code" which I am pretty sure does not exist on the vServer. Moreover, where is the compilation when xsp runs? I can only find the source code .cs-file. Why can I test-call my WS from the browser? Does xsp compile and store it somewhere where I cant see?
     
  2. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    I would use a .NET Core service instead the soap services in the .NET stack are legacy and outdated as hell. A .NET Core service can run under a docker container which works with various cloud services.
     
  3. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Also, make sure it's allowed at your publisher store to have such thing before doing anything.

    As it is definitely not @ Steam, Google Play Store, or App Store.
    Which means if you're self publishing game - that's fine I guess.
     
    angrypenguin likes this.
  4. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    I have never heard of a store not letting you communicate what ever endpoint you choose to
     
  5. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    There's an agreement on payment service - you're not allowed to use ones that aren't provided by the store.
    If someone bypasses that - that is a legal reason for the game to be taken down from the store.
     
    angrypenguin and AndersMalmgren like this.
  6. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    ah, sorry missed the payment part. I just though about communicating with a service :D For example a custom master server
     
    angrypenguin likes this.
  7. deLord

    deLord

    Joined:
    Oct 11, 2014
    Posts:
    306
    How exactly would that look? I am in the dark here. Also, I prefer not to use a cloud service (as AWS), and docker (more tech I need to dig into, meh!) seems like overkill to me.
     
  8. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    What ever hosting service you may choose, a .NET Core service will always be more agile than the soon two decade old soap service.
     
  9. deLord

    deLord

    Joined:
    Oct 11, 2014
    Posts:
    306
    OK and what do I need to change/implement on the Unity-side?
     
  10. Glader

    Glader

    Joined:
    Aug 19, 2013
    Posts:
    456
    Well, that's your decision. I use Refit (a typesafe HTTP library) as well as ASP Core web APIs for my non-realtime backend services in my Unity3D game. JSON models, Refit + cleverly consuming Tasks/Async in Unity is all you really need to create a decent non-realtime service for a Unity3D application.
     
    deLord likes this.