Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    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:
    199
    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:
    199
    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:
    135
    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:
    199
    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:
    135
    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