Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Unity 2022.2 is now available as the latest Tech release.
    Dismiss Notice
  3. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  4. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Question UDP server side payment validation

Discussion in 'Unity Distribution Portal (UDP)' started by BBO_Lagoon, Jul 9, 2019.

  1. BBO_Lagoon

    BBO_Lagoon

    Joined:
    Mar 2, 2017
    Posts:
    140
    Hi, I'm reading the docs here: https://docs.unity3d.com/Packages/c.../Implementing-UDP-IAP-on-the-server-side.html but I don't really understand how I can validate the payment server side.

    For the moment my app is published on Android (google play store) and IOS and I have a php script that validate the receipts from the UnityPurchasing module that validate payments and deliver items to the users.

    I would like to do the same to validate UDP payments, I see in the doc that I can call the url:
    /udp/developer/api/order?orderQueryToken=<orderQueryToken>&sign=<sign> to validate it but it's not a valid url it's missing the domain...
    Or do I have to implement the callback system to make it work ?
    (note I would prefer to use UnityIAP system than UDP package)

    Thanks by advance for your help.
    Benjamin
     
  2. BBO_Lagoon

    BBO_Lagoon

    Joined:
    Mar 2, 2017
    Posts:
    140
    Hi, I'm trying to implement the callback system:

    - The first url I tried to enter : https://game.mydomain.com/services/UDP__callback.php gives me an error "Invalid URL".

    - So I put my callback script in a file named index.php and point the callback url to the directory https://game.mydomain.com/UDP_callback/, now the setting is well saved but the callback is never called...


    For information I didn't publish the app yet, I just try in sandbox mode but it have to work in sandbox mode too no ?
     
  3. Unity-Boon

    Unity-Boon

    Unity Technologies

    Joined:
    Jan 18, 2017
    Posts:
    90
    Hi,

    Would like to check do you still have problem for the server side callbacks implementation? We have some updates since your enquiry last time and it might worth to take a look at our latest documentation.

    https://docs.unity3d.com/Packages/c...ith-iap.html#receiving-callback-notifications


     
  4. BBO_Lagoon

    BBO_Lagoon

    Joined:
    Mar 2, 2017
    Posts:
    140
    As UDP was still in preview and laks some testing stuff I didn't use it for my game.
    Maybe I'll try it on an other game as it's now a validated package.
    Thanks for the update.
     
  5. Unity-Boon

    Unity-Boon

    Unity Technologies

    Joined:
    Jan 18, 2017
    Posts:
    90
    UDP have been official launched. Please try it out and if you have any questions please reach out to us in the forum or email to udpsupport@unity3d.com