Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8734263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:48:27+00:00 2026-06-13T09:48:27+00:00

So I have in-app-billing working with PHP server verify. However, I cant figure out

  • 0

So I have in-app-billing working with PHP server verify. However, I cant figure out how to separate my signed data Strings into separate strings in PHP. When I echo $signedData in PHP I get the following.

{\"nonce\":4658477652655443541,\"orders\":[{\"notificationId\":\"android.test.purchased\",\"orderId\":\"transactionId.android.test.purchased\",\"packageName\":\"com.coolboy.coolapp\",\"productId\":\"android.test.purchased\",\"purchaseTime\":1350913071409,\"purchaseState\":0}]}

How do you separate the nonce, orders, and etc. in PHP to separate variables?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T09:48:29+00:00Added an answer on June 13, 2026 at 9:48 am

    Use json_decode to decode the string into an object.

    This code:

    $str = "{\"nonce\":4658477652655443541,\"orders\":[{\"notificationId\":\"android.test.purchased\",\"orderId\":\"transactionId.android.test.purchased\",\"packageName\":\"com.coolboy.coolapp\",\"productId\":\"android.test.purchased\",\"purchaseTime\":1350913071409,\"purchaseState\":0}]}";
    $json = json_decode($str);
    var_dump($json);
    

    Produces:

    class stdClass#1 (2) {
      public $nonce =>
      double(4.6584776526554E+18)
      public $orders =>
      array(1) {
        [0] =>
        class stdClass#2 (6) {
          public $notificationId =>
          string(22) "android.test.purchased"
          public $orderId =>
          string(36) "transactionId.android.test.purchased"
          public $packageName =>
          string(19) "com.coolboy.coolapp"
          public $productId =>
          string(22) "android.test.purchased"
          public $purchaseTime =>
          double(1350913071409)
          public $purchaseState =>
          int(0)
        }
      }
    }
    

    And of course you can do:

    $nonce = $json->nonce;
    $notificationId = $json->orders[0]->notificationId;
    // etc...
    

    More info on JSON:

    • http://en.wikipedia.org/wiki/JSON (less technical)
    • http://www.json.org/ (more technical)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on the in app billing in android and I have tested
I am working on In App billing ans from last few days i have
I have a strange problem with in-app billing RESTORE_TRANSACTION command. Every request RESTORE_TRANSACTION request
I have a WPF application for product purchase billing. My client wants that app
I have application with in app billing. I'm using the AndroidBillingLibrary to manage the
I have implemented a test app with Android's In-App Billing. I have filled in
I am working on Google In-app purchase for an app. I have created a
I'm working on the billing system for my app, but I'm not sure how
I would like to know if the in-app billing api needs to have internet
I have read the in-app billing setup but still I don't understand a thing..

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.